Re: LZ-Adv: .db's etc.
[Prev][Next][Index][Thread]
Mark D Lippmann wrote:
> This makes complete sense to me, but how do you work with something like
> this:
>
> _____________________
> Stuff:
> .db 56,36,35,36,87,23,87,34,8
> --------------------------------------
>
> How do I access each number to change when there isn't a lable in front
> of each one?
You need to calculate the offset of a byte in your ".db" before you can
store to it.
You could basically use the following code.
ld hl, label
ld de, (program_addr)
add hl,de
add hl, <place the offset from label here, or add code here to find the
offset from the label depending on your application>
Label:
.db 32,32,45,23,34,45,76
<pre>
--
************************************************************
* Eric P. Anderson "Who is General *
* crusader@mo.net Failure and why *
* http://walden.mo.net/~crusader/ is he reading *
* Finger for PGP public key. drive C?" *
* Fprint:3E 3C 52 A2 C1 3F 61 B5 71 7F 10 F1 09 B4 D4 D7 *
* This is a public notice that all unsolicited and/or *
* commercial emailers will be charged an archival and *
* downloading fee of U.S. $500. Emailing me signifies *
* agreement to these terms. *
* "The price of freedom is eternal vigilance." -Jefferson *
************************************************************
</pre>
References: