[Assembly] Enter 1 character test of whether or not there is Assembly
Problem checking input characters with the number or not.
.model small .stack 100 .data input db 'Nhap vao mot ky tu: $' no db ' Khong phai so$' yes db ' La so$' CLRF db 13,10,'$' .code main proc mov ax, @data mov ds, ax nhap: mov ah, 9 lea dx, input int 21h mov ah, 1 ; nhap ky tu tiep: int 21h cmp al, 30h ; so sanh ky tu vua nhap vao voi 30h je thoat ; neu la so 0 thi thoat cmp al, 30h jb sai ; neu nho hon thi nhay den nhan sai cmp al, 39h jg sai ; neu lon hon thi nhay den sai jmp dung ; nhay vo dieu kien den tiep sai: mov ah, 9 lea dx, no int 21h mov AH,9 lea DX,CLRF int 21H jmp nhap dung: mov ah, 9 lea dx, yes int 21h mov AH,9 lea DX,CLRF int 21H jmp nhap thoat: mov ah, 9 lea dx, yes int 21h mov ah, 4ch int 21h main endp end main
let me ask how to check the string s2 in string s1 is not how ? 2 strings input from the keyboard
This code is also his assembly…
You handle the problem of finding the string yet ? its also suffering from this article