宏中 equtextequ的的一些用法

    技术2022-05-19  24

    txt equ <'Asm'>  ; 可用 equ 定义字符串, 应使用 <> 

    ; 用 equ 给函数重命名 Msg equ MessageBox Exit equ <ExitProcess>

    ; 甚至代替整个表达式 ShowMsg equ <invoke MessageBox, NULL, addr szMsg, addr szCaption, MB_OK> 

    Msg textequ MessageBox Exit textequ <ExitProcess> ShowMsg textequ <invoke MessageBox, NULL, addr szMsg, addr szCaption, MB_OK> 

    num1 equ 2        ; 这里的 equ 换做 textequ 不行 num2 textequ <3>     ; 如果用 textequ 定义整数或表达式也要放在 <> 中

    txt textequ <'Asm'> 

     

     

    EQU后面可以跟地址表达式或数值表达式,但等号后面只能跟数值表达式。


    最新回复(0)