Re: A83: Re: "Maximum Number of args exceeded"...?


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

Re: A83: Re: "Maximum Number of args exceeded"...?





In a message dated 12/05/98 1:51:59 AM, jgkarneges@ucdavis.edu writes:

>If I remember right, you're only allowed to have 32 items in a particular
>.db statement.  This means that if you want to define a .db string (or.dw)
>you will get an error if you exceed the limit.  To fix this, just split up
the
>.db into two sections and put them right after each other.  This way, they
>are still connected in the asm program in the end so you only need one call
>to _vputs or anything else like hl, etc. the problem lies in the declaration,
>that's it.
>
>data:  .db 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
>19, 20
>
>           ld hl, data    ; hl now points to a string of 20 bytes
>
>if this produces an error, just put:
>
>data: .db 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
>          .db 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
>
>          ld hl, data   ; hl still points to a string of 20 bytes
>
>see what I mean?  If you ever go over the maximum number of arguments
>for the .db statement, then just split it into multiple parts. the assembler
>will still put them together.  remember, the .db statement puts the bytes
>you specify into your program right where the .db statement is.  so if you
>put two in a row, then the second set of bytes will directly follow the
>first.  although this is off the topic, if you knew the byte value of a
>instruction (like return is C9h) you could put the instruction there with
>a .db.
>        ...
>        call myfunc
>        ...
>
>myfunc:
>        ld a, (var)
>        inc a
>        ld (var), a
>        .db $c9            ; return =)  hehehehe
>
>Anyways,
>-Justin Karneges [Infiniti]

Hey, they is exactly what I needed to know, thanks a lot... =)  Also, I'd like
to talk about that off-topic subject you said... I was recently looking
through the source to MathWiz v1.0 and noticed that the external files are
entirely made up of instructions in this fashion... I was just confused for a
little bit that you could address something by referencing it as a databyte or
dataword... So what does this mean exactly...? It would run it like an
instruction, as a call or a jump?  So if in your program sequence, it came
across say a " .db 1" how would it interpret that? jump to the memory location
of $0001?  I had just never heard of this thing before,  can this method be
benefitted off of somehow? =P
																--Jason K.