Advertisement
Domerk

Masm, laba1

Oct 19th, 2013
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. .model small
  2.  
  3. .stack 256h
  4.  
  5. .data
  6. x1 dw 10
  7. x2 dw -420
  8. x3 dw 462
  9. x4 dw -42
  10.  
  11. result1 dw 0
  12. result2 dw 0
  13. result3 dw 0
  14. result4 dw 0
  15.  
  16. .code
  17.  
  18. main proc
  19.  
  20. mov ax, @data
  21. mov ds, ax
  22.  
  23. push x1
  24.  
  25. mov ax, x2
  26. imul ax, x4
  27.  
  28. mov result1, ax
  29.  
  30. mov ax, x3
  31. sub ax, x1
  32.  
  33. mov result2, ax
  34.  
  35. mov ax, x3
  36. shl ax, 8
  37.  
  38. mov result3, ax
  39.  
  40. mov ax, x2
  41. xor ax, x3
  42.  
  43. mov result4, ax
  44.  
  45. mov ax, 4c00h
  46. int 21h
  47.  
  48. main endp
  49. end main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement