Hi Pelle,
I coded a Poasm macro to easily handle rip-relative addressing on Windows 64-bit programming. The purpose is to replace the following syntax :
mov rip+hBrush,rax
with
mov hBrush,rax
The second hBrush statement is an equate defined as rip+_hBrush where _hBrush is declared in the .data? section by the macro.
ripVar MACRO var,type
@CatStr( <_>,<var>,< >,<type>,< >,<?>)
.echo @CatStr( <_>,<var>,< >,<type>,< >,<?>)
var CATSTR <rip>,<+>,<_>,var
.echo var
ENDM
Usage of the macro :
.data?
ripVar hBrush,QWORD
The .echo statements are for debugging purpose.
Poasm Version 11.00.0 reports the following correct outputs and the source code is assembled without any issues:
"_hBrush QWORD ?"
"rip+_hBrush"
"_hModule QWORD ?"
"rip+_hModule"
Poasm Version 12.00.0 reports the following error messages :
ColorDlg.asm(26): error: Invalid use of '_hBrush'.
"_hBrush "
"rip"
ColorDlg.asm(27): error: Invalid use of '_hModule'.
"_hModule "
"rip"
Attached is the source code assembled with Poasm V11. Kindly, could you try the code with Poasm V12? Thanks.