flat assembler
Message board for the users of flat assembler.
Index
> Windows > To ? or not to ?.... |
Author |
|
RedGhost 19 Jan 2006, 05:23
? data should not be assigned to any value and should run the risk of being filled with garbage data(i believe)
but out of curiosity i went and tested, declaring data with ? just sets it to 0 from the tests i did, but it may run that garbage risk _________________ redghost.ca |
|||
19 Jan 2006, 05:23 |
|
Madis731 19 Jan 2006, 09:54
That is true - ? usually gets defined as 0 but you can't count on it. Just to be sure always fill it yourself or if you NEED it to be ZERO, then:
Code: times 512 db 0 ps PAINTSTRUCT is a structure that you must fill in yourself and you can't expect it to be 0 (although it might be ) Offtopic: I've always wondered how to tell which is best: 1) rd 1 2) dd ? |
|||
19 Jan 2006, 09:54 |
|
Tomasz Grysztar 19 Jan 2006, 10:57
3) dd 1 dup ?
4) dd 1 dup (?) When it happens that uninitialized data has to be anyway written into the file, it is filled with zeros - but you shouldn't rely even on this. If I changed it to put 90h or 0CCh bytes there, it still would be consistent with the presumptions. |
|||
19 Jan 2006, 10:57 |
|
StakFallT 19 Jan 2006, 13:41
aaah ok that makes sense, thanks for replying guys
|
|||
19 Jan 2006, 13:41 |
|
RedGhost 20 Jan 2006, 02:14
Madis731 wrote:
Tomasz Grysztar wrote:
im gonna have to go with madis here, i prefer the fasm syntax to the masm syntax (or tasm or whatever >_>) _________________ redghost.ca |
|||
20 Jan 2006, 02:14 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.