?? 524.asm
字號:
;524.asm
datasg segment
branch_table dw song_1
dw song_2
dw song_3
dw song_4
dw song_5
datasg ends
codesg segment
main proc far
assume cs:codesg, ds:datasg
start:
push ds
sub ax,ax
push ax
mov ax,datasg
mov ds,ax
input: mov ah,1
int 21h
sub al,30h
cmp al,1
jl exit
cmp al,5
jg exit
sub al,1
mov bl,2
mul bl
mov si,ax
jmp word ptr branch_table[si]
song_1: mov cx,1
loop1: mov dl,07h
mov ah,2
int 21h
loop loop1
jmp short exit
song_2: mov cx,2
loop2: mov dl,07h
mov ah,2
int 21h
loop loop2
jmp short exit
song_3: mov cx,3
loop3: mov dl,07h
mov ah,2
int 21h
loop loop3
jmp short exit
song_4: mov cx,4
loop4: mov dl,07h
mov ah,2
int 21h
loop loop4
jmp short exit
song_5: mov cx,5
loop5: mov dl,07h
mov ah,2
int 21h
loop loop5
exit: ret
main endp
codesg ends
end start
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -