我一直在比较固定字符串和输入字符串。但是很难弄清楚输入的寄存器是什么,是它al
还是ah
什么。我只是一个初学者,这对程序员来说是一种痛苦的语言,哈哈。请帮助我真的很感激谢谢:)
mov dx, offset temp ;string input
mov ah, 0ah
int 21h
mov bl, "a" ;condition
cmp al, bl
jne aw
mov dx, offset msgTrue ;true
mov ah, 09
int 21h
aw: ;false
mov dx, offset msgFalse
mov ah, 09
int 21h
ret
msg db 10, 13, " * ************************************ *****$"
msg1 db 10, 13, " *** * Ticketing System * ***$"
msg2 db 10, 13, " ***** ************************************ *$"
msg3 db 10, 13, " ==========================$"
msg4 db 10, 13, " = (a)Land =$"
msg5 db 10, 13, " = (b)Water =$"
msg6 db 10, 13, " = (c)Air =$"
msg7 db 10, 13, " ==========================$"
msg8 db 10, 13, " Choose Travel Type: $"
temp db 2, 0, 3 dup("$")
msgTrue db 10, 13, " You selected Land$"
msgFalse db 10, 13, " Invalid Input$"