flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 06 May 2021, 06:25
Windows can be fussy with alignment for some functions.
Using "db 0" will make the following data unaligned. BTW: Did you know that all Windows functions return an error code in EAX. You can check that value to see which function fails and what the problem was. |
|||
![]() |
|
fasm14 06 May 2021, 08:32
Thanks, but the same thing happens if I do 'db 1', 'db "a"', 'db 10', etc. The only time it didn't happen was with a short string terminated with a 0, but when I used a longer string it happened again... (the error code in EAX was just 1 ("ERROR_INVALID_FUNCTION") every time)
|
|||
![]() |
|
revolution 06 May 2021, 13:30
It is the length of the "db" that matters. The value it not important.
If you have a single byte then all after are unaligned. The same for 3 bytes, or 5, or any odd number of bytes. |
|||
![]() |
|
fasm14 07 May 2021, 07:08
Thanks for explaining!
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.