Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- org 100h
- Start:
- mov ah, $09
- mov dx, strHelloUser
- int 21h
- Input:
- mov ah, $0A
- mov dx, bufInput
- int 21h
- OutputBeforeChange:
- mov ah, $09
- mov dx, bufInput + 2
- int 21h
- ProcessOnResult:
- mov cl, [bufInput + 1]
- cmp cl, 4
- jnge OutputLenghtBad
- mov al, [bufInput + 2 + 1]
- mov bl, [bufInput + 3 + 1]
- cmp al, bl
- jne OutputNo
- mov al, [bufInput + 3 + 1]
- cmp al, 65
- jnge OutputNo
- cmp al, 90
- jnle OutputNo
- xor bh, bh
- mov bl, [bufInput + 1]
- sub bl, 2
- cmp [bufInput + bx], 65
- jnge OutputNo
- cmp [bufInput + bx], 90
- jnle OutputNo
- OutputYes:
- mov ah, $09
- mov dx, strYes
- int 21h
- jmp AvaitingClose
- OutputNo:
- mov ah, $09
- mov dx, strNo
- int 21h
- jmp AvaitingClose
- OutputLenghtBad:
- mov ah, $09
- mov dx, strLenghtBad
- int 21h
- jmp AvaitingClose
- AvaitingClose:
- mov ah, $09
- mov dx, strClose
- int 21h
- mov ah, $08
- int 21h
- ret
- strHelloUser db 'Please, enter your string:',13,10,36
- bufInput db 8, 0, 8 dup(7),13,10,36
- strLenghtBad db 'Lenght...',13,10,36
- strNo db 'Incorrect',13,10,36
- strYes db 'Correct',13,10,36
- strClose db 'Press any key to close programm... $'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement