Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include 'emu8086.inc'
- org 100h
- print 'Enter first number: ', 0
- call scan_num
- mov n1, cx
- gotoxy 0,1
- print 'Enter second number: ', 0
- call scan_num
- mov n2, cx
- mov ax, n1
- add ax, n2
- gotoxy 0,2
- print 'Sum: ', 0
- call print_num
- mov ax, n1
- sub ax, n2
- gotoxy 0,3
- print 'Difference: ', 0
- call print_num
- mov ax, n1
- mul n2
- gotoxy 0,4
- print 'Product: ', 0
- call print_num
- mov ax, n1
- div n2
- gotoxy 0,5
- print 'Quotient: ', 0
- call print_num
- mov dx, ax
- gotoxy 0,6
- print 'Remainder: ', 0
- call print_num
- int 20h
- ret
- n1 dw ?
- n2 dw ?
- define_print_num
- define_print_num_uns
- define_scan_num
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement