Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. ;Write a program which computes the following expression: (yy+h)-m-(d+d)
  2. ASSUME cs: code, ds:data
  3.  
  4. data SEGMENT
  5. m db 34
  6. h dw 120
  7. yy dw 137
  8. d db -2
  9. ans dw ?
  10. data ENDS
  11. code SEGMENT
  12. start:
  13. mov ax,data
  14. mov ds,ax
  15. mov bl,h
  16. mov bh,0 ;bx=h
  17. add bx,yy
  18. mov bl,m
  19. cbw ;bx=m
  20. sub bx,bl
  21. mov al,d
  22. cbw ;ax=d
  23. add ax,ax
  24. sub bx,ax
  25. mov ans,bx
  26. mov ax,4C00h
  27. int 21h
  28. code ENDS
  29. END start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement