📄 guikeys.inc
字号:
je .noright
cmp al,77
jne .noright
.yesright
%else
cmp al,77
jne .noright
%endif
mov byte[GUICResetPos],1
.noright
cmp al,13
jne .noconf
cmp byte[GUICResetPos],0
je .yesreset
jmp .noreset
.noconf
cmp dh,'Y'
je .yesreset
cmp dh,'y'
jne .notyesreset
.yesreset
mov byte[GUICBHold],2
jmp GUIProcReset
.notyesreset
cmp dh,'N'
je .noreset
cmp dh,'n'
jne .notnoreset
.noreset
xor eax,eax
mov al,[GUIwinptr]
dec eax
mov byte[GUIwinactiv+12],0
mov byte[GUIwinorder+eax],0
dec byte[GUIwinptr]
mov al,[GUIpmenupos]
mov [GUIcmenupos],al
.notnoreset
ret
GUIStateKeys:
%ifdef __LINUX__
cmp al,92
je .yesleft
cmp dword[numlockptr],1
je .noleft
cmp al,75
jne .noleft
.yesleft
%else
cmp al,75
jne .noleft
%endif
mov byte[GUICStatePos],0
.noleft
%ifdef __LINUX__
cmp al,94
je .yesright
cmp dword[numlockptr],1
je .noright
cmp al,77
jne .noright
.yesright
%else
cmp al,77
jne .noright
%endif
mov byte[GUICStatePos],1
.noright
cmp al,13
jne .noconf
cmp byte[GUICStatePos],0
je .yesreset
jmp .noreset
.noconf
cmp dh,'Y'
je .yesreset
cmp dh,'y'
jne .notyesreset
.yesreset
mov byte[GUICBHold],10
jmp GUIProcStates
.notyesreset
cmp dh,'N'
je .noreset
cmp dh,'n'
jne .notnoreset
.noreset
xor eax,eax
mov al,[GUIwinptr]
dec eax
mov byte[GUIwinactiv+14],0
mov byte[GUIwinorder+eax],0
dec byte[GUIwinptr]
mov al,[GUIpmenupos]
mov [GUIcmenupos],al
.notnoreset
ret
GUILoadKeys:
mov byte[ManualStatus],0
mov dword[ManualCPtr],GUILoadTextA
cmp dword[GUIfileentries],0
je .noright
cmp dword[GUIdirentries],0
je .noright
%ifdef __LINUX__
cmp al,92
je .yesleft
cmp dword[numlockptr],1
je .noleft
cmp al,75
jne .noleft
.yesleft
%else
cmp al,75
jne .noleft
%endif
mov byte[GUILoadPos],0
xor dword[GUIcurrentfilewin],1
.noleft
%ifdef __LINUX__
cmp al,94
je .yesright
cmp dword[numlockptr],1
je .noright
cmp al,77
jne .noright
.yesright
%else
cmp al,77
jne .noright
%endif
mov byte[GUILoadPos],0
xor dword[GUIcurrentfilewin],1
.noright
cmp al,13
jne .noenter
mov byte[GUILoadPos],0
mov ebx,GUILoadTextA
.nextl
cmp byte[ebx],':'
je .donel
%ifdef __LINUX__
cmp byte[ebx],'/'
%else
cmp byte[ebx],'\'
%endif
je .donel
inc ebx
cmp byte[ebx],0
je .nofnamel
jmp .nextl
.donel
call GUILoadManualDir
cmp byte[ManualStatus],2
je near .done
ret
.nofnamel
mov ebx,GUILoadTextA
cmp byte[ebx],0
je .nodirtry
mov edx,ebx
call Change_Single_Dir
jc .nodirtry
call GetLoadData.a
ret
.nodirtry
call GUILoadData
ret
.noenter
cmp dword[GUIcurrentfilewin],1
je near .dirwin
%ifdef __LINUX__
cmp al,89
je .yeshome
cmp dword[numlockptr],1
je .nohome
cmp al,71
jne .nohome
.yeshome
%else
cmp al,71
jne .nohome
%endif
mov byte[GUILoadPos],0
mov dword[GUIcurrentcursloc],0
mov dword[GUIcurrentviewloc],0
ret
.nohome
%ifdef __LINUX__
cmp al,95
je .yesendp
cmp dword[numlockptr],1
je .noendp
cmp al,79
jne .noendp
.yesendp
%else
cmp al,79
jne .noendp
%endif
mov byte[GUILoadPos],0
mov eax,[GUIfileentries]
dec eax
mov dword[GUIcurrentcursloc],eax
sub eax,14
mov dword[GUIcurrentviewloc],eax
test dword[GUIcurrentviewloc],8000000h
jz .posve
mov dword[GUIcurrentviewloc],0
.posve
ret
.noendp
%ifdef __LINUX__
cmp al,90
je .up
cmp dword[numlockptr],1
je .noup
cmp al,72
jne .noup
%else
cmp al,72
jne .noup
%endif
.up
mov byte[GUILoadPos],0
cmp dword[GUIcurrentcursloc],0
je .noup
mov ebx,[GUIcurrentcursloc]
cmp [GUIcurrentviewloc],ebx
jne .noviewdec
dec dword[GUIcurrentviewloc]
.noviewdec
dec dword[GUIcurrentcursloc]
.noup
%ifdef __LINUX__
cmp al,96
je .yesdown
cmp dword[numlockptr],1
je .nodown
cmp al,80
jne .nodown
.yesdown
%else
cmp al,80
jne .nodown
%endif
mov byte[GUILoadPos],0
mov ebx,[GUIcurrentcursloc]
inc ebx
cmp ebx,[GUIfileentries]
je .noviewinc
inc dword[GUIcurrentcursloc]
sub ebx,15
cmp ebx,[GUIcurrentviewloc]
jne .noviewinc
inc dword[GUIcurrentviewloc]
.noviewinc
.nodown
%ifdef __LINUX__
cmp al,91
je .yespageup
cmp dword[numlockptr],1
je .nopageup
cmp al,73
jne .nopageup
.yespageup
%else
cmp al,73
jne .nopageup
%endif
mov byte[GUILoadPos],0
sub dword[GUIcurrentviewloc],15
sub dword[GUIcurrentcursloc],15
test dword[GUIcurrentviewloc],8000000h
jz .posv
mov dword[GUIcurrentviewloc],0
.posv
test dword[GUIcurrentcursloc],8000000h
jz .posc
mov dword[GUIcurrentcursloc],0
.posc
.nopageup
%ifdef __LINUX__
cmp al,97
je .yespagedn
cmp dword[numlockptr],1
je .nopagedown
cmp al,81
jne .nopagedown
.yespagedn
%else
cmp al,81
jne .nopagedown
%endif
mov byte[GUILoadPos],0
add dword[GUIcurrentviewloc],15
add dword[GUIcurrentcursloc],15
mov ebx,[GUIfileentries]
dec ebx
cmp dword[GUIcurrentcursloc],ebx
jb .poscd
mov dword[GUIcurrentcursloc],ebx
.poscd
sub ebx,14
cmp dword[GUIcurrentviewloc],ebx
jl .posvd
test ebx,8000000h
jz .noneg
mov ebx,0
.noneg
mov dword[GUIcurrentviewloc],ebx
.posvd
.nopagedown
.textboxa
cmp byte[GUILoadPos],0
je near .nobacksp
cmp dh,8
jne .nobacksp
mov byte[GUILDFlash],0
dec byte[GUILoadPos]
xor eax,eax
mov al,[GUILoadPos]
ret
.nobacksp
cmp dh,0
je near .posvl2
cmp dh,13
je near .posvl2
cmp dh,8
je near .posvl2
cmp dh,9
je near .posvl2
cmp byte[GUILoadPos],36
je near .posvl2
mov byte[GUILDFlash],0
xor eax,eax
mov al,[GUILoadPos]
mov byte[GUILoadTextA+eax],dh
inc byte[GUILoadPos]
; Go to closest matching filename if there are no :, /, or \ in the filename
mov ebx,[ManualCPtr]
cmp byte[ebx],0
je near .posvl2
.next
cmp byte[ebx],':'
je near .posvl2
cmp byte[ebx],'/'
je near .posvl2
cmp byte[ebx],'\'
je near .posvl2
inc ebx
cmp byte[ebx],0
je .done
jmp .next
.done
mov ebx,[GUIfileentries]
xor esi,esi
cmp dword[GUIcurrentfilewin],1
jne near .notdir
mov esi,[GUIfileentries]
mov ebx,[GUIfileentries]
add ebx,[GUIdirentries]
.notdir
mov ecx,esi
mov dword[.foundval],esi
mov dword[.maxfound],0
.loop2
mov dword[.numfound],0
cmp byte[GUIloadfntype],0
jne .nottype02
mov eax,[spcRamcmp+esi*4]
jmp .type02
.nottype02
mov eax,esi
shl eax,5
add eax,[spcBuffera]
.type02
inc eax
mov edi,[ManualCPtr]
cmp byte[eax],'['
jne .nodrive
inc eax
.nodrive
.loop3
mov dl,[eax]
cmp dl,'a'
jb .nolowerb2
cmp dl,'z'
ja .nolowerb2
sub dl,'a'-'A'
.nolowerb2
mov dh,[edi]
cmp dh,'a'
jb .nolowerb3
cmp dh,'z'
ja .nolowerb3
sub dh,'a'-'A'
.nolowerb3
cmp dl,dh
jne .notfound
cmp byte[ManualStatus],2
jne .notfullload
or dh,dh
jnz .notfullload
or dl,dl
jnz .notfullload
mov byte[ManualStatus],3
.notfullload
or dh,dh
jz .notfound
or dl,dl
jz .notfound
inc dword[.numfound]
inc eax
inc edi
jmp .loop3
.notfound
mov edx,[.numfound]
cmp edx,[.maxfound]
jbe .nfound
mov [.maxfound],edx
mov [.foundval],esi
.nfound
inc esi
cmp esi,ebx
jne .noend2
mov esi,[GUIfileentries]
cmp dword[GUIcurrentfilewin],1
je .noend2
xor esi,esi
.noend2
cmp esi,ecx
jne near .loop2
.skipall
mov esi,[.foundval]
cmp dword[GUIcurrentfilewin],1
jne .notdir2
sub esi,[GUIfileentries]
mov [GUIcurrentdircursloc],esi
mov [GUIcurrentdirviewloc],esi
mov ebx,[GUIdirentries]
sub ebx,15
cmp dword[GUIcurrentdirviewloc],ebx
jb .posvl2
mov dword[GUIcurrentdirviewloc],ebx
jmp .posvl2
.notdir2
mov [GUIcurrentcursloc],esi
mov [GUIcurrentviewloc],esi
mov ebx,[GUIfileentries]
sub ebx,15
cmp dword[GUIcurrentviewloc],ebx
jb .posvl2
mov dword[GUIcurrentviewloc],ebx
.posvl2
cmp byte[ManualStatus],3
jne .notdirectload
call GUILoadData
.notdirectload
ret
.foundval dd 0
.numfound dd 0
.maxfound dd 0
.dirwin
%ifdef __LINUX__
cmp al,89
je .yeshome2
cmp dword[numlockptr],1
je .nohome2
cmp al,71
jne .nohome2
.yeshome2
%else
cmp al,71
jne .nohome2
%endif
mov byte[GUILoadPos],0
mov dword[GUIcurrentdircursloc],0
mov dword[GUIcurrentdirviewloc],0
ret
.nohome2
%ifdef __LINUX__
cmp al,95
je .yesendp2
cmp dword[numlockptr],1
je .noendp2
cmp al,79
jne .noendp2
.yesendp2
%else
cmp al,79
jne .noendp2
%endif
mov byte[GUILoadPos],0
mov eax,[GUIdirentries]
dec eax
mov dword[GUIcurrentdircursloc],eax
sub eax,14
mov dword[GUIcurrentdirviewloc],eax
test dword[GUIcurrentdirviewloc],8000000h
jz .posve2
mov dword[GUIcurrentdirviewloc],0
.posve2
ret
.noendp2
%ifdef __LINUX__
cmp al,90
je .yesup2
cmp dword[numlockptr],1
je .noup2
cmp al,72
jne .noup2
.yesup2
%else
cmp al,72
jne .noup2
%endif
mov byte[GUILoadPos],0
cmp dword[GUIcurrentdircursloc],0
je .noup2
mov ebx,[GUIcurrentdircursloc]
cmp [GUIcurrentdirviewloc],ebx
jne .noviewdec2
dec dword[GUIcurrentdirviewloc]
.noviewdec2
dec dword[GUIcurrentdircursloc]
.noup2
%ifdef __LINUX__
cmp al,96
je .yesdown2
cmp dword[numlockptr],1
je .nodown2
cmp al,80
jne .nodown2
.yesdown2
%else
cmp al,80
jne .nodown2
%endif
mov byte[GUILoadPos],0
mov ebx,[GUIcurrentdircursloc]
inc ebx
cmp ebx,[GUIdirentries]
je .noviewinc2
inc dword[GUIcurrentdircursloc]
sub ebx,15
cmp ebx,[GUIcurrentdirviewloc]
jne .noviewinc2
inc dword[GUIcurrentdirviewloc]
.noviewinc2
.nodown2
%ifdef __LINUX__
cmp al,91
je .yespgup2
cmp dword[numlockptr],1
je .nopageup2
cmp al,73
jne .nopageup2
.yespgup2
%else
cmp al,73
jne .nopageup2
%endif
mov byte[GUILoadPos],0
sub dword[GUIcurrentdirviewloc],15
sub dword[GUIcurrentdircursloc],15
test dword[GUIcurrentdirviewloc],8000000h
jz .posv2
mov dword[GUIcurrentdirviewloc],0
.posv2
test dword[GUIcurrentdircursloc],8000000h
jz .posc2
mov dword[GUIcurrentdircursloc],0
.posc2
.nopageup2
%ifdef __LINUX__
cmp al,97
je .yespgdn2
cmp dword[numlockptr],1
je .nopagedown2
cmp al,81
jne .nopagedown2
.yespgdn2
%else
cmp al,81
jne .nopagedown2
%endif
mov byte[GUILoadPos],0
add dword[GUIcurrentdirviewloc],15
add dword[GUIcurrentdircursloc],15
mov ebx,[GUIdirentries]
dec ebx
cmp dword[GUIcurrentdircursloc],ebx
jb .poscd2
mov dword[GUIcurrentdircursloc],ebx
.poscd2
sub ebx,14
cmp dword[GUIcurrentdirviewloc],ebx
jb .posvd2
test ebx,8000000h
jz .noneg2
mov ebx,0
.noneg2
mov dword[GUIcurrentdirviewloc],ebx
.posvd2
.nopagedown2
jmp .textboxa
WaitForKey:
.again3
mov edx,10
.again4
mov cx,1000
push edx
call delay
call JoyRead
; mov dword[pressed+0CCh],0 ; Up,Down,Left,Right, pl1
; mov dword[pressed+0E8h],0 ; Up,Down,Left,Right, pl2
; mov dword[pressed+14Ch],0 ; Up,Down,Left,Right, pl1
; mov dword[pressed+168h],0 ; Up,Down,Left,Right, pl2
; mov dword[pressed+080h],0 ; Button 7
; mov dword[pressed+081h],0 ; Button 8
; mov dword[pressed+086h],0 ; Button 5
; mov dword[pressed+087h],0 ; Button 6
; mov dword[pressed+100h],0 ; Button 7
; mov dword[pressed+101h],0 ; Button 8
; mov dword[pressed+106h],0 ; Button 5
; mov dword[pressed+107h],0 ; Button 6
pop edx
xor ebx,ebx
mov ecx,256+128+64
.b2
cmp byte[pressed+ebx],0
jne near .again3
inc ebx
loop .b2
dec edx
jnz near .again4
.again
call JoyRead
; mov dword[pressed+0CCh],0 ; Up,Down,Left,Right, pl1
; mov dword[pressed+0E8h],0 ; Up,Down,Left,Right, pl2
; mov dword[pressed+14Ch],0 ; Up,Down,Left,Right, pl1
; mov dword[pressed+168h],0 ; Up,Down,Left,Right, pl2
; mov dword[pressed+080h],0 ; Button 7
; mov dword[pressed+081h],0 ; Button 8
; mov dword[pressed+086h],0 ; Button 5
; mov dword[pressed+087h],0 ; Button 6
; mov dword[pressed+100h],0 ; Button 7
; mov dword[pressed+101h],0 ; Button 8
; mov dword[pressed+106h],0 ; Button 5
; mov dword[pressed+107h],0 ; Button 6
xor ebx,ebx
mov ecx,256+128+64
.b
cmp byte[pressed+ebx],0
jne .pressedokay
inc ebx
loop .b
jmp .again
.pressedokay
.again2
call Check_Key
or al,al
jz .nokey
call Get_Key
jmp .again2
.nokey
cmp byte[MouseDis],1
je .mousedis2
push ebx
; mov eax,0Bh
; int 33h
pop ebx
.mousedis2
mov byte[GUIpclicked],1
ret
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -