flat assembler
Message board for the users of flat assembler.
Index
> Windows > why rb rw rd rq fail when it is the last instruction in code |
Author |
|
vbVeryBeginner 16 Sep 2004, 06:52
hi, could i know why the rb,rw,rd,rq fail when it is on the last instruction or the only instruction in a file.
eg. fileA.asm ====== rb 10 once assembled, you get 0 zero byte and i tried it with, rw 10, rd 10, rq 10 and all i received 0 byte too. i see the thread http://board.flatassembler.net/topic.php?t=1309 the author use Code: rb SizeOfImport - ($-ImportSection) - 1 db 0 so, this mean, people already discovered that the rb, rw, rq ... cannot function when it is on the last instruction. my question is, why it can't function when it is on the last instruction? sincerely, vbVeryBeginner d(??)b |
|||
16 Sep 2004, 06:52 |
|
Matrix 16 Sep 2004, 08:28
I understand that you're a very beginner but thias really was a problem of yours?
reserve means reserve =>do not put anything there compile this: Code: org 256 int 20h rb 100 times 255 db % times 255 rb % mov ax,bx times 255 rb % look at the code and try to understand it. ps.: you really wanna look at the documentation MATRIX |
|||
16 Sep 2004, 08:28 |
|
vbVeryBeginner 16 Sep 2004, 08:56
ok, ic, thanks JohnFound
|
|||
16 Sep 2004, 08:56 |
|
vbVeryBeginner 16 Sep 2004, 11:39
thank you matrix, i hope i could make you happy
i appreciate it eventough not at first |
|||
16 Sep 2004, 11:39 |
|
Madis731 17 Sep 2004, 15:03
Since now I haven't come across any reserve that differs from define, but
according to the definition, you MUST not rely on them being zero. Reserve only makes this area "usable" to you (doesn't crash with read/write errors) but does NOT guarantee the ingredients to be 0. Define instead hardcodes everything in your output file and you can see zeros there. Yes, reserve sometimes fills your output, but ONLY when there is code or data after that in your source. Then there is no way to reserve without increasing filesize, because then some thing wil overlap and this is bad |
|||
17 Sep 2004, 15:03 |
|
JohnFound 17 Sep 2004, 17:01
In addition: To avoid wrong placing of defined and reserved data in the output file, I would suggest using of Fresh library "globals.inc". It handles your global data definitions in proper way placing reserved variables always at the end of the section, thus minimizing the size of the file. Also, it increases readability of the source.
Regards. |
|||
17 Sep 2004, 17:01 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.