Author Topic: Axe Parser  (Read 553618 times)

0 Members and 3 Guests are viewing this topic.

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Axe Parser
« Reply #960 on: July 12, 2010, 04:08:31 pm »
Loading pics...
How do you do that?
I know you do [Pic1] or whatever pic it is but then what?
Vy'o'us pleorsdti thl'e gjaemue

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Axe Parser
« Reply #961 on: July 12, 2010, 04:28:30 pm »
You could do pic1->DispGraph, and it will display on the screen immediately.

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: Axe Parser
« Reply #962 on: July 12, 2010, 04:33:27 pm »
You could also try Copy(Pic1,L6,768) to copy it to the buffer. For the back-buffer, you can copy it to L3.


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 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: Axe Parser
« Reply #963 on: July 13, 2010, 01:59:22 am »
Loading pics...
How do you do that?
I know you do [Pic1] or whatever pic it is but then what?

I'm pretty sure [Pic1] absorbs a picture into the program data (meaning that the data for the TI-OS variable Pic1 (the one you actually use in BASIC programs) is copied directly into the program). So if you had a variable Pic1 that was all blank,

Code: (Axe BASIC) [Select]
[Pic1]→Pic1

is read as

Code: (Axe BASIC) [Select]
[ ... ]→Pic1

where the ... is 756 bytes of 0. It's useful if the BASIC variable Pic1 has the sprites, one after the other, starting from the top left. That way, instead of having to find the hex code of each individual sprite and typing them into the program, [Pic1]→Pic1 will copy it all for you and store it to the static variable Pic1.

Actually, there's a good chance I have no idea what I'm talking about. I've never actually used the command, and I can't use my calculator right now, so I'm just basing this on my interpretation of the documentation. I wouldn't trust me if I were you unless someone else said the same thing :)




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 #964 on: July 13, 2010, 02:01:44 am »
Note that in [Pic1]->Pic1, the first Pic1 is not the same as the second. You could store something else to Pic2 in Axe and it would not overwrite your BASIC Pic2, if you get what I mean.

It's like [PicDataToAbsorb]->Pointer

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 #965 on: July 13, 2010, 02:07:02 am »
Deep Thought, you're exactly correct.  The only thing I might add to that, because its a new feature, is that not all OS Pic variables are created equal.  The ones that are made using StorePic are 756 bytes yes, but many pic vars made on the computer are actually 768 bytes since they can edit the last row and so the amount of data it imports will depend on the picture itself.

As for 0.4.0 features, there will be some small GUI changes probably, I'll try to check off some of those wishlist features, and hopefully there will be some more optimizations to make the code smaller possibly involving a third pass.
« Last Edit: July 13, 2010, 02:11:01 am by Quigibo »
___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 #966 on: July 13, 2010, 02:10:09 am »
I think I remember hearing about pics of over 2 KB in size before, but I totally forgot which program could create those. I believe it might have been a very old xLIB version

Offline LordConiupiter

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 339
  • Rating: +3/-0
  • Just one of the thousands of Axe-fans...
    • View Profile
Re: Axe Parser
« Reply #967 on: July 13, 2010, 08:16:12 am »
well, perhaps that would be used for 7 lvl grayscale or something, because 3 * 768 = 2304?
everytime that I was down, you would always come around, and get my feedback on the ground. (modified part from 'Seasons in the sun')

No matter how many errors are bothering you, always try to stay rel-Axe!

The HoMM project will be resumed as soon Axe 1.0.0 will be released!
Projects:
Code: [Select]
HoMM:   [==--------]    Project 'resumed': I'm suffering overwhelming new ideas being popped up in my dreams :P
tiDE:   [----------]    Explored and understood the main part of the code: just started writing a Tokenizer.



password of the week: uvanapererubupa (Any pronunciation is the right one ;) )   :D click me, and you'll be raided :D

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Axe Parser
« Reply #968 on: July 13, 2010, 10:37:58 am »
Wow...i had never understood that before. Being able to "import" BASIC pics is awesome

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Axe Parser
« Reply #969 on: July 13, 2010, 02:27:16 pm »
Another thing. I was reading through the Axe documentation, and it was saying I sould use a Str token for a pointer.  It also said L1-L6 were pointers.  Could a Str token substitute for the Axe-type L1-L6 so I don't have to work around the various corruptions?
Vy'o'us pleorsdti thl'e gjaemue

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 #970 on: July 13, 2010, 03:05:13 pm »
What corruptions are you talking about?  Im a little confused.  The reason L1-L6 are separated from the pointers like Str pointers is this: L1-L6 are pointers to free places of RAM that are *outside* your program.  Pointers like the Str pointers point to data that is *inside* your program.

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Axe Parser
« Reply #971 on: July 13, 2010, 03:46:59 pm »
This is the hardest concept in axe.  Okay, so in basic, you do "Hello"->Str1.  That stores the string "Hello" to the variable Str1.  As a basic programmer, that's all that you have to worry about.  However, behind the scenes, this what happens:
  • Calculator looks up variable Str1
  • Calculator finds variable in memory
  • Calculator returns the variable data.  (In this case, "hello")
In axe, it's different.  the strings are stored inside the program, and the calculator doesn't have to look them up.  Say I do this: "Hello"->Str1.  It's the same command as before, but in this case, when the program is compiled, the compiler sees that line and does this:
  • Writes the word "hello" into the compiled program, followed by a zero.  (The zero is to tell any commands that access it, that there is no more text.)
  • Finds the location of the "h" in "hello".
  • Puts that value into Str1, so that whenever it is accessed again, it returns that value instead of the String itself
Also, because the strings are zero terminated, and Str1 points to the "H" character in memory, you can do stuff like Str1+3, which points to the second "L" in memory.
So try this program:
Code: [Select]
"HELLOL"->Str1
ClrHome
Disp Str1+3
pause 5000
That routine displays LOL, and then pauses for about 5 seconds.

Now, for the L1-L6 variables.  They are all pointing to locations in memory where you can store things as well.  Try the same program, but replace Str1 with L1.  It doesn't work, does it?  Well, that's because you can't really store into L1 like that.  When using L1, since it's already predefined to certain locations, You can only access it by using {L1+n}, where n is the the byte you want to access, starting with 0.  For example, the first byte of L1 is {L1}.  It takes a while to get use to, but once you do, it's a very powerful feature.  Just remember, Basic is not Axe, and Axe is not basic.
« Last Edit: July 13, 2010, 03:47:35 pm by graphmastur »

Offline LordConiupiter

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 339
  • Rating: +3/-0
  • Just one of the thousands of Axe-fans...
    • View Profile
Re: Axe Parser
« Reply #972 on: July 13, 2010, 04:22:01 pm »
wow! that's a very clear and complete explanation! could even eventually be used in the documentation :P
everytime that I was down, you would always come around, and get my feedback on the ground. (modified part from 'Seasons in the sun')

No matter how many errors are bothering you, always try to stay rel-Axe!

The HoMM project will be resumed as soon Axe 1.0.0 will be released!
Projects:
Code: [Select]
HoMM:   [==--------]    Project 'resumed': I'm suffering overwhelming new ideas being popped up in my dreams :P
tiDE:   [----------]    Explored and understood the main part of the code: just started writing a Tokenizer.



password of the week: uvanapererubupa (Any pronunciation is the right one ;) )   :D click me, and you'll be raided :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 #973 on: July 15, 2010, 03:41:34 am »
From now on, I'm going to greet people with "Hellol" :P

I'm changing a token name.  You know how programs have the "prgm" token in front of them?  Well, I'm doing the same thing with appvars.  The problem is that its impossible to distinguish between the lowercase "v" and the recursive "v" because they share an identical ascii character.  It has led to confusion in the past, and I think it will do so in the future so I've decided to change it to "apvr" to mimic the way "prgm" is formatted so that it is both distinguishable and recognizable as to how to use it since its interchangeable with prgm.  Thoughts?
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Magic Banana

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 371
  • Rating: +77/-1
  • It's not an apple, it's a ... magic banana.
    • View Profile
Re: Axe Parser
« Reply #974 on: July 15, 2010, 04:13:18 am »
I like it. It would really help distinguish an appvar v from just a normal lowercase v, especially if some people don't understand that "vString"->Str1 actually pulls from an appvar instead of just being an interesting name for a string.
I do sprites and stuff, so yeah.

Quote from: yunhua98
i'M NOT SURE WHAT A SWORD SKILL IS BUT HERE'S THE SWORD ANIMATION FROM THE TWO SPRITES ON PG 13