Skip to content

Instantly share code, notes, and snippets.

View abrarShariar's full-sized avatar
🎯
Focusing

Abrar abrarShariar

🎯
Focusing
View GitHub Profile
@abrarShariar
abrarShariar / lift_level.asm
Created February 7, 2016 12:52
lift input using label (jmp,jne)
.model small
.stack 100h
.data
;a db ?
inp db 'INPUT: $'
level0 db 'You have reached level 0 $'
level01 db 'You have reached level 1 $'
level02 db 'You have reached level 2 $'
level03 db 'You have reached level 3 $'
@abrarShariar
abrarShariar / inpput_ascii.asm
Last active February 7, 2016 14:30
Display ascii code for corresponding input
;input A-I and display their corresponding ascii value
.model small
.stack 100h
.data
asc db '4'
inval db 'INVALID INPUT$'
x db ?
@abrarShariar
abrarShariar / lab_5_solve.sql
Last active February 16, 2016 17:26
Solving lab_5 sql problems
1)>> select customer_name,customer_city from customer where customer_name in (select customer_name from borrower);
2)>> select customer_name,customer_city from customer where customer_name in (select customer_name from borrower where loan_number in (select loan_number from loan where branch_name='Perryridge'));
3)>> select account_number,balance from account where balance between 700 and 900;
4)>> select customer_name,customer_street from customer where customer_street like '%Hill';
@abrarShariar
abrarShariar / sum_two_digit.asm
Last active February 8, 2016 16:05
add two input and show result of two digit (e.g. 9+9 = 18)
;add two numbers(input) and show two digits
.model small
.stack 100h
.data
num1 db ?
num2 db ?
res db ?
.code
@abrarShariar
abrarShariar / inter_convert_letters.asm
Created February 12, 2016 18:28
inter conversion between capital and small letters (show 0 if invalid letter)
;inter conversion between capital and small letters (show 0 if invalid letter)
.model small
.stack 100h
.data
input db ?
.code
main proc
@abrarShariar
abrarShariar / vowel_or_not.asm
Created February 12, 2016 22:23
input char and check for vowel. Print 1 for vowel 0 otherwise
;input char and check for vowel. Print 1 for vowel 0 otherwise
.model small
.stack 100h
.data
char db ?
vow db 30h
.code
main proc
@abrarShariar
abrarShariar / vowel_count.asm
Last active February 12, 2016 22:49
input char array. Count the number of vowels
;input char array. Count the number of vowels
.model small
.stack 100h
.data
vow db 30h
txt db 'Vowels: $'
.code
main proc
mov ax,@data
@abrarShariar
abrarShariar / aggregate.sql
Created February 17, 2016 07:27
solution to aggregate functions
Aggregate Function
1. Find the maximum,minimum, average salary and also the number of employees assigned to department 20.
>> select max(sal),min(sal),avg(sal),count(empno) from emp where deptno=20;
2. Find the maximum,minimum, average salary and also the number of employees employed under designation ‘Salesman’.
>> select max(sal),min(sal),avg(sal),count(empno) from emp group by job having job='SALESMAN';
@abrarShariar
abrarShariar / prompt.js
Created February 20, 2016 09:20
script using prompt in JavaScript
var person=prompt("Please enter your name: ");
if(person==null || person==""){
document.write("WTF !! Where is your name ??");
}else{
document.write("Hello "+person);
}
@abrarShariar
abrarShariar / twoDigit_sum.asm
Created February 24, 2016 20:21
adding two digits to display a sum like (9+8=17)
.model small
.stack 100h
.data
txt1 db 'Enter two numbers: $'
txt2 db 'The sum of $'
txt3 db ' and $'
txt4 db ' is : $'
num1 db ?
num2 db ?