📄 jmptable.asm
字号:
comment * -------------------------------------------------------
This is an example of how to use the jump table tool
"tproc.exe". With this method you can have a very large
number of choices that are selected by a single DWORD
value. It is a high speed automated method that is far
faster than sequentially testing the number to determine
where to branch to for the specific data.
------------------------------------------------------- *
.486 ; create 32 bit code
.model flat, stdcall ; 32 bit memory model
option casemap :none ; case sensitive
; include files
; ~~~~~~~~~~~~~
include \masm32\include\windows.inc
include \masm32\include\masm32.inc
include \masm32\include\gdi32.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
include \masm32\include\Comctl32.inc
include \masm32\include\comdlg32.inc
include \masm32\include\shell32.inc
include \masm32\include\oleaut32.inc
include \masm32\include\dialogs.inc
include \masm32\macros\macros.asm
; libraries
; ~~~~~~~~~
includelib \masm32\lib\masm32.lib
includelib \masm32\lib\gdi32.lib
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\Comctl32.lib
includelib \masm32\lib\comdlg32.lib
includelib \masm32\lib\shell32.lib
includelib \masm32\lib\oleaut32.lib
DlgProc PROTO :DWORD,:DWORD,:DWORD,:DWORD
jmptable PROTO :DWORD
; -----------------------------
; macros for displaying results
; -----------------------------
SBtext MACRO part,lpString
invoke SendMessage,hStatus,SB_SETTEXT,part-1,reparg(lpString)
ENDM
TBtext MACRO lpString
invoke SetWindowText,FUNC(GetActiveWindow),reparg(lpString)
ENDM
EDtext MACRO lpString
invoke SetWindowText,hEdit,reparg(lpString)
ENDM
EDclear equ <EDtext 0>
.data?
hWnd dd ?
hInstance dd ?
hStatus dd ?
hEdit dd ?
.code
;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -