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


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

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




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]

-----Original Message-----
From: Jkhum98@aol.com <Jkhum98@aol.com>
To: assembly-83@lists.ticalc.org <assembly-83@lists.ticalc.org>
Date: Friday, December 04, 1998 10:12 PM
Subject: A83: "Maximum Number of args exceeded"...?


>
>Im having a problem with TASM and was wondering if someone can help me with
a
>way around it... When compiling, I often get the error message, "Maximum
>number of args exceeded" and I Know this means that I have too many letters
in
>a few Strings of mine, but why should it do this though!?  I know I'm doing
it
>correct syntax-wise, and that all the text of that one string fits fine
onto
>the screen (that shouldnt matter though)... Why is there a Maximum!? :\  Is
>this depending on how much 'hl' can hold or what?  Well, I was thinking of
how
>to fix that and to just split up my string and go through the '_vputs'
>sequence again, but I should not have to... Someone explain to me why TASM
>gives me all this bitchin'... =P
> --Jason K.
>