📄 goto.asm
字号:
_GotoProc proto:DWORD ,:DWORD ,:DWORD ,:DWORD
_lpfnAllFindResult proto:DWORD ,:DWORD ,:DWORD ,:DWORD
_FindThread proto:DWORD
.data?
dwLastGoto dd ?
.data
szinfo_add db '添加当前地址到列表中',13,'以方便下次转到该地址',0
.code
;<<<<<<<<<<<<<<<<<<<<<<<<< 转换地址 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
_GotoProc proc @hDlg,uMsg,wParam,lParam
local @szBuf[255]
mov eax,uMsg
.if eax==WM_INITDIALOG
invoke SendDlgItemMessage,@hDlg,1002,BM_SETCHECK ,TRUE ,0;相对于文件头
invoke _CreateTip,@hDlg,1000,addr szinfo_add
.elseif eax==WM_COMMAND
mov eax,wParam
.if ax==IDOK
push esi
invoke GetDlgItemText,@hDlg,1001,addr @szBuf,255
invoke _GetInt,@hDlg,1001
mov esi,eax
__GetRadio 1002
.if eax
mov eax,esi ;从文件头开始(绝对位置)
.if dwFileType==FILE_RAM
mov esi,dwRamAddress
add esi,dwFileSize
dec esi
.if eax<dwRamAddress || eax>esi
invoke MessageBox,@hDlg,ctext("无法转移该地址"),addr szAppName,30h
pop esi
ret
.endif
sub eax,dwRamAddress
.endif
.else
__GetRadio 1004
.if eax
mov eax,dwFileSize;从文件尾开始(倒计)
sub eax,esi
dec eax
.else
__GetRadio 1005;向前移动
.if eax
mov eax,dwBlockStart
add eax,esi
.else
mov eax,dwBlockStart
sub eax,esi
.endif
.endif
.endif
pop esi
invoke _SetPos, eax
invoke _addItemIfNotExist,@hDlg,1001
.elseif ax==1000
mov eax,dwCurPos
.if isRam
add eax,dwRamAddress
.endif
invoke wsprintf,addr @szBuf,addr szFmHexD,eax
invoke SetDlgItemText,@hDlg,1001,addr @szBuf
invoke _addItemIfNotExist,@hDlg,1001
.endif
.elseif eax==WM_CLOSE
invoke ShowWindow,@hDlg,SW_HIDE
.else
xor eax,eax
ret
.endif
mov eax,TRUE
ret
_GotoProc endp
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -