Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- org 100h
- .code
- getInput PROC
- MP_input:
- mov ah, 01h
- int 21h
- ; Esco dal programma alla pressione dell'invio
- cmp al, 0dh
- je MP_fine
- ; ASCII -> NUMERO
- sub al, 30h
- ; AH = 0 poiche uso AX come fosse AL
- mov ah, 0
- mov number, ax
- mov al, 10
- ;AX = newNum * 10
- mul newNum
- add ax, number
- mov newNum, ax
- jmp MP_input
- MP_fine:
- mov ax, newNum
- ret
- newNum dw ?
- number dw ?
- getInput ENDP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement