Thank you, it would be nice. To see some samples in 64 bits, being mSenos an array of dwords
- In fasm, we can do the next:
stdcall DrawCopperBar, dword [mSenos+ebx], 0
I didn't see the debugger, I imagine that the precompiler does the work with "movsxd rax, dword [mSenos+ebx]" before using it.
- In PoAsm is not so easy and I have to do it by myself:
movsxd rax, dword ptr [mSenos+rbx]
invoke DrawCopperBar, rax, 0
- In GoAsm is not so easy:
xor rax, rax
mov eax, D[mSenos+rbx]
invoke DrawCopperBar, rax, 0
Other behaviours that I have seen are the next regarding the paramethers in an invoke
- Fasm
myProc proc par1, par2
mov [par1], rcx ; One have to do it explicitelly or just use rcx, rdx, r8, r9
mov [par2], rdx
endp
- PoAsm
myProc proc Tpar1, Tpar2
local par1:QWORD, par2:QWORD ; using uppercase is mandatory
mov [par1], rcx ; Not possible to move the values to Tpar1, Tpar2, better use locals variables
mov [par2], rdx
endp
- GoAsm
myProc proc Tpar1, Tpar2
; No need to do anything, precompiler always do the assignation
endp
Regarding the use of formulae in constants, GoAsm is very restrictive, and sometimes is needed to use parenthesis, otherwise don't use "*" before "+", for example.
One example:
cdMAXCOLOR = 192
cdPalSize = cdMAXCOLOR
stPaleta struc
Rojo db ?
Verde db ?
Azul db ?
Alfa db ?
stPaleta ends
; miPaleta stPaleta 5*cdPalSize dup <> ; This line produces a failure in the code
; miPaleta stPaleta (5*cdPalSize) dup <> ; This line produces a failure in the code
miPaleta stPaleta 960 dup <> ; 5*cdPalSize = 960
Regards