A86: Re: .db's


[Prev][Next][Index][Thread]

A86: Re: .db's




-----Original Message-----
From: Dave VanEe <dvanee@dowco.com>
To: assembly-86@lists.ticalc.org <assembly-86@lists.ticalc.org>
Date: Tuesday, October 13, 1998 8:50 PM
Subject: A86: .db's


>
>Hey, a few .db questions:
>
>1) How many 'args' can u have one one .db? (.db 0,0,0,0,0,0,0,0 = 8 args)


Technically, unlimited.  The actual number is limited to the assembler you
are using.  I don't know about tasm, but assembly studio limits the number
of bytes in a source line to 255 characters.  So that would be about 100.

Most of the time you will want to split up .db's logically into separate
lines to make the source easier to read.  You probably won't want more than
what will fit onto one page on a line (page as in the text editor you are
using, standard for dos is 80 characters wide).

>
>2) if you made HL point to ARRAY, would adding 6 to HL point to the same
>location in each of these versions of ARRAY?


Yes.  All a .db does is Declare a Byte in your program.  How you split it up
in the source changes nothing.  But remember that adding 6 to it will put
you at the 7th byte, because is starts at 0 (0 + 0 = 0, not 1).

>
> ARRAY:
> .db 0,0,0,0,0,0,0,0
> ^----here
>
> ARRAY:
> .db 0,0,0
> .db 0,0,0 <--- AND here?
> .db 0,0,0
>
>Thanx,
>Dave VanEe


Follow-Ups: