Advertisement
dxvmxnd

Untitled

Mar 30th, 2024
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. org 100h
  2. Start:
  3. mov ah, $09
  4. mov dx, strHelloUser
  5. int 21h
  6.  
  7. Input:
  8. mov ah, $0A
  9. mov dx, bufInput
  10. int 21h
  11.  
  12. OutputBeforeChange:
  13. mov ah, $09
  14. mov dx, bufInput + 2
  15. int 21h
  16.  
  17. ProcessOnResult:
  18. mov cl, [bufInput + 1]
  19. cmp cl, 4
  20. jnge OutputLenghtBad
  21.  
  22. mov al, [bufInput + 2 + 1]
  23. mov bl, [bufInput + 3 + 1]
  24. cmp al, bl
  25. jne OutputNo
  26.  
  27. mov al, [bufInput + 3 + 1]
  28. cmp al, 65
  29. jnge OutputNo
  30. cmp al, 90
  31. jnle OutputNo
  32.  
  33. xor bh, bh
  34. mov bl, [bufInput + 1]
  35. sub bl, 2
  36. cmp [bufInput + bx], 65
  37. jnge OutputNo
  38. cmp [bufInput + bx], 90
  39. jnle OutputNo
  40.  
  41. OutputYes:
  42. mov ah, $09
  43. mov dx, strYes
  44. int 21h
  45. jmp AvaitingClose
  46.  
  47. OutputNo:
  48. mov ah, $09
  49. mov dx, strNo
  50. int 21h
  51. jmp AvaitingClose
  52.  
  53. OutputLenghtBad:
  54. mov ah, $09
  55. mov dx, strLenghtBad
  56. int 21h
  57. jmp AvaitingClose
  58.  
  59. AvaitingClose:
  60. mov ah, $09
  61. mov dx, strClose
  62. int 21h
  63.  
  64. mov ah, $08
  65. int 21h
  66. ret
  67.  
  68. strHelloUser db 'Please, enter your string:',13,10,36
  69. bufInput db 8, 0, 8 dup(7),13,10,36
  70. strLenghtBad db 'Lenght...',13,10,36
  71. strNo db 'Incorrect',13,10,36
  72. strYes db 'Correct',13,10,36
  73. strClose db 'Press any key to close programm... $'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement