Omnimaga

Calculator Community => Major Community Projects => The Axe Parser Project => Topic started by: ClayBread on January 01, 2017, 11:35:56 am

Title: Getting Started with Axe Parser
Post by: ClayBread on January 01, 2017, 11:35:56 am
Are there any well known tutorials for learning Axe Parser? Most of the tutorials that I have looked into are incomplete.
Or, would it just be better to try to self-teach and learn the commands through using them?

Thanks.
Title: Re: Getting Started with Axe Parser
Post by: Sorunome on January 01, 2017, 12:24:49 pm
What helped me is to read the documentation ( http://axe.eeems.ca/Documentation.pdf ) and then just start asking questions :)
Title: Re: Getting Started with Axe Parser
Post by: Runer112 on January 01, 2017, 12:29:40 pm
Reading the included Documentation.pdf, although it's somewhat outdated and certainly doesn't cover every language feature, is probably the best introduction to the language. I'd also recommend reading Changes.pdf, which can be found in the Axe 1.0.0 release (https://www.omnimaga.org/the-axe-parser-project/latest-updates-(***do-not-post-here!***)/?action=dlattach;attach=8584) (but don't actually use Axe 1.0.0), as it details some important language features added with that release that aren't covered in the main documentation.

After reading both of these, I would finally recommend looking through Commands.html, which is the exhaustive language feature/command list, and pick out and play with commands that interest you. This document is by far the most useful language reference, and I recommend always having it on hand while using and still learning the language. Some people just view it in their browser, some people print it out, and now, thanks to @E37, you can even view it right on your calculator (https://www.omnimaga.org/the-axe-parser-project/axe-parser-on-calc-documentation/msg404805/#msg404805) (get it via the first attachment to that post, AxeDoc.zip).

There's also one excellent, very comprehensive Axe tutorial (https://openclassrooms.com/courses/l-axe-parser), but there's a slight caveat: it is written in French. Although there will be some annoying translation errors, I believe that running through it with a browser-based translation service is still the best comprehensive Axe tutorialization experience there is.
Title: Re: Getting Started with Axe Parser
Post by: ClayBread on January 01, 2017, 12:38:37 pm
Thanks for the help. I'll try these methods out.



To add on, I only have a TI 84 +. Is my current calculator compatible with Axe, or do I need to use a different one? I have a TI 84 + C Silver Edition, but I can't make a ROM from it for an emulator called Wabbitemu.

Thanks for all the help thus far.

Edit (Eeems): Merged double post
Title: Re: Getting Started with Axe Parser
Post by: Runer112 on January 01, 2017, 01:17:59 pm
Oh boy... well this might be a bit of a bummer.

Just to verify that you actually have a TI-84+ C Silver Edition: your calculator looks like this, correct (though it may have an accent color other than black)?

(http://datamath.org/Graphing/Images/TI-84PlusCSE.jpg)

Most programs/applications written for the older, monochrome TI-83+/84+, including Axe, are incompatible with the newer TI-84+ C Silver Edition (TI-84+CSE for short). The TI-84+CSE was TI's first foray into a color model in the 83+/84+ line, and not a very good one. It's more or less dead to TI, and to the community, being replaced by the newer and better TI-84+CE. The TI-84+CE has an up-and-comping on-calc compiler project similar to Axe, ICE (https://www.cemetech.net/forum/viewtopic.php?t=12616), and has a great C toolchain (https://github.com/CE-Programming/toolchain) (not on-calc), but the TI-84+CSE has nothing comparable.

When did you get this calculator? If you purchased it recently, I would honestly recommend attempting to return it and buying a TI-84+CE instead. If you can't do this, you're unfortunately stuck with a nice color screen but few good programs/applications to make use of it because the underlying hardware is horribly underpowered. :(
Title: Re: Getting Started with Axe Parser
Post by: ClayBread on January 01, 2017, 01:43:03 pm
That's a bit of a shame. I purchased the TI 84+ CSE around a year and a half ago. I purchased the TI 84+ about a month ago, and I could probably sell it if needed, because it's in good condition. I could dump some money into a TI 84+ SE, but it costs a lot of money, at least for me. With the CSE, it's so dead that when I tried to look up the pixel dimensions of the screen, I couldn't find anything. That really does suck.

What makes a TI 84+ SE worth so much more than other TI calculators? It doesn't have any obvious differences, as far as I can see.

Thanks.
Title: Re: Getting Started with Axe Parser
Post by: Runer112 on January 01, 2017, 02:21:31 pm
Oh wait... do you actually have a plain TI-84+? If so, that's totally fine for using Axe. The TI-84+SE is just a TI-84+ with more storage, which is mostly unnecessary.

If anything, you could sell the TI-84+CSE. For hobbyist usage, it's actually less useful than the older monochrome calculators (but the newer TI-84+CE is probably better than both).
Title: Re: Getting Started with Axe Parser
Post by: ClayBread on January 01, 2017, 02:34:12 pm
Alright. Thanks for telling me so. One last question. How do I access Axe commands? They don't seem to be in catalog.

Thanks.
Title: Re: Getting Started with Axe Parser
Post by: shmibs on January 01, 2017, 05:39:41 pm
axe uses the same token set as TI-BASIC, but the functionality associated with each token is completely different. commands attempt to use tokens with names appropriate for their functionality (like Circle( being used for drawing circles), but some commands can't be assigned this easily to an existing token name. thus, the axe application uses a token hook to override the names of those tokens in the interface.

if you check Commands.html (https://axe.eeems.ca/Commands.html), which runer mentioned above, you can see which axe tokens override which interface tokens (if any) by checking for the green text right-aligned in the commands column.

in order to enable these alternate names, then, send the axe application to your calculator, run it, and choose from there to install the token hook. this token hook can be disabled again from the same application, or it can be wiped during a ram clear, meaning you'll have to reinstall it any time your calculator crashes (which will probably be often, if you're messing around with axe for the first time). this process can be automated with an application called zStart ( http://www.ticalc.org/archives/files/fileinfo/429/42907.html (http://www.ticalc.org/archives/files/fileinfo/429/42907.html) ), which also has lots of other potentially useful functionality

have fun ^_^
Title: Re: Getting Started with Axe Parser
Post by: ClayBread on January 01, 2017, 06:46:25 pm
Alright. I'll try to get started with the help that I have been given. Thanks once again for all the help that I have been given. I will try to make something productive with this.

Thanks.
Title: Re: Getting Started with Axe Parser
Post by: shmibs on January 01, 2017, 08:03:42 pm
you're welcome ^_^

and don't worry about being "productive"; just have fun! that's when productiveness is most likely to happen anyways
Title: Re: Getting Started with Axe Parser
Post by: Eeems on January 02, 2017, 02:41:46 am
Here is a list of tutorials (http://www.omnimaga.org/axe-language/specific-tutorials-list-%28axe%29/). Quite a few of them will be kinda out of date, but they will still be useful.
Title: Re: Getting Started with Axe Parser
Post by: ClayBread on January 03, 2017, 09:53:25 pm
Sorry to be completely clueless, but, I am still unsure on how to enable token hooks for Axe. I assumed that there would be more detail on how to enable token hooks, but there was none, and the file "tokenhook" included in "Developers" of "Axe1.2.2a" is invalid, and cannot be installed onto a calculator. After searching the menus of the application itself, there is no option, or selection, that allows for installation of a different application. I have not yet installed MirageOS onto my calculator, so is that what I need here?

Sorry for the confusion. I was wrong to assume that tutorials would include material on this.

As a side note, no combination of words in Google's search engine yielded any results, either.

Thanks for the help, and sorry once again for being so clueless.
Title: Re: Getting Started with Axe Parser
Post by: shmibs on January 03, 2017, 10:36:09 pm
tokenhook.inc is an include file, which is used by assembly developers writing programs that interact with the axe application itself and is sort of equivalent to a library used in other languages.

simply running the axe application is enough to install the hook. however, tokens will only be replaced while in the program editor and editing an axe source file (a file which, on its first line, has a . [used to indicate a comment in axe] followed by the name of the file that should be generated when compiling the file).

edit: added a screencap
Title: Re: Getting Started with Axe Parser
Post by: ClayBread on January 04, 2017, 08:51:48 am
Okay. Thanks for the help, and sorry for not understanding your previous statement on how to install Axe's token hooks. I'm glad that you all have been so willing to help me get into this.

Thanks.

Edit (begin of second consecutive post):

I went through with some of the guides. I think I understand Axe a lot better now. But, I do have a few questions, still, for ease of use.
So, first. Is it possible to store data to a single nib, or nibble of data? If it is possible, how would I do so? This would be very helpful in gamemaking, with things like coins.
And, next. Is there a specific sprite editing tool for making files compatible with the TI-84+? If so, where can I download it? I feel like making nice title screens for games, but I don't know where to look.

Thanks for the help, and the tutorials. :)
Title: Re: Getting Started with Axe Parser
Post by: Runer112 on January 22, 2017, 02:52:07 pm
So, first. Is it possible to store data to a single nib, or nibble of data? If it is possible, how would I do so? This would be very helpful in gamemaking, with things like coins.

The answer can be found in the command list (http://axe.eeems.ca/Commands.html#dataAndStorageCommands). Just like you can read from a byte address with {PTR} and store to a byte address with →{PTR}, you can read from a nibble address with nib{PTR} (really the iPart( token) and store to a nibble address with →nib{PTR}. As explained in the command list entry, nibble pointers should be multiplied by two, as there are two nibbles in a byte.

And, next. Is there a specific sprite editing tool for making files compatible with the TI-84+? If so, where can I download it? I feel like making nice title screens for games, but I don't know where to look.

For making sprites on-calc, the best tool is certainly tileIt! (http://www.ticalc.org/archives/files/fileinfo/448/44872.html), a sprite and tilemap editor made especially for Axe. For making sprites off-calc, you have a couple of options. I think one of the best options for Axe is Pixelscape (http://clrhome.org/pix/), an online tool also made especially for Axe and with compatibility with tileIt!.
Title: Re: Getting Started with Axe Parser
Post by: ClayBread on January 22, 2017, 05:25:20 pm
Alright. Thanks for the help. My mistake with storing to nibbles was trying to put what I wanted to store in brackets. That was likely the problem, but I wanted to make sure I was at least looking in the right place. Also, thanks for the sprite tools. They will be very useful.

Thanks.

Edit (Double post):

Alright. So, another question. Is it possible to clear out a matrix, such that I could store to it once again? This would be very helpful for things like changing levels in a game, or moving to a different section of a map.

Thanks.
Title: Re: Getting Started with Axe Parser
Post by: E37 on January 24, 2017, 03:55:40 pm
Zeroing a matrix? easy
just do :Fill(PointerToMatrix,Width*Height,0)
That will fill the matrix with zeros.
Title: Re: Getting Started with Axe Parser
Post by: ClayBread on January 24, 2017, 07:55:13 pm
Oh. I was unaware that you could use matrices in Axe. That's incredibly helpful, though. The tutorial that I looked at to learn Axe never mentioned matrices, even if they are very helpful in some cases. But, if possible, how could I clear memory following a pointer such as GDB1? It would still be helpful to know, because using a pointer as opposed to a matrix could be more efficient in memory. If you have a good solution to this, do tell, please.

Thanks.
Title: Re: Getting Started with Axe Parser
Post by: Runer112 on January 24, 2017, 09:07:10 pm
"Matrices" in Axe generally just mean blocks of data that you treat like a matrix. There is no built-in support for matrices, but given a W*H*Z block of memory pointed to by M, it can be treated like a matrix of width W, height H, and entry size Z. An element (X,Y) can be addressed with Y*W+X*Z+M (note that order of operations in Axe is left-to-right so Y*W+X, not just X, is multiplied by Z).
Title: Re: Getting Started with Axe Parser
Post by: ClayBread on January 26, 2017, 01:21:29 pm
That's really helpful, considering the way that Ti-83 BASIC treats matrices. When I was doing BASIC, I disliked how making a matrix would take up so much RAM that the calculator became pretty much unusable. Well, that's nice to know.

Thanks for telling me that.