Author Topic: MAX SYMBOLS error  (Read 11479 times)

0 Members and 1 Guest are viewing this topic.

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: MAX SYMBOLS error
« Reply #15 on: January 09, 2011, 12:54:25 am »
O.O

On retrospect, that makes so much sense that I can't believe I didn't think of that.

The coolness of Axe just went up by over 9000.
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: MAX SYMBOLS error
« Reply #16 on: January 09, 2011, 12:56:34 am »
Wait, I can mix and match strings and hex?

So would this be valid?:
Code: [Select]
"Hello[20574F524C44]"->Str1
Disp Str1>Char
and would it display
Code: [Select]
HELLO WORLD
?

Data is the same no matter what form you store it in. So

Code: (Axe) [Select]
"HELLO"

is exactly the same as

Code: (Axe) [Select]
Data(72,69,76,76,79)

and

Code: (Axe) [Select]
[48454C4C4F]

but not

Code: (Axe) [Select]
"HELLO"→Str1

since the store adds an extra [00] to the end.
« Last Edit: January 09, 2011, 12:57:37 am by Deep Thought »




Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: MAX SYMBOLS error
« Reply #17 on: January 09, 2011, 04:51:39 pm »
Interesting thing about the MAX SYMBOLS error: it seems (to me) that it also has to do with how many times you call a subroutine/pointer ???

For example, today while working on Ash:Phoenix, I realized that I am multiplying by 23 quite a lot. Multiplying by 23 is very inefficient, so I decided to add a subroutine to multiply by 23. So I replaced all *23's with sub(23)'s, intending for the subroutine to be Lbl 23 : *23 : Return Since I'm lazy, I decided to compile first before adding the subroutine label so that when it gave me a missing label error, I could hit prgm to scroll to the bottom of the program and add the subroutine instead of scrolling manually.

It gave me a MAX SYMBOL error, which was strange because I had not added any new labels since the last compile It was stranger when I hit prgm to goto the error. Axe scrolled down, not to a label, but to a subroutine call (specifically, the line sub(R,0,,30,20))

Yeah...so now I'm kinda confused lol

Btw, removing all the sub(23)'s and re-replacing them with *23's led to a valid compile.

If you have 150 labels, your compiled code probably shouldn't fit in RAM anyways. :P
It did ;) (16324 bytes)
« Last Edit: January 09, 2011, 04:56:59 pm by squidgetx »

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: MAX SYMBOLS error
« Reply #18 on: January 09, 2011, 04:58:45 pm »
*23?  Interesting, also if its speed you are optimizing for speed, you can do A*16+(A*7  instead of A*23, which will give you a large speed boost if you are multiplying by 23 a lot :)

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: MAX SYMBOLS error
« Reply #19 on: January 09, 2011, 05:04:28 pm »
Even better: A*12*2-A :P

And why are you multiplying by 23 so much anyways? Just wondering if it could be avoided altogether.

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: MAX SYMBOLS error
« Reply #20 on: January 09, 2011, 05:08:16 pm »
That number just happens to be how large the move database entries are :P (13 bytes for name, 1/2 for class, 1/2 for power, 6 for boosts, 1 for MP damage, 1 for HP heal, 1 for accuracy). I suppose I could add a null byte at the end of each entry which would end up costing around 100 bytes of archive space in the move appvar, but I think that *24 is probably way way better than *23 and would save a decent bit in the executable. (Or I could take class and power out of nibbles and put them into their own bytes..but man, that would screw up all the offsets...maybe it's worth it though) (It's not for speed btw)

The MAX SYMBOLS thing is weird though..does anyone know anything about that?
« Last Edit: January 09, 2011, 05:10:11 pm by squidgetx »

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: MAX SYMBOLS error
« Reply #21 on: January 09, 2011, 05:10:07 pm »
For that matter it might be better to make class and power whole bytes, as that would make each entry size 24 and probably make the retrieval of those two values a lot easier/smaller/faster.

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: MAX SYMBOLS error
« Reply #22 on: January 09, 2011, 05:43:34 pm »
I think you had 153 labels beforehand, and the edition of the Lbl R (or its call) added another, #154.  Again, this is just my speculation. :P

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: MAX SYMBOLS error
« Reply #23 on: January 09, 2011, 06:23:59 pm »
No, that label (and its call) had been there for a long, long time. I compiled, it worked fine. I added nothing besides sub(23)'s, not even a Lbl 23. I gto a MAX SYMBOLS error. Removing the sub(23)'s led to an error-free compile.

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: MAX SYMBOLS error
« Reply #24 on: January 09, 2011, 06:31:18 pm »
No, that label (and its call) had been there for a long, long time. I compiled, it worked fine. I added nothing besides sub(23)'s, not even a Lbl 23. I gto a MAX SYMBOLS error. Removing the sub(23)'s led to an error-free compile.
Well, then the compiler probably saw that and said "oh, I should add a label entry for that. We'll figure out where it is in pass 2"

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: MAX SYMBOLS error
« Reply #25 on: January 09, 2011, 07:40:44 pm »
That could explain it i guess. Perhaps that particular sub(R was the first time I used it in the program...

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: MAX SYMBOLS error
« Reply #26 on: January 09, 2011, 07:49:11 pm »
If the subroutine is at the end of your code, it can't kick those calls out of the table until it finally encounters the label.  Putting the subroutines at the start of the program can fix that if you use them often enough.  Just make the first line of code a goto to skip over your subroutines.

Or better yet, put them in an include library so they don't crowd as much.
« Last Edit: January 09, 2011, 07:50:18 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Binder News

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 785
  • Rating: +46/-3
  • Zombie of Tomorrow
    • View Profile
Re: MAX SYMBOLS error
« Reply #27 on: January 09, 2011, 07:49:54 pm »
thanks
Spoiler For userbars:







Hacker-in-training!   Z80 Assembly Programmer     Axe Programmer
C++ H4X0R             Java Coder                           I <3 Python!

Perdidisti ludum     Cerebrum non habes

"We are humans first, no matter what."
"Fame is a vapor, popularity an accident, and riches take wings. Only one thing endures, and that is character."
Spoiler For Test Results: