Guest User

Untitled

a guest
Dec 17th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. ; Written by Zaid, December 14th, 2017.
  2. ; Enables the user to enter a 3-digit number, result saved in variable R.
  3.  
  4. .MODEL SMALL
  5. .DATA
  6. R DW ?
  7. msg DB "Please Entere a 3-Digit Number: $"
  8.  
  9. .CODE
  10. .STARTUP
  11.  
  12. MOV AH, 9
  13. MOV DX, OFFSET msg
  14. INT 21h
  15.  
  16. MOV AH, 1
  17. INT 21h
  18. SUB AL, 30h
  19. MOV BL, 100
  20. MUL BL
  21. MOV R, AX
  22.  
  23.  
  24.  
  25. MOV AH, 1
  26. INT 21h
  27. SUB AL, 30h
  28. MOV BL, 10
  29. MUL BL
  30. ADD R, AX
  31.  
  32.  
  33. MOV AH, 1
  34. INT 21h
  35. SUB AL, 30h
  36. MOV AH, 00
  37. ADD R, AX
  38.  
  39. END
Add Comment
Please, Sign In to add comment