Author Topic: Axe Parser  (Read 552885 times)

0 Members and 3 Guests are viewing this topic.

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 #645 on: May 25, 2010, 07:03:23 pm »
what kind of fun trickery could you do with the vat data?

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 #646 on: May 25, 2010, 07:27:00 pm »
Well, you could change the type of variable between program, protected program, and appvar :)
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

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 #647 on: May 25, 2010, 07:30:16 pm »
Do you mean you could just convert a PRGM to APPVAR, lock programs, hide them and even convert a string to a picture?

EDIT: or even rename them?
« Last Edit: May 25, 2010, 07:31:07 pm by DJ Omnimaga »

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 #648 on: May 25, 2010, 07:47:00 pm »
Do you mean you could just convert a PRGM to APPVAR, lock programs, hide them and even convert a string to a picture?

EDIT: or even rename them?
I think so, yes (though renaming to a different name length would be somewhat difficult in Axe)
"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 #649 on: May 25, 2010, 07:54:59 pm »
Hmm... I like the idea of having a command to return the VAT pointer, but it seems like it would be too low level to work with.  You would need to know all the equates to change the type for instance and know how that data structure looks in general to change anything.  Although it would be easy to add, I think it would just require too much assembly knowledge which is what I'm trying to avoid in this project.

If I ever do add it, it would be at the very end of the project where I just add a bunch of "undocumented" instructions (which actually are documented separately) but for assembly programmers who want to do some really low level stuff.
___Axe_Parser___
Today the calculator, tomorrow the world!

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 #650 on: May 25, 2010, 08:00:42 pm »
I think that's a good idea (the undocumented idea). :D  I'm glad you're back, but wow, that's a hard test!  Also I think it should be SortA(ptr, size). ;D

Oh, and I really like the VAT Pointer idea. :)
« Last Edit: May 25, 2010, 08:01:03 pm by ztrumpet »

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 #651 on: May 25, 2010, 08:03:19 pm »
Nice idea Quigibo. Personally, once the project is nearly done, I would add those lower level commands, but warn the user that those commands are not necessary to make great Axe programs and they are just for people who got ASM knowledge or wants to go lower level. The main doc part needs to remain for higher level language programmers and as user-friendly as possible.

We also need to keep in mind about people who might accidentally mess things up very bad

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 #652 on: May 25, 2010, 08:05:57 pm »
Nice idea Quigibo. Personally, once the project is nearly done, I would add those lower level commands, but warn the user that those commands are not necessary to make great Axe programs and they are just for people who got ASM knowledge or wants to go lower level. The main doc part needs to remain for higher level language programmers and as user-friendly as possible.

We also need to keep in mind about people who might accidentally mess things up very bad
Yes.


Oooh, I just had an idea!  Can you have an option in the App to compile with [On] to break hook.  It wouldn't be hard, as TI's already written the routines for this already.  If you used custom interrupts, then you could just chain them.  Could you do this for debugging? ;D

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 #653 on: May 26, 2010, 03:22:50 am »
@ztrumpet The [on] interrupt will come eventually.  But keep in mind that only protects you from infinite loops and NOT from writing data in the wrong places.  Also, it does not allow you to to use your own interrupts in this mode, however, you can still add quitting code in the custom interrupt yourself.


Well, I'm rewriting the way number parsing works.  I have to or else I can't implement some new optimizations.  I'm grouping every single routine that can possibly return a constant into a single read-number routine.  That includes Integers, Hex, Binary, Characters, Tokens(new), Pointers, and everything else.  The goal is to make all expressions that evaluate to constants be single constants, not just pointers.

Now, I ran into some really cool syntax problems.  I was going to include multiplication and division in these optimized routines which can really help sometimes.  For instance, when using *256 coordinates you can type 44*256 to make 44 the coordinate and Axe automatically multiplies this precompile time.  But then I realized there was a slight technical problem with doing this.  What if you typed A/2/2 to do faster division?  Axe would automatically optimize this to A/4 which although it is actually optimized in terms of size, it definitely isn't in terms of speed.

So, I think I will only optimize multiplication and division if the first number is a constant rather than if the first operation is a constant operation.  However, I will still optimize addition and subtraction both ways since you never have these problems with those operations becasue there's no speed loss from grouping individual operations.

This might take a while to re-code a bunch of routines to handle the new method, but I've already done the bulk of it and its turning out pretty good so far.
___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 #654 on: May 26, 2010, 03:28:56 am »
will this cause some coding syntax changes? Sounds cool btw.

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 #655 on: May 26, 2010, 03:36:50 am »
Nope.  Only size decreases :D
___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 #656 on: May 26, 2010, 03:58:01 am »
Cool!

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 #657 on: May 26, 2010, 08:07:32 am »
Cool! :D
I also like that they'll be a [On] interrupt eventually. :)  Thanks! :D

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Parser
« Reply #658 on: May 27, 2010, 06:37:16 pm »
I'm a bit confused about getting GetCalc working to make application variables. When I try to make an application variable, it returns a valid pointer, so it would seem that it was successful. However, when going into the AppVars memory management section, it's not there. And it's more than just not visible in the AppVars. The program checks to see if it exists first so it won't create an AppVar if it already exists, and when I run the program again, it says it doesn't and makes a new one. It seems like it's adding the data for the AppVar to RAM but not properly labeling it, because each time I run the program, the amount of free RAM as reported by memory management does decrease. Can anyone explain what's going wrong?

Code: [Select]
.S S
"S"→Str1
GetCalc(Str1)→P
!If P
GetCalc(Str1,9)→P
End
« Last Edit: May 27, 2010, 06:43:00 pm by Runer112 »

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 #659 on: May 27, 2010, 07:02:38 pm »
You need the prefix "v" in the Str1.

That means it should show this:

Code: [Select]
"vS"->Str1
The v is question is [2nd]+[8].
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