• Axe Parser 5 1
Currently:  

Author Topic: Axe Parser  (Read 554910 times)

0 Members and 2 Guests are viewing this topic.

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: Axe Parser
« Reply #720 on: May 31, 2010, 04:02:34 pm »
Create the new appvar first, copy the old one to the new one, then delete the old one.  It works as long as the appvars are much smaller than the 24k of user ram, which they should be.  You can always check to make sure the appvar was created successfully before copying by making sure the pointer is not null.
___Axe_Parser___
Today the calculator, tomorrow the world!

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: Axe Parser
« Reply #721 on: May 31, 2010, 07:01:49 pm »
IMPORTANT UPDATE!

Unfortunately, or fortunately depending on how you look at it, one of the new optimizations will change the way you optimize your code.  When saving to a pointer at a static location, the return value will now be the value stored rather than the address that is being saved to.  This rule does NOT apply to locations with variable addresses like {A} or {B+L1+8}, those will remain the same as before.  Its when you save to pointers like {L1+4} or {Str1-16} that this will affect.   Both 1 byte and 2 byte storage are affected the same way.

The advantages vastly outweigh the inconveniences however.  Realize that after this release, saving to static addresses will have the EXACT SAME efficiency and code size as saving to a regular variable.  {L1+9}r+1->{L1+9}r for instance will be the same size code as A+1->A in the executable.  That saves about 4 bytes for every time you read a static pointer and 3 bytes every time you save to one.  The speed increase might be noticeable too if you use these in loops a lot.

If you still want to do tricks like this: Fill(0->{L1},100)  You can still write Fill(0->{L1}rL1,100) and it should be the same sized code in the executable.  The double byte storage is actually smaller and faster than single byte storage when using static locations by the way.  Just making sure I warn everyone first before anyone panics if their executable doesn't work right in the next version.  This is the second wave of major optimizations and the first REAL look-ahead parsing with actual backtracking and I've still got many more to go.
« Last Edit: May 31, 2010, 07:04:19 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Axe Parser
« Reply #722 on: May 31, 2010, 07:11:20 pm »
Can you read from an archived appvar using axe?

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Axe Parser
« Reply #723 on: May 31, 2010, 08:00:28 pm »
No you can't, unfortunately. I've been thinking it could be a good idea to have some file reading functions that work regardless of whether it is located in Archive or RAM. The way I'm thinking it could work is that you open a file for reading, and it internally stores a pointer and page number. Then you would call the file read functions, which could read a byte, read two bytes, or copy a chunk of data (given the offset from the beginning of the file).
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

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: Axe Parser
« Reply #724 on: June 01, 2010, 12:55:51 am »
I wish there were more tokens for this, its too bad there aren't many intuitive ones that could work for this purpose.

I am hoping that later in development, there will be an option to install an "Axe Language" pack which changes token names to more intuitive namings so then I won't have these restrictions.  You can then disable them if you need to use the calc for math and BASIC programming.  It seems very possible since there are already apps out there that change the tokens to other languages like Spanish or French.
___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: Axe Parser
« Reply #725 on: June 01, 2010, 02:37:51 am »
The update seems nice, altough I don't really get it much, still x.x

Could you give an example of code that will require to be changed after the update? I mean, post the code compatible with Axe 0.2.5 and how it should be written for Axe 0.2.6.

Unless I am misunderstanding your post?

So far I have never used any static pointer location, though, so even if your update changes some syntax when using static pointers, it shouldn't make much differences for my current programs.

Can't wait for the update, though ^^
« Last Edit: June 01, 2010, 02:38:50 am by DJ Omnimaga »

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Axe Parser
« Reply #726 on: June 01, 2010, 06:00:27 pm »
It wouldn't change the actual bytes, just how the tokens look. If you've ever played around with the language localization apps, you'll notice that you can switch between languages and your programs will be fine.
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

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: Axe Parser
« Reply #727 on: June 01, 2010, 07:35:27 pm »
I think language apps also does something like Omnicalc fonts. With the German/Deusthce app, one of the char changes to a weird german-B-like char

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: Axe Parser
« Reply #728 on: June 01, 2010, 07:41:52 pm »
I think this important update is a great idea.  Keep up the awesome work Quigibo! ;D

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: Axe Parser
« Reply #729 on: June 02, 2010, 12:32:45 am »
Darn that 3D racing game was epic ^^

Nice update Quigibo!

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Axe Parser
« Reply #730 on: June 02, 2010, 12:48:21 am »
How do you use the interrupts?
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Axe Parser
« Reply #731 on: June 02, 2010, 12:51:53 am »
There doesnt seem to be any documentation on them o.O for now all i can see is use with the Stop command

Also that 3D game kicks Ass ;D

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: Axe Parser
« Reply #732 on: June 02, 2010, 01:02:48 am »
I am wondering too XD

I assume it will use the code from a sub-routine in particular, providing it's a certain size maximum, right? (I think it gets copied to L1 or something, if I recall correctly)

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: Axe Parser
« Reply #733 on: June 02, 2010, 01:04:18 am »
Thanks!  I made the game in about 4 hours when I was bored, which I think is pretty good because it would have taken much much longer if it was in assembly.  I figured that since so many other people used Axe to made a tunnel clone, I would do the same... only differently.

The interrupt commands are fairly useless right now.  All of them are 1 byte each and so the Stop command is really efficient for quick pauses.  Each one is around a Pause 40ish and you can do :Stop:Stop:Stop:Stop up to about 8 times I think and still be less bytes than the normal pause command.  Make sure you have enabled interrupts first!

EDIT: By the way, is the new version working right for everyone's code?  I only tested it with the example programs, they all seem to work, but since I rewrote so many routines there is bound to be something I missed.  Just want to make sure I didn't make any stupid mistakes before I update the one on ticalc.
« Last Edit: June 02, 2010, 01:07:41 am by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Axe Parser
« Reply #734 on: June 02, 2010, 01:08:22 am »
I dont think the routine is copied into L1, i think that was for something like a vector table or something?  I dont remember, not sure if its right :P