Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- data segment
- err db 'ERROR','$'
- data ends
- stack1 segment para stack
- dw 10h dup(0)
- stack1 ends
- codeseg segment
- start:
- assume cs:codeseg, ds:data, ss:stack1
- mov ax, data
- mov ds, ax
- mov ah, 01h
- int 21h
- sub al, 30h
- cmp al, 9
- jg error
- xor ch, ch
- mov cl, al
- jcxz done
- mov dl, '?'
- mov ah, 02h
- print:
- int 21h
- loop print
- done:
- mov ah, 4ch
- int 21h
- error:
- mov dx, offset err
- mov ah, 09h
- int 21h
- jmp done
- codeseg ends
- end start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement