Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Write a program which computes the following expression: (yy+h)-m-(d+d)
- ASSUME cs: code, ds:data
- data SEGMENT
- m db 34
- h dw 120
- yy dw 137
- d db -2
- ans dw ?
- data ENDS
- code SEGMENT
- start:
- mov ax,data
- mov ds,ax
- mov bl,h
- mov bh,0 ;bx=h
- add bx,yy
- mov bl,m
- cbw ;bx=m
- sub bx,bl
- mov al,d
- cbw ;ax=d
- add ax,ax
- sub bx,ax
- mov ans,bx
- mov ax,4C00h
- int 21h
- code ENDS
- END start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement