Author Topic: Invalid Error  (Read 6377 times)

0 Members and 1 Guest are viewing this topic.

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Invalid Error
« on: January 15, 2011, 06:34:13 pm »
Whenever I run the program I compiled it gives me an "Invalid" error. I compiled it using the other options as shell, and they all worked. Does this happen when the size of the program reaches a certain limit?
In-progress: Graviter (...)

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Invalid Error
« Reply #1 on: January 15, 2011, 06:47:54 pm »
Yup.  If the size of your program goes over about 8000 bytes, then you should really consider either optimizing or turning it into an app.  There's an executable file limit on all assembly programs, although I can never remember the precise numbers.

Shells tweak the numbers a bit, plus I think that some shells do away with the size limit altogether.
« Last Edit: January 15, 2011, 06:48:41 pm by Michael_Lee »
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 jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Invalid Error
« Reply #2 on: January 15, 2011, 06:55:13 pm »
Yup.  If the size of your program goes over about 8000 bytes, then you should really consider either optimizing or turning it into an app.  There's an executable file limit on all assembly programs, although I can never remember the precise numbers.

Shells tweak the numbers a bit, plus I think that some shells do away with the size limit altogether.
8,811 bytes, I think.

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Invalid Error
« Reply #3 on: January 15, 2011, 06:57:47 pm »
8811?  That high?  Huh.  I thought it was a bit lower then that...
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 jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Invalid Error
« Reply #4 on: January 15, 2011, 07:06:07 pm »
8811?  That high?  Huh.  I thought it was a bit lower then that...
Well, I don't remember exactly.  I think it's actually less, but 0xC000-0x9D95=8,811.

I just realized I should have used BFFF, so 8,810.  But the upper limit is probably lower than that.

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Invalid Error
« Reply #5 on: January 15, 2011, 07:24:45 pm »
no stub = 8192 bytes
shell = 8811 bytes of code and unlimited amount of data. this only works if *all* the data is at the end of the program though, but since axe mixes inner subroutines (Axe's own subroutines, not the kind you call with sub() ) and data, sometimes it may not work.

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: Invalid Error
« Reply #6 on: January 15, 2011, 08:28:29 pm »
no stub = 8192 bytes
shell = 8811 bytes of code and unlimited amount of data. this only works if *all* the data is at the end of the program though, but since axe mixes inner subroutines (Axe's own subroutines, not the kind you call with sub() ) and data, sometimes it may not work.

Yep, the 8192 byte-limit for nostub programs is because the TI-OS sets that as the limit when a program is run with Asm( (for no apparent reason :P).

8811 bytes is a hardware thing, though.
« Last Edit: January 15, 2011, 08:29:20 pm by Deep Thought »




Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Invalid Error
« Reply #7 on: January 16, 2011, 02:09:47 am »
Axe does actually put all data at the end if i remember correctly, so you are good there

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: Invalid Error
« Reply #8 on: January 16, 2011, 10:35:01 am »
Axe does actually put all data at the end if i remember correctly, so you are good there

It also puts its own subroutines at the end (the ones for commands like DispGraph) and it gets mixed with the data, so that wouldn't work, unfortunately :-\