flat assembler
Message board for the users of flat assembler.
Index
> Main > db 1000 dup ? (2 passes 5 bytes) |
Author |
|
revolution 28 Oct 2010, 16:37
Because you used "?" for your data.
Try this instead: Code: xor al,al mov [bop-1],al toto db 1000 dup 0 bop: |
|||
28 Oct 2010, 16:37 |
|
baldr 28 Oct 2010, 16:46
ouadji,
? in any data defining directive (and couple of it for reserving directives) says to fasm that you don't care about their values. They do take their toll in VirtualSize of corresponding section and in SizeOfCode/Data/Image for PE; MZ Exe header also takes them in account, but for plain binary they're lost. |
|||
28 Oct 2010, 16:46 |
|
ouadji 28 Oct 2010, 16:58
Quote: They do take their toll in VirtualSize of corresponding section and in SizeOfCode/Data/Image for PE; (and revolution too) |
|||
28 Oct 2010, 16:58 |
|
Tomasz Grysztar 28 Oct 2010, 19:28
Have you ever wondered, why some fasm's DOS examples (like LIFE or MANDEL, or DEVICE) put the uninitialized data exactly at the end of source? The answer lies there.
|
|||
28 Oct 2010, 19:28 |
|
rugxulo 30 Oct 2010, 22:37
.data vs. .bss, initialized vs. uninitialized, etc. etc.
|
|||
30 Oct 2010, 22:37 |
|
edemko 01 Nov 2010, 17:51
i do not understand
Code: ;1 pass(es), 4 byte(s) ;dw ?,0 ;1 pass(es), 2 byte(s) ;dw 0,? |
|||
01 Nov 2010, 17:51 |
|
LocoDelAssembly 01 Nov 2010, 18:02
That happens because you can't have holes in your binary, so when you have initialized data that comes AFTER uninitialized data, then the uninitialized data will also have to be outputted into the file as zeros (or NOPs if the uninitialized part was an "align".)
|
|||
01 Nov 2010, 18:02 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.