📄 interface.asm
字号:
poscur 3,3
show file_1
poscur 4,3
show file_2
poscur 5,3
show file_3
poscur 6,3
show file_4
poscur 7,3
show file_5
poscur 8,3
show file_6
;to*为当前选中项*的处理分支
tonew:
win 7,4,7,14,79h ;
poscur 7,3
show file_5
win 4,4,4,14,79h
poscur 4,3
show file_2
win 3,4,3,14,67h
poscur 3,3
show file_1
showM mess7
GEtchar
CMP AH,50h ;若按下键下方向键
JZ toOpen
CMP AH,48H
JZ toexit1
CMP AH,1ch ;若按了Enter键
JZ NEwfile1
JMP exitfile ;其他就返回
toexit1: JMP toexit
NEwfile1: JMP NEwfile
toOpen:
win 3,4,3,14,79h
poscur 3,3
show file_1
win 5,4,5,14,saveActive
poscur 5,3
show file_3
win 4,4,4,14,67h
poscur 4,3
show file_2
showM mess8
GEtchar
CMP AH,50h
JZ toSave
CMP AH,48H
JZ tonew1
JMP tonew3
tonew1: JMP tonew
tonew3:
CMP AH,1ch
JZ openfile1
JMP exitfile
openfile1: JMP openfile
toSave:
win 4,4,4,14,79h
poscur 4,3
show file_2
win 6,4,6,14,saveActive
poscur 6,3
show file_4
win 5,4,5,14,67h
poscur 5,3
show file_3
showM mess9
GEtchar
CMP AH,50h
JZ toSaveas
CMP AH,48H
JZ toOpen1
JMP toopen3
toopen1: JMP toopen
toopen3: CMP AH,1ch
JZ savefile1
JMP exitfile
savefile1: JMP savefile
toSaveas:
win 5,4,5,14,saveActive
poscur 5,3
show file_3
win 7,4,7,14,79h
poscur 7,3
show file_5
win 6,4,6,14,67h
poscur 6,3
show file_4
showM mess10
GEtchar
CMP AH,50h
JZ toExit
CMP AH,48h
JZ tosave1
JMP tosave3
tosave1: JMP tosave
tosave3: CMP AH,1ch
JZ saveasfile1
JMP exitfile
saveasfile1: JMP saveasfile
tosaveas1: JMP tosaveas
toExit:
win 6,4,6,14,saveActive
poscur 6,3
show file_4
win 3,4,3,14,79h
poscur 3,3
show file_1
win 7,4,7,14,67h
poscur 7,3
show file_5
showM mess11
GEtchar
CMP AH,50h
JZ tonew2
JMP tonew4
tonew2: JMP tonew
tonew4: CMP AH,48h
JZ tosaveas3
CMP AH,1ch
JZ EXITMusic
JMP exitfile
tosaveas3: JMP tosaveas1
;****处理不同的分支所调用的不同的函数.****/
NEwfile:
CALL filenew
JMP exitfile
;播放完毕跳到初始位置
openfile:
CALL fileopen
JMP exitfile
savefile:
CALL filesave
JMP exitfile
saveasfile:
CALL filesaveas
JMP exitfile
EXITMusic : CMP modifyFlag,0
JNZ exitfile20
CALL IFsave
JMP exitMusic
exitfile20: MOV AX,4C00h
INT 21h
exitfile:
CALL menuHide
CALL BackDisplay
recover
poscur row,column
RET
showmenuF ENDP
;************************************
;显示文件菜单
;先保存视频缓冲区的内容 ,再获取键盘输入,按照输入跳到不同的分支,
;每个分支都调用相应的函数来处理.
;to*为当前选中项*的处理分支
;to*&,其中&是数字,为了解决汇编中的一些跳转指令分几次跳的问题,
showMenuP PROC
saveE
CALL savedisplay
win 0,16,0,25,07h
poscur 0,0
show str_menu
win 2,16,7,27,79h ;菜单不选中的颜色(白底黑字)
win 8,17,8,28,07h ;菜单的阴影
win 2,28,8,28,07h ;菜单的阴影
poscur 2,16
show play_0
poscur 3,16
show play_1
poscur 4,16
show play_2
poscur 5,16
show play_3
poscur 6,16
show play_4
poscur 7,16
show play_5
tomusic1:
win 4,17,4,26,79h
poscur 4,16
show play_2
win 6,17,6,26,79h
poscur 6,16
show play_4
win 3,17,3,26,67h
poscur 3,16
show play_1
GEtchar
CMP AH,50h ;若按下键下方向键
JZ tomusic2
CMP AH,48h
JZ togun1
CMP AH,1ch ;若按了Enter键
JZ pmusic11
JMP pexit
togun1: JMP togun
tomusic11: JMP tomusic1
pmusic11: JMP pmusic1
tomusic2:
win 3,17,3,26,79h
poscur 3,16
show play_1
win 5,17,5,26,79h
poscur 5,16
show play_3
win 4,17,4,26,67h
poscur 4,16
show play_2
GEtchar
CMP AH,50h
JZ toscale
CMP AH,48h
JZ tomusic11
CMP AH,1ch
JZ pmusic21
JMP pexit
tomusic21: JMP tomusic2
pmusic21: JMP pmusic2
toscale:
win 4,17,4,26,79h
poscur 4,16
show play_2
win 6,17,6,26,79h
poscur 6,16
show play_4
win 5,17,5,26,67h
poscur 5,16
show play_3
GEtchar
CMP AH,50h
JZ togun
CMP AH,48h
JZ tomusic21
CMP AH,1ch
JZ pscale1
JMP pexit
pscale1: JMP pscale
tomusic12: JMP tomusic1
toscale1: JMP toscale
togun:
win 5,17,5,26,79h
poscur 5,16
show play_3
win 3,17,3,26,79h
poscur 3,16
show play_1
win 6,17,6,26,67h
poscur 6,16
show play_4
GEtchar
CMP AH,50h
JZ tomusic12
CMP AH,48h
JZ toscale1
CMP AH,1ch
JZ pgun
JMP pexit
;****处理不同的分支所调用的不同的函数.****/
pmusic1:
CALL music1play
JMP pexit
pmusic2:
CALL music2play
JMP pexit
pscale:
CALL scaleplay
JMP pexit
pgun:
CALL gunplay
JMP pexit
pexit: CALL menuHide
CALL BackDisplay
poscur row,column
recover
RET
showMenuP ENDP
showMenuE PROC
saveE
CALL savedisplay
CMP copyFlag,0
JZ NOTactiveC
MOV copyActive,79h
JMP activeOKC
notactiveC:
MOV CopyActive,78h
activeOKC:
CMP PasteFlag,0
JZ NOTactiveP
MOV PasteActive,79h
JMP activeOKP
notactiveP:
MOV PasteActive,78h
activeOKP:
win 0,31,0,40,07h
poscur 0,0
show str_menu
win 2,31,6,42,78h ;菜单不选中的颜色(白底黑字)
win 7,32,7,43,07h ;菜单的阴影
win 2,43,7,43,07h ;菜单的阴影
poscur 2,31
show Edit_0
poscur 3,31
show Edit_1
poscur 4,31
show Edit_2
poscur 5,31
show Edit_3
poscur 6,31
show Edit_4
toCopy:
win 4,32,4,41,copyActive
poscur 4,31
show Edit_2
win 5,32,5,41,pasteActive
poscur 5,31
show Edit_3
win 3,32,3,41,67h
poscur 3,31
show Edit_1
showM mess21
GEtchar
CMP AH,50h ;若按下键下方向键
JZ toCut
CMP AH,48h
JZ toPaste1
CMP AH,1ch ;若按了Enter键
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -