[A89] Re: dumb assembly questions
[Prev][Next][Index][Thread]
[A89] Re: dumb assembly questions
> > And "ds.w 0" will never reserve a blank word (at least it never should...
> I
> > guess it's implementation-specific). "ds.x 7" will reserve a memory area
> of 7
> > x:es, (bytes, words or longwords).
>
> No, I meant that the problem with "ds.w 0" is that there's no logical reason
> to reserve zero bytes, and it only leads to mistakes like this:
>
> BSS
> var1: ds.w 0
> var2: ds.w 1
>
> The modifying var1 modifies var2, and vice versa, because they're really the
> same byte.
I'm sure someone can figure out some way that could be useful :)
I sure can't though.
> > but when moving variables in and out of the BSS
> > block I've noiticed that the program can shrink when moving in both
> directions.
>
> What do you mean by that?
I tried to explain that in the (cut) text I wrote... basically, when moving
variables (in the code, that is) out of the BSS section and into the
"in-program" code, I would sometimes see an actual decrease in code size. The
same thing sometimes happened when I moved the variable _into_ the BSS section.
--
/ Niklas Brunlid
Check out Prosit for the TI-89 / TI-92+ at http://prosit.ticalc.org
Random PQF v5.1 Quote follows:
Many phenomena - wars, plagues, sudden audits - have been advanced as
evidence for the hidden hand of Satan in the affairs of Man, but whenever
students of demonology get together the M25 London orbital motorway is
generally agreed to be among the top contenders for exhibit A.
-- (Terry Pratchett & Neil Gaiman, Good Omens)
Follow-Ups:
References: