Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- org 100h
- Start:
- mov ah, $09
- mov dx, Meeting
- int 21h
- mov ah, 0Ah
- mov dx, Input
- int 21h
- mov ah, $09
- mov dx, NewStr
- int 21h
- mov cl, [Input + 2]
- cmp cl, [Input + 4]
- jne False
- mov cl, [Input + 1]
- cmp cl, 4
- jl False
- cmp cl, 7
- jg False
- mov dl, [Input + 1]
- mov dh, 0
- mov di, dx
- mov cl, [Input + 1 + di]
- cmp cl, 41h
- jl False
- cmp cl, 5Ah
- jg False
- mov ch, [Input + 2]
- cmp ch, 48
- jl False
- cmp ch, 57
- jg False
- jmp True
- Meeting:
- db "Program checks your string by some static parametrs.", 10, 13, 'Enter a string:', 10, 13, '$'
- NewStr:
- db 10, 13, '$'
- Input:
- db 8, 0, 10 dup(?), '$' ; 8 = 7 ìàêñ äëèíà
- True:
- mov ah, 09h
- mov dx, MSGYES
- int 21h
- jmp Final
- False:
- mov ah, 09h
- mov dx, MSGNO
- int 21h
- jmp Final
- MSGNO:
- db 'InCorrect$'
- MSGYES:
- db 'Correct$'
- Final:
- mov ah, 08h
- int 21h
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement