📄 prog6_9.asm
字号:
stack segment para stack 'stack'
db 256 dup(?)
stack ends
data segment
str db 'please input 1,2,3,4:','$'
str1 db 'branch1','$'
str2 db 'branch2','$'
str3 db 'branch3','$'
str4 db 'branch4','$'
err db 'error','$'
data ends
code segment
assume cs:code,ds:data,ss:stack
start:mov ax,data
mov ds,ax
begin:;mov dx,seg str
;mov ds,dx
mov dx,offset str
mov ah,9h
int 21h
mov ah,01h
int 21h
cmp al,31h
je a1
cmp al,32h
je a2
cmp al,33h
je a3
cmp al,34h
je a4
mov dx,offset err
mov ah,9
int 21h
jmp finish
a1:mov dl,0dh
mov ah,2
int 21h
mov dl,0ah
int 21h
mov dx,offset str1
mov ah,9
int 21h
jmp enter
a2:mov dx,offset str2
mov ah,9
int 21h
jmp enter
a3:mov dx,offset str3
mov ah,9
int 21h
jmp enter
a4:mov dx,offset str4
mov ah,9
int 21h
enter:mov dl,0dh
mov ah,2
int 21h
mov dl,0ah
int 21h
jmp begin
finish:mov ah,4ch
int 21h
code ends
end start
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -