Author Topic: Memory Size of compiled programs  (Read 11617 times)

0 Members and 1 Guest are viewing this topic.

Offline Aichi

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 290
  • Rating: +76/-3
    • View Profile
    • Devrays
Memory Size of compiled programs
« on: September 25, 2010, 09:34:37 am »
Hi Omnimaga Community,
I wanted to learn the ION included z80 Assembly language but I'm unsure since I found Axe Parser. It's an amazing language! Asm is faster than Axe Parser, but that, what I want to create, dont need so much Framerate. My project will be a pokemon game without round-battles, but Fights like Super Smash Bros. Brawl (Nintendo Wii).
That will be take much memory (for the sprite data, map data etc), so my question is, wether Axe Parser compiled programs needs much more memory size than Asm progs.
Regards,
Aichi

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: Memory Size of compiled programs
« Reply #1 on: September 25, 2010, 09:37:52 am »
Hi, welcome here. :)

When Axe programs are compiled, they are compiled into Asm programs.  The size is pretty close to what the size would be in Asm, except Axe is a little larger.  If your program ends up over 8000 bytes, you can compile it into an App with Axe and make it up to 16000 bytes. :D

Good luck with your game!  It sounds pretty neat. ;D

Offline Aichi

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 290
  • Rating: +76/-3
    • View Profile
    • Devrays
Re: Memory Size of compiled programs
« Reply #2 on: September 25, 2010, 10:36:24 am »
@ ztrumpet
Thanks. Looks like Axe is the better choose.
Is it also possible to compile to a 32KB app?
Then I must not think about needed mem.

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Memory Size of compiled programs
« Reply #3 on: September 25, 2010, 10:41:41 am »
/\maybe some day, but quigibo hasn't added support for apps larger than 16k yet
if you have problems with data storage you can just use appvars, though

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Memory Size of compiled programs
« Reply #4 on: September 25, 2010, 02:07:52 pm »
Hi and welcome here Aichi!

For Axe parser, it is possible to store the data externally to APPVARS. Your app may be 16 KB but you can have several KB of archived data (sprites, maps, etc) besides that.

Also interesting project, we need more fighting games for the calculator. Just make sure to not start too big, though, because if you never used Axe or Assembly before, it can be overhelming to start with an extremly massive project. My first TI-BASIC project ever was a RPG with only one dungeon, as example of how small I started.

Good luck!

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: Memory Size of compiled programs
« Reply #5 on: September 25, 2010, 11:47:41 pm »
Welcome, Aichi!
Just for a bit more info, an Axe-compiled prgm will be about 1.5-2 times larger than pure ASM (but you can get a lot less if you know how to optimize).




Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Memory Size of compiled programs
« Reply #6 on: September 26, 2010, 12:04:20 am »
Actually I got told that in some cases, doing the same thing in ASM will produce the same size. In any case, the BASIC program would be smaller because BASIC is ran through an interpreter. However, in both ASM and Axe case, data is considerably smaller than BASIC and of course ASM will often be smaller than Axe

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: Memory Size of compiled programs
« Reply #7 on: September 26, 2010, 12:25:19 am »
Size is definitely going to be larger for compiled Axe programs than pure ASM, but the speed will be about the same with an exception of highly math intensive programs like 3D graphics or particle systems in which case it would be a little bit slower.

I think the biggest disadvantage right now with Axe compared to assembly is not the size or speed of the program, but the difficulty of managing large projects.  Since its typed onto the calculator screen from a calculator generally, its fast and convenient to make a small program, but once you have like 5 include files and 20KB of source code, it can get pretty annoying to work with your code.  With assembly, you have an entire computer screen of code, its easy to type with the keyboard, you have no size considerations, no accidental loss of data, simultaneous editing, etc.  But currently, there aren't many good computer editors right now for BASIC/Axe.

So if this is going to be a really really big project, you might want to learn assembly.  But if you're new to assembly, you probably shouldn't work on such a big project as your first project anyway, and Axe will help transition from BASIC to assembly.  This is just my preference though.  Some people are able to manage and create incredibly huge games that basically take up the entire memory of the calculator <.<
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Memory Size of compiled programs
« Reply #8 on: September 26, 2010, 12:32:49 am »
Some people are able to manage and create incredibly huge games that basically take up the entire memory of the calculator <.<
Like me ;D *points to ROL series, Zelda: Dark Link Quest and its 210 sub-programs/40 pics, Reuben series, Mana Force 2, Metroid II/expansion and Illusiat 13*

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Memory Size of compiled programs
« Reply #9 on: September 26, 2010, 12:34:16 am »
Some people are able to manage and create incredibly huge games that basically take up the entire memory of the calculator <.<
Like me ;D *points to ROL series, Zelda: Dark Link Quest and its 210 sub-programs/40 pics, Reuben series, Mana Force 2, Metroid II/expansion and Illusiat 13*

Did you just remember everything, or did you make a reference sheet of some kind?
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 DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Memory Size of compiled programs
« Reply #10 on: September 26, 2010, 12:37:12 am »
I remembered everything :P

Well... almost... I forgot Illusiat 12 (it's larger than ROL1) :P

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: Memory Size of compiled programs
« Reply #11 on: September 26, 2010, 08:51:17 am »
Some people are able to manage and create incredibly huge games that basically take up the entire memory of the calculator <.<
Like me ;D *points to ROL series, Zelda: Dark Link Quest and its 210 sub-programs/40 pics, Reuben series, Mana Force 2, Metroid II/expansion and Illusiat 13*

Did you just remember everything, or did you make a reference sheet of some kind?
lol :P  It's funny that I thought my 2500 byte program was huge when I first made it (I was the largest program on my calc for about 4 months, before I even knew about ticalc). ;D

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: Memory Size of compiled programs
« Reply #12 on: September 26, 2010, 10:57:29 am »
Some people are able to manage and create incredibly huge games that basically take up the entire memory of the calculator <.<
Like me ;D *points to ROL series, Zelda: Dark Link Quest and its 210 sub-programs/40 pics, Reuben series, Mana Force 2, Metroid II/expansion and Illusiat 13*

Did you just remember everything, or did you make a reference sheet of some kind?
lol :P  It's funny that I thought my 2500 byte program was huge when I first made it (I was the largest program on my calc for about 4 months, before I even knew about ticalc). ;D

Lol, my first (BASIC) program ever was 20 KB. Everything's seemed so small ever since...
« Last Edit: September 26, 2010, 10:57:48 am by Deep Thought »




Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Memory Size of compiled programs
« Reply #13 on: September 26, 2010, 03:14:43 pm »
In my case it was 18 KB. Illusiat 1 was so unoptimized back in the days x.x

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Memory Size of compiled programs
« Reply #14 on: June 05, 2011, 04:26:10 am »
I won the competition of the largest basic prog: I made a Pokemon in basic (it's ugly) and it takes at least 23000 bytes. It also needs RAM for matrixes and all so... it can't be run. Or you have to cut the map.
I know, it's stupid.

And aren't we out of the topic ?
« Last Edit: June 05, 2011, 04:39:01 am by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s