Table of Contents


Chapter 1: Introduction to Axe Parser

1.1: Using Axe
1.2: Setup of an Axe program
1.3: Memory Structure, with Respect to Axe

Chapter 2: Using Memory in Axe

1.1: Variables
1.2: Name Strings
1.3: SafeRam areas
1.4: Pointers
1.5: Data Storage and Manipulation
1.6: Archive memory and files
1.7: Commands that deal with memory

Chapter 2: Axe, the Basics

2.1: Text Display
2.2: Drawing
2.3: Using Jumps and Subroutines
2.4: Control Blocks
2.5: Mathematical Operations
2.6: Commands for Basic Axe

Chapter 3: Constructing an Interface

3.1: Saving Data
3.2: Sprites
3.3: Tiles and Tilemaps
3.4: Collision Detect
3.5: Key press/Input Detection
3.6: Screen v. Buffer v. Back buffer
3.7: Commands for Interface design

Chapter 4: Advanced Game Mechanics

3.1: Real-time programming
3.2: Artificial Intelligence
3.3: Interrupts
3.4: I/O linking in Axe
3.5: CALCnet2.2 as a linking protocol



1.1: Using Axe


Axe is a programming platform designed by Quigibo . It is currently in late beta stages. It is a Flash Application, compatible with the z80 line of calculators (TI-83+/84+). It allows you to compile your programs into z80 executables, much like true assembly is. Axe has a command syntax similar to TI-Basic, but it is much more powerful. Have a look at the Commands list, provided on the tutorials page, to see specific instructions that Axe currently supports.

What sets Axe aside from its programming counterparts? It’s ease of use, and its power, for a language so easy to use. This tutorial will delve into using Axe to design games. Then, it will explore using CALCnet2.2, the robust calculator network designed by Kerm Martian, to achieve multiplayer linking.




1.2: Setup of an Axe Program


Every Axe program must have a name, at it is written using the program editor provided by the TI-OS. It is important to give this program, called your “source program”, a name that is different than the name you want your executable to have. Let us first deal with the setup of an Axe program.

Every Axe source program needs a header that tells the Parser what to name the output file. This is done using the comment denoting character, “.”.

PROGRAM:AXSRC
.SOURCE

This causes the Parser to output the executable to a program named SOURCE. If you wish, you can include a description after the name. For example:

PROGRAM:AXSRC
.SOURCE an example program

This has the same result as the program above, but the second one has a small description. Henceforth, the Parser will completely ignore lines of code preceded by a period (.).

Axe Parser also has the capacity to compile programs for certain shells by including a specific header: DoorsCS, MirageOS, and ION. This may be set in the Options menu. If you choose not to compile for a shell, you may simply set the Parser to the “No Shell” option. Finally, the Parser gives one more option. For those who wish to be daring, the Parser can compile your code into an application. This code is very hackish, and is therefore inefficient. However, Quigibo has assured me that this compiling mechanism is stable, meaning it does not endanger sensitive parts of your calculator. However, this option should be avoided if it can be.

Programming in Axe has elements of both TI-Basic programming and assembly programming. Axe provides the ease of use of TI-Basic-like commands, making the language easy to learn and easier to code in. However, data in Axe functions like data in assembly. This means you must be familiar with the usage of pointers, referencing memory by bytes, and sometimes by bits. It means that you can do math with variables, because they are, in fact, simply numbers. All of this will be discussed later.



1.3: Memory Structure, with Respect to Axe


In Axe, none of the variables you regularly program with exist. All that exists is your code. You use the variables as pointers to data in your code, and thenceforth use those variables to reference the data. You have several variable sets available to you in Axe. These are listed below, by how they are named on calculator.

GDB0-9
Pic0-9
Str0-9

Furthermore, Axe supports longer names for these variables. You may annex up to two letters (A-Z) to the end of any one of the above to form a variable name. So, this means that all of the following are examples of valid names:

GDB0
GDB1A
GDB3CA
Pic4
Pic6N
Pic9AZ
Str6
Str9A
Str2VA

While these names look a lot like TI-Basic variables, they are not. They are simply pointers, used by the programmer to reference large segments of data. We will discuss the importance and usage of them later.

The memory of your calculator consists of a series of bits, utilizing binary numerals. There are eight (Cool bits in one (1) byte of memory. Similarly, there are two (2) hexadecimal numerals in one (1) byte of memory. Using Axe, you will need to know how to use and manipulate data in hexadecimal, especially if you are making tile-maps for an RPG. However, most of Axe’s commands accept input in standard decimal and Axe does provide conversionary tokens for input in hex and binary.

There are a few key things you need to know, going forward. You must read and write data directly to bytes either one byte at a time or two bytes at a time. This is because, in assembly, there are two types of numbers. There are one-byte numbers (0-255) and there are two-byte numbers (0-65536). These are positive numbers. If you underflow the stack of numbers, you move to the top and if you overflow it, you move to the bottom. There are ways to use negative numbers, and Axe makes it fairly trivial to do so. This will be discussed later.

Now, remember, as it is with assembly, there is a non-trivial difference between addresses and data. Each byte in memory has an address, starting at zero and continuing until the device runs out of memory. The offset from zero of a byte is its address. Thus, a byte at offset 200 would have an address of 200. This is not the same as the value of byte 200. Axe makes the difference easy to see. Let us assume that you have already stored the number 7 to the byte at 200. Well, you must store the value to a pointer.

200→C
C ; returns the address of the byte, 200.
{C} ; returns the value of the byte, 7.

In Axe, the curly brackets indicate that we are reading or writing data, not getting an address. They are very important.



Current Footnotes:

1 Kevin Horowitz, aka Quigibo is the designer of Axe Parser, and its programming platform. This tutorial borrows some material from the Official Documentation.
Looks interesting. What format will it be in, pdf?
I'm writing it with Word. I will likely turn out a .doc version, and a .pdf version.
Seems coool ACagliano, good luck with it Wink

.doc? Nooo! Beware with """. """ in word are different, and I mean cotation marks. So we can't copy code :S
ScoutDavid wrote:
Seems coool ACagliano, good luck with it Wink

.doc? Nooo! Beware with """. """ in word are different, and I mean cotation marks. So we can't copy code :S
I think it's possible to turn that "feature" off.
JosJuice wrote:
ScoutDavid wrote:
Seems coool ACagliano, good luck with it Wink

.doc? Nooo! Beware with """. """ in word are different, and I mean cotation marks. So we can't copy code :S
I think it's possible to turn that "feature" off.


What is the issue with that again?
JosJuice wrote:
ScoutDavid wrote:
Seems coool ACagliano, good luck with it Wink

.doc? Nooo! Beware with """. """ in word are different, and I mean cotation marks. So we can't copy code :S
I think it's possible to turn that "feature" off.


I gotta check that out.


@ACagliano, this is the problem:

""""""""""""""""" This are quotation marks used for strings in all programming languages.

“”””””””””””””””””””””””””””””” These are quotation marks made using Word and will not work as quotation marks in programming.
What he's trying to say is be careful of Smart Quotes. Good luck on this, and it's totally possible to turn off smart quotes.
Nice, keep working on it.
I particularly strongly anticipate the CALCnet + Axe section, and may even consider incorporating that in the CALCnet Whitepaper if I find it to be of sufficiently-high quality.
The tutorial itself will be posted on omnimaga only in its beta stages (as that site is the home of Axe Parser and the best go-to for editing on it), unless Kerm asks me to post here as well. However, the beta version of the CALCnet section will be here, so Kerm can review its accuracy, as will the final edition of the entire project.
Post it here too! Razz
Post the whole thing here!
[Edit by Kerm. ACagliano posted an update.]
Great start there, ACagliano. Perhaps it would be best if instead of repeatedly adding incremental updates in posts, you keep editing the first post with the current full version, and just write a short post at the end of the thread each time mentioning whatever new things you added?
Ok
ACagliano wrote:
Ok
I edited your respective posts as per my suggestion, hope you don't mind.
KermMartian wrote:
ACagliano wrote:
Ok
I edited your respective posts as per my suggestion, hope you don't mind.


Not a problem.
How's this tutorial going, ACagliano? I'm very anxious to hear you getting CALCnet working properly in Axe.
Anymore updates? Please?
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 2
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement