Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include 'emu8086.inc'
- org 100h
- gotoxy 13,1
- print 'This program performs the arithmetic operation below:', 0
- gotoxy 27,3
- print '(A + B) * (C - D) + E', 0
- gotoxy 35, 5
- print 'A = ', 0
- gotoxy 39, 5
- call scan_num
- mov n1, cx
- gotoxy 35, 6
- print 'B = ', 0
- gotoxy 39, 6
- call scan_num
- add cx, n1
- mov n1, cx
- gotoxy 35, 7
- print 'C = ', 0
- gotoxy 39, 7
- call scan_num
- mov n2, cx
- gotoxy 35, 8
- print 'D = ', 0
- gotoxy 39, 8
- call scan_num
- sub n2, cx
- mov ax, n1
- mul n2
- gotoxy 35, 9
- print 'E = ', 0
- gotoxy 39, 9
- call scan_num
- add ax, cx
- gotoxy 15, 11
- print 'The result is: ', 0
- gotoxy 30, 11
- call print_num
- int 20h
- 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