' Inline ASM Blocks — #ASM/#ENDASM with x64 mnemonics
#COMPILE EXE
#DIM ALL

FUNCTION PBMAIN() AS LONG
    LOCAL a AS LONG
    LOCAL b AS LONG
    LOCAL result AS LONG

    a = 10
    b = 20

    #ASM
        mov eax, %a
        add eax, %b
        mov dword ptr [%result], eax
    #ENDASM

    PRINT "a + b = "; result

    #ASM
        mov rax, 42
        push rax
        pop %a
    #ENDASM

    PRINT "ASM pushed value: "; a

    FUNCTION = 0
END FUNCTION
