Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. data segment
  2. err db 'ERROR','$'
  3. data ends
  4.  
  5. stack1 segment para stack
  6. dw 10h dup(0)
  7. stack1 ends
  8.  
  9. codeseg segment
  10. start:
  11. assume cs:codeseg, ds:data, ss:stack1
  12. mov ax, data
  13. mov ds, ax
  14.  
  15. mov ah, 01h
  16. int 21h
  17. sub al, 30h
  18. cmp al, 9
  19. jg error
  20. xor ch, ch
  21. mov cl, al
  22. jcxz done
  23. mov dl, '?'
  24. mov ah, 02h
  25. print:
  26. int 21h
  27. loop print
  28. done:
  29. mov ah, 4ch
  30. int 21h
  31.  
  32. error:
  33. mov dx, offset err
  34. mov ah, 09h
  35. int 21h
  36. jmp done
  37.  
  38. codeseg ends
  39. end start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement