Advertisement
madmaxhasan

Double Digit MUL

Apr 7th, 2018
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .MODEL SMALL
  2. .STACK 100
  3.  
  4. .DATA
  5.    
  6.     N1 DB ?
  7.     N2 DB ?
  8.     N3 DB ?
  9.     M1 DB "ENTER 1ST NUMBER: $"
  10.     M2 DB 10,13, "ENTER 2ND NUMBER: $"
  11.     M3 DB 10,13, "MULTIPLICATION: $"
  12.    
  13. .CODE
  14.  
  15. JOY PROC
  16.    
  17.     MOV AX, @DATA
  18.     MOV DS, AX
  19.    
  20.     LEA DX, M1
  21.     MOV AH, 9
  22.     INT 21H
  23.    
  24.     MOV AH, 1
  25.     INT 21H
  26.     SUB AL, 30H
  27.     MOV N1, AL
  28.    
  29.     LEA DX, M2
  30.     MOV AH, 9
  31.     INT 21H
  32.    
  33.     MOV AH, 1
  34.     INT 21H
  35.     SUB AL, 30H
  36.     MOV N2, AL
  37.    
  38.     MUL AL
  39.    
  40.     MOV N3, AL
  41.     AAM
  42.    
  43.     ADD AH, 30H
  44.     ADD AL, 30H
  45.    
  46.     MOV BX, AX
  47.    
  48.     LEA DX, M3
  49.     MOV AH, 9
  50.     INT 21H
  51.    
  52.     MOV AH, 2
  53.     MOV DL, BH
  54.     INT 21H
  55.              
  56.     MOV AH, 2          
  57.     MOV DL, BL
  58.     INT 21H
  59.    
  60.     MOV AH, 4CH
  61.     INT 21H
  62.    
  63. JOY ENDP
  64. END JOY
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement