flat assembler
Message board for the users of flat assembler.
Index
> Windows > Any validators for fasm? |
Author |
|
edfed 17 Nov 2022, 20:49
if you know what happened, it means you know the way to check such things
|
|||
17 Nov 2022, 20:49 |
|
revolution 17 Nov 2022, 21:24
AE wrote: So the question is, are there any tools or IDEs to check such things? But seriously, it could be possible to rewrite struc to monitor for unaligned addresses. However that only helps for assembly time static structures. For dynamic allocations the assembler can't know or predict, so perhaps you could write a runtime allocator to guarantee all alignments are correct. |
|||
17 Nov 2022, 21:24 |
|
Overclick 17 Nov 2022, 22:47
Just align it like this:
Code: .data align 16 ; or 8 lpPoint POINT .code invoke GetCursorPos, lpPoint |
|||
17 Nov 2022, 22:47 |
|
revolution 18 Nov 2022, 02:41
Dynamic structures are more tricky. IF you use 64-bit code then you can keep the stack aligned to 16. The 32-bit stack needs more attention.
|
|||
18 Nov 2022, 02:41 |
|
DimonSoft 21 Nov 2022, 14:25
AE wrote: I recently encountered a situation where GetCursorPos returned an error just because 'Mouse POINT' was not aligned in the data section. AFAIR, there used to be so-called “checked Windows builds” that did their best to fail whenever an application does something strange/bad/not-strictly-conforming-to-the-official-OS-API-documentation. Not sure if they still exist. |
|||
21 Nov 2022, 14:25 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.