flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Whats the differnce between reserve data and normal data? |
Author |
|
shism2 05 Mar 2006, 22:06
Whats the difference between reserve data and normal data?
Ex : rd 1 = reserve data Ex : dw ? normal data |
|||
05 Mar 2006, 22:06 |
|
okasvi 05 Mar 2006, 22:22
Quote: The data reservation directive should be followed by only one numerical from fasm.pdf _________________ When We Ride On Our Enemies support reverse smileys |: Last edited by okasvi on 06 Mar 2006, 12:56; edited 1 time in total |
|||
05 Mar 2006, 22:22 |
|
Madis731 06 Mar 2006, 09:39
...but there will be a difference if you put:
Code:
rb 1048576
or Code:
times 1048576 db ?
at the end of the file. In the first case your resulting file will be small, but with the latter code you can easily add 1MB to your resulting binary. |
|||
06 Mar 2006, 09:39 |
|
Tomasz Grysztar 06 Mar 2006, 12:08
The "rb 1048576" and "times 1048576 db ?", and "db 1048576 dup ?" have all exactly the same result. The only difference is that assembler processes the "rb" faster.
|
|||
06 Mar 2006, 12:08 |
|
vid 06 Mar 2006, 15:52
isn't "times XXX db <something>" optimized exception?
|
|||
06 Mar 2006, 15:52 |
|
Madis731 06 Mar 2006, 17:40
Maybe I got it wrong then but should they be different as DB defines each byte, but RB can reserve only that byte without explicitly doing any memory-store operations on it. RB only points to the memory, while DB *ALSO* defines each byte in that region. Correct me if I'm wrong!
|
|||
06 Mar 2006, 17:40 |
|
vid 06 Mar 2006, 17:48
Madis: but defining byte with value "?" is same as reserving it
|
|||
06 Mar 2006, 17:48 |
|
Tomasz Grysztar 06 Mar 2006, 19:41
"RB 1" == "DB ?"
They do exactly the same - reserve one byte as uninitialized data. |
|||
06 Mar 2006, 19:41 |
|
vid 06 Mar 2006, 20:01
Tomasz: isn't "times XXX db <something>" optimized exception?
|
|||
06 Mar 2006, 20:01 |
|
Tomasz Grysztar 06 Mar 2006, 20:19
No, why did you think so?
|
|||
06 Mar 2006, 20:19 |
|
vid 06 Mar 2006, 20:29
some times it was only way to define long initialized arrays, so it kind-of needed that. And i have some (probably false) flashbacks about you mentioning something like this optimization.
|
|||
06 Mar 2006, 20:29 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.