Re: A85: Rigel, where'd it go??
[Prev][Next][Index][Thread]
Re: A85: Rigel, where'd it go??
> Actually, no! It takes in most cases only *1* byte to store the address!
> How can we do this, you ask? We store addresses relatively -- that is we
> store the offset from the last relocation address. So if there are two &'s
> within 256 bytes, it will only take one byte :)
> Sam
>
> --
> Sam Davies <sdavies@mail.trilogy.net>
So, how do you know whether the next fixup is less than 256 bytes away from the last. Say the fixup is 257 bytes away from the last (meaning a word is necessary to store the relative address). According to your method, you would read in only the next byte ($01) and interpret it as a relative fixup of only 1 byte away, when actually you want to read the word $0101. This means you would have to store everything as words, or have some delimiting byte. Either way, you must use two bytes. Correct me if I'm wrong, but your logic seems to be incorrect.
Follow-Ups: