This is what can done with macros. Your option 2) is more difficult to realise, because the PROLOG macro doesn't give you the list of arguments. It could probably be done in HJWasm itself, though. My example assembles even with ML64, but at that point, one could drop support for that one.
Project attached, requires MasmBasic of today.
I was very curious to see the MasmBasic in action but after installing and running ml64, I just got errors. Am I missing something?
Microsoft (R) Macro Assembler (x64) Version 10.00.40219.01
Copyright (C) Microsoft Corporation. All rights reserved.
Assembling: PassXmmRegs.asm
h:\Masm32\MasmBasic\Res\JBasic.inc(47) : error A2008:syntax error : .
h:\Masm32\MasmBasic\Res\JBasic.inc(48) : error A2008:syntax error : .
h:\Masm32\MasmBasic\Res\JBasic.inc(49) : error A2008:syntax error : .
*** using Res\JBasic32.lib ***
h:\Masm32\MasmBasic\Res\JBasic.inc(62) : error A2008:syntax error : rax
h:\Masm32\MasmBasic\Res\JBasic.inc(63) : error A2008:syntax error : rcx
h:\Masm32\MasmBasic\Res\JBasic.inc(64) : error A2008:syntax error : rdx
h:\Masm32\MasmBasic\Res\JBasic.inc(65) : error A2008:syntax error : rsi
h:\Masm32\MasmBasic\Res\JBasic.inc(66) : error A2008:syntax error : rdi
h:\Masm32\MasmBasic\Res\JBasic.inc(67) : error A2008:syntax error : rbx
h:\Masm32\MasmBasic\Res\JBasic.inc(68) : error A2008:syntax error : rbp
h:\Masm32\MasmBasic\Res\JBasic.inc(69) : error A2008:syntax error : rsp
h:\Masm32\MasmBasic\Res\JBasic.inc(558) : fatal error A1000:cannot open file : \Masm32\MasmBasic\Res\DualWin.inc