Issues using a local label in a macro in MASM

后端 未结 1 1626
借酒劲吻你
借酒劲吻你 2021-01-14 11:59

I\'m to write a macro that takes E,NE,A,B... as a parameter and a single command i.e mov eax,ebx which would execute if the condition set by a prec

相关标签:
1条回答
  • 2021-01-14 13:00

    Try this:

    mDoIf MACRO op, command
        LOCAL L1, L2
    
        J&op    short L1
        jmp     short L2
    
    L1: 
        call command
    L2:
        exitm
    endm
    
    .code
    start:
        mov     eax, 1
        cmp     eax, 2
        mDoIf l, DumpRegs
    
        invoke  ExitProcess, 0
    end start
    
    0 讨论(0)
提交回复
热议问题