This capacity has been around since MASM6 in 1990 but I have rarely ever seen it used. The capacity to assign and reassign a constant with the "=" sign allows code like the following. It requires a macro which allows you to check the arg count and it does not require a LOCAL variable for the return value as it uses the .DATA? section for a constant instead. The return value is always global in scope within a module but the name can be re-assigned at any time so you don't get the bad habits of allocation a large number of globals and getting naming conflicts.
I have never introduced the technique in the MASM32 SDK because it is a different animal with a different logic but it is highly suitable for making a simplified script style of language that assembles into pure assembler code without any bad habits.
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
include \masm32\include64\masm64rt.inc
MsgBox MACRO args:VARARG
LOCAL acnt,rval
acnt = argcount(args)
IF acnt ne 4
echo ---------------------------------
echo MsgBox : incorrect argument count
echo ---------------------------------
.err <* incorrect argument count *>
ENDIF
.data?
rval dq ?
.code
invoke __imp_MessageBoxA,args
mov rval, rax
EXITM < rval>
ENDM
.code
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
entry_point proc
call Select_Option
.if choice == IDYES
void = MsgBox(0,"You chose YES","Result",MB_OK)
.else
void = MsgBox(0,"You chose NO","Result",MB_OK)
.endif
.exit
ret
entry_point endp
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
Select_Option proc
choice = MsgBox(0,"Choose YES or NO","Choice",MB_YESNO)
ret
Select_Option endp
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
end
comment # ------------------------------------------------------------------------------------------
.text:0000000140001000 C8800000 enter 0x80, 0x0
.text:0000000140001004 4883EC60 sub rsp, 0x60
.text:0000000140001008 E86D000000 call sub_14000107a
.text:000000014000100d 48833DAB11000006 cmp qword ptr [0x1400021c0], 6
.text:0000000140001015 752B jne 0x140001042
.text:0000000140001017 48C7C100000000 mov rcx, 0x0
.text:000000014000101e 488B1549100000 mov rdx, qword ptr [0x14000206e]
.text:0000000140001025 4C8B055B100000 mov r8, qword ptr [0x140002087]
.text:000000014000102c 49C7C100000000 mov r9, 0x0
.text:0000000140001033 FF1523110000 call qword ptr [MessageBoxA]
.text:0000000140001039 48890570110000 mov qword ptr [0x1400021b0], rax
.text:0000000140001040 EB29 jmp 0x14000106b
.text:0000000140001042
.text:0000000140001042 0x140001042:
.text:0000000140001042 48C7C100000000 mov rcx, 0x0
.text:0000000140001049 488B154D100000 mov rdx, qword ptr [0x14000209d]
.text:0000000140001050 4C8B0560100000 mov r8, qword ptr [0x1400020b7]
.text:0000000140001057 49C7C100000000 mov r9, 0x0
.text:000000014000105e FF15F8100000 call qword ptr [MessageBoxA]
.text:0000000140001064 4889054D110000 mov qword ptr [0x1400021b8], rax
.text:000000014000106b
.text:000000014000106b 0x14000106b:
.text:000000014000106b 48C7C100000000 mov rcx, 0x0
.text:0000000140001072 FF15D4100000 call qword ptr [ExitProcess]
.text:0000000140001078 C9 leave
.text:0000000140001079 C3 ret
; --------------------------------------------------------------------------
; sub_14000107a
; --------------------------------------------------------------------------
sub_14000107a proc
.text:000000014000107a C8800000 enter 0x80, 0x0
.text:000000014000107e 4883EC60 sub rsp, 0x60
.text:0000000140001082 48C7C100000000 mov rcx, 0x0
.text:0000000140001089 488B1541100000 mov rdx, qword ptr [0x1400020d1]
.text:0000000140001090 4C8B0550100000 mov r8, qword ptr [0x1400020e7]
.text:0000000140001097 49C7C104000000 mov r9, 4
.text:000000014000109e FF15B8100000 call qword ptr [MessageBoxA]
.text:00000001400010a4 48890515110000 mov qword ptr [0x1400021c0], rax
.text:00000001400010ab C9 leave
.text:00000001400010ac C3 ret
sub_14000107a endp
-------------------------------------------------------------------------------------------------- #