Author Topic: MAX SYMBOLS error  (Read 11651 times)

0 Members and 1 Guest are viewing this topic.

Offline Binder News

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 785
  • Rating: +46/-3
  • Zombie of Tomorrow
    • View Profile
MAX SYMBOLS error
« on: January 08, 2011, 10:14:47 pm »
I am wondering why the maximum amount of symbols is 150. Anyone know? (Quigibo?)
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:





Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: MAX SYMBOLS error
« Reply #1 on: January 08, 2011, 10:15:36 pm »
Probably because of a buffer holding all of the symbols only allocates 150 of them.

Offline Binder News

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 785
  • Rating: +46/-3
  • Zombie of Tomorrow
    • View Profile
Re: MAX SYMBOLS error
« Reply #2 on: January 08, 2011, 10:17:21 pm »
Yeah, but I'm wondering HOW  they are stored, and if it would be possible to compress them so as to be able to have more symbols.
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:





Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: MAX SYMBOLS error
« Reply #3 on: January 08, 2011, 10:22:35 pm »
Yeah, but I'm wondering HOW  they are stored, and if it would be possible to compress them so as to be able to have more symbols.
Well, it could be possible to compress them.  But it would make it harder on quigibo.  I don't know the full math, but it would rely on the fact that the MSB wouldn't have to be 00h-FFh.
« Last Edit: January 08, 2011, 10:22:41 pm by graphmastur »

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 #4 on: January 08, 2011, 10:27:20 pm »
Its actually 153 now.  Its because they fit conveniently onto one of the buffers since each entry is 5 bytes.  768/5 = 153.  I'm already using compression so it really isn't possible to compress anymore.  Of the 5 bytes, 2 are a pointer, and the last 3 hold 4 6-bit entries for the name and type of symbol.

I'm surprised you're getting this error, that's A LOT of symbols.  You can reduce the count by relative referencing.  Like instead of:
Code: [Select]
[1234]->Str1
[5678]->Str2
[9ABC]->Str3

Disp Str1,Str2,Str3

You can do:
Code: [Select]
[1234]->Str1
[5678]
[9ABC]

Disp Str1,Str1+2,Str1+4

Also, getting rid of Lbl's that you never actually use.
___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 #5 on: January 08, 2011, 10:33:15 pm »
I'm not getting the error, but I'm making an RPG, and think I might. Why not make a pre-scan and find out how many labels are needed, then allocate that much mem in an appvar?
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:





Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: MAX SYMBOLS error
« Reply #6 on: January 08, 2011, 10:34:38 pm »
If you have 150 labels, your compiled code probably shouldn't fit in RAM anyways. :P

Offline Binder News

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 785
  • Rating: +46/-3
  • Zombie of Tomorrow
    • View Profile
Re: MAX SYMBOLS error
« Reply #7 on: January 08, 2011, 10:35:51 pm »
Yeah, I guess. I just have a lot of text.
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:





Offline FinaleTI

  • Believe in the pony that believes in you!
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1830
  • Rating: +121/-2
  • Believe in the pony that believes in you!
    • View Profile
    • dmuckerman.tumblr.com
Re: MAX SYMBOLS error
« Reply #8 on: January 08, 2011, 10:38:08 pm »
You could put all that text in one var, and just start reading at different bytes, and that would save a lot of labels and static pointers.


Spoiler For Projects:

My projects haven't been worked on in a while, so they're all on hiatus for the time being. I do hope to eventually return to them in some form or another...

Spoiler For Pokemon TI:
Axe port of Pokemon Red/Blue to the 83+/84+ family. On hold.

Spoiler For Nostalgia:
My big personal project, an original RPG about dimensional travel and a few heroes tasked with saving the world.
Coding-wise, on hold, but I am re-working the story.

Spoiler For Finale's Super Insane Tunnel Pack of Doom:
I will be combining Blur and Collision Course into a single gamepack. On hold.

Spoiler For Nostalgia Origins: Sky's Story:
Prequel to Nostalgia. On hold, especially while the story is re-worked.

Offline Binder News

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 785
  • Rating: +46/-3
  • Zombie of Tomorrow
    • View Profile
Re: MAX SYMBOLS error
« Reply #9 on: January 08, 2011, 10:39:12 pm »
I could, I'm just lazy and don't feel like counting all the letters.
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:





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 #10 on: January 08, 2011, 10:41:28 pm »
The program can count it for you.  If you have texts right after eachother, they are separated by zeros.  So using the length command in a loop, you can create a routine to get a pointer to the Nth line of text.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: MAX SYMBOLS error
« Reply #11 on: January 09, 2011, 12:28:34 am »
Wait, seriously?  So if I have something like this...
Code: (input) [Select]
"Hello
"World
"A
"More text"->Str1
each line secretly has a zero tacked on to it?
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 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 #12 on: January 09, 2011, 12:39:11 am »
No... but you can add the zero yourself with [00] when you aren't using the store.  Also, the store should be on the first line of text, not the last one.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: MAX SYMBOLS error
« Reply #13 on: January 09, 2011, 12:48:02 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
?
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 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 #14 on: January 09, 2011, 12:50:03 am »
Almost:

Code: [Select]
"Hello"[20574F524C4400]->Str1
Disp Str1
___Axe_Parser___
Today the calculator, tomorrow the world!