Datas segment
Buf db 10 dup(0)
Input db 'please input x(0-7):$'
X db ?
wrong db 0ah,0dh,'please input again!!',0ah,0dh,'$'
Datas ends
Stacks segment
dd 100 dup(0)
Stacks ends
Codes segment
assume cs:codes,ds:datas,ss:stacks
Start:
mov ax,datas
mov ds,ax
mov dx,offset input
mov ah,09h
int 21h
mov ah,01h
int 21h
cmp al,30h
jb error
cmp al,37h
ja error
sub al,30h
mov bl,al
mov ax,01h
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余1页未读,立即下载