flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
LocoDelAssembly
What package are you using? "return" is not supported since several years now, it should not compile in first place unless you have defined such macro.
|
|||
![]() |
|
madmatt
I'm using the latest fasmw package: 1.67.34
I've been using the return macro for years without problems. But, anyways, here is the macro define that I'm using: Code: macro return retval { if ~ retval eq mov eax, retval end if ret } _________________ Gimme a sledge hammer! I'LL FIX IT! |
|||
![]() |
|
LocoDelAssembly
Odd, I'm getting the correct prologue and epilogue codes with your macro. Perhaps there is something else disturbing your macro?
What is the definition of "restoreDeviceObjects"? Your code also crash if you add a "test2" parameter? |
|||
![]() |
|
revolution
It is usual to write the first parameter without a comma:
Code: proc oneTimeSystemInit test |
|||
![]() |
|
madmatt
Quote: What is the definition of "restoreDeviceObjects"? Your code also crash if you add a "test2" parameter? 'restoreDeviceObjects' is the same kind of function as 'oneTimeSystemInit'. No parameters, called using 'call' instruction. As for the second, (third, fourth) parameter, no, it doesn't. Just with zero parameters Quote: It is usual to write the first parameter without a comma yeah, your right. I'll post the whole source file:
_________________ Gimme a sledge hammer! I'LL FIX IT! |
|||||||||||
![]() |
|
madmatt
I've Figured out what the problem was, bad floating point load macro's.
I've replaced them with my older ones that work. NEWER [bad] macro's: Code: macro fildd i32 { push i32 fild dword [esp] sub esp, 4 } macro fldd f32 { pushd f32 fld dword [esp] sub esp, 4 } macro fildq i64 { pushd double i64 fild qword [esp] sub esp, 8 } macro fldq f64 { pushd double f64 fld qword [esp] sub esp, 8 } OLDER (good) macro's: Code: macro fldq dfloat { local ..mynumber, ..here fld [..mynumber] jmp ..here align 8 ..mynumber dq dfloat ..here: } macro fldd dfloat { local ..mynumber, ..here fld [..mynumber] jmp ..here align 4 ..mynumber dd dfloat ..here: } macro fildd integer { local ..mynumber, ..here jmp ..here align 4 ..mynumber dd integer ..here: fild [..mynumber] } macro fildq integer { local ..mynumber, ..here jmp ..here align 8 ..mynumber dq integer ..here: fild [..mynumber] } |
|||
![]() |
|
LocoDelAssembly
Glad you found the problem, I was looking to it for almost half an hour and couldn't find nothing. (it was all by eye because I don't have your includes so I couldn't compile and test nor look to your custom macros like fldd).
|
|||
![]() |
|
revolution
Folks, another example of a good lesson here, always include everything when posting code and asking for help with a problem. You waste everyone's time (including your own) when you only post bits of things and assume that the bits you don't post are working.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.