;PROGRAM TO PERFORM ARITHMETIC OPERATIONS
data segment
opr1 dw 1234h
opr2 dw 1342h
sum dw 2 dup(0)
subt dw 2 dup(0)
mult dw 2 dup(0)
divi dw 2 dup(0)
data ends
code segment
assume cs:code,ds:data
start:
mov ax,data
mov ds,ax
mov ax,opr1
mov bx,opr2
add ax,bx
mov sum,ax
jnc next
inc [sum+2]
next:mov ax,opr1
sub ax,bx
mov subt,ax
jnc jump
inc[subt+2]
jump:mov ax,opr1
mul bx
mov mult,ax
mov [mult+2],dx
mov ax,opr1
cwd
div bx
mov divi,ax
mov [divi+2],dx
int 3
code ends
end start
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment