Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: Raylin on February 28, 2010, 06:35:05 pm

Title: Axe for Dummies (like me)
Post by: Raylin on February 28, 2010, 06:35:05 pm
You can only see the word FastCopy so many times before you feel like a retard.

If anyone could put some of the commands in layman's terms...?
Title: Re: Axe for Dummies (like me)
Post by: Geekboy1011 on February 28, 2010, 07:12:48 pm
well lets see fast copy i believe is the command that updates the graph buffer(the screen b4 it gets updated) to the lcd (what we actually see)
so it basically just updates the screen



what else ???

also i am confused on teh whole L1 L2 L3 thing at the bottom of the commands page what are they exactly ??
Title: Re: Axe for Dummies (like me)
Post by: Quigibo on February 28, 2010, 07:16:38 pm
FastCopy is just a name of an assembly routine.  It has nothing to do with Axe Parser itself other than that Axe uses this routine (err.. it doesn't anymore, it used to).

The instruction set lists it in the documentation as:

DispGraph - Draws the buffer on the screen.

I think its a pretty straightforward command.  Do you have any questions in particular?  I haven't made an Axe tutorial yet and I don't think I will even get started until its more stable.  The best thing to do is look at the source code for the example programs and play around with it.

EDIT:
L1-L6 are just locations in RAM.  When you write {L1+4} you are saying "The byte that is 4 bytes after the location of L1" just like you would do L1(5) in basic.  It would be 5 instead of 4 in basic because you start counting at 1 instead of 0.
Title: Re: Axe for Dummies (like me)
Post by: Raylin on February 28, 2010, 07:22:42 pm
The new pointer function, in particular.
Title: Re: Axe for Dummies (like me)
Post by: Builderboy on February 28, 2010, 07:22:59 pm
L1 is not a list in the traditional sense that we think of lists in Basic.  In Asm, memory is memory, there is no difference between pictures, sprites, and strings.  L1 is not a list, because Asm deals only with memory. L1 is a pointer. What that means is that in the calculator, there are places of memory that are unused, and that are free to be used my you, an axe programmer.  Each list pointer hold the location of these 'safe' places, and allows you to write and read to them.  For example L1 points to the locations know to asm programmers as 'SaveScreen'.  All we need to know is that its a 714 byte space of free memory to use :) It has essentially 714 element, each holding a single byte.  So to write to the first element, you would do:

:#->{L1}

because L1 represents the 1st element of the 'SaveScreen' chunk of memory.  To write to other locations in the PlotScreen, you would just add a number to the location.  Like to store to the 3rd, you would add 2 to L1.

:#->{L1+2}

EDIT: Ninja'ed :P

Does that make more sense?  The pointers readme in the documentation might help a bit if you are still confused.  And if I am wrong Quigibo, please inform me! ;D
Title: Re: Axe for Dummies (like me)
Post by: Quigibo on February 28, 2010, 07:30:04 pm
That's correct, but you started mixing up the words "SaveScreen" and "PlotsScreen".  L1 is "SaveScreen".

But like Builderboy said, you don't need to concern yourself with the names, just know that there's are about 700 bytes there you can use for reading and writing.
Title: Re: Axe for Dummies (like me)
Post by: Geekboy1011 on February 28, 2010, 07:35:21 pm
ok that actually helps a lot XD

opne last small question for me then i think i get most of it we con only count up to 255 in 1 byte of space right  or what can we store in 1 byte of space as that is a bit confusing as well X.x
Title: Re: Axe for Dummies (like me)
Post by: Quigibo on February 28, 2010, 07:52:34 pm
Yeah, just one byte 0 to 255 (or -128 to +127 if you subtract 128 after reading the byte)

Lets say this were in base 10.  If I had a 4 digit number like 5827 but I can only fit 2 digits in a byte, then only the low order part, the "27", would be stored and the "58" would be ignored.  The 16-bit numbers that Axe uses can be broken into a 4 digit number in base 16, hexadecimal.  So in a number like 2A7C, only the "7C" would get stored into the byte.

It is possible to store a 16 bit number (0 to 65535) into 2 bytes using a routine like this:
:A/256->{L1}
:A^256->{L1+1}

And reading the 2 byte number could be like this:
:{L1}*256+{L1+1}->A
Title: Re: Axe for Dummies (like me)
Post by: Geekboy1011 on February 28, 2010, 08:45:11 pm
alright that helps alot ty quigbo and builderboy :)

actually one more question how would i say read the ans var in a program for say i wanted to make a subroutine for a basic game ??
Title: Re: Axe for Dummies (like me)
Post by: calc84maniac on February 28, 2010, 08:52:22 pm
alright that helps alot ty quigbo and builderboy :)

actually one more question how would i say read the ans var in a program for say i wanted to make a subroutine for a basic game ??
Code: [Select]
:Asm(EFD74AEFEF4AEBYou can then store to a variable.
Title: Re: Axe for Dummies (like me)
Post by: Geekboy1011 on February 28, 2010, 09:28:56 pm
so i would put that in the program and it basically points to ans for me ??????????
Title: Re: Axe for Dummies (like me)
Post by: calc84maniac on February 28, 2010, 09:31:09 pm
so i would put that in the program and it basically points to ans for me ??????????
It converts Ans to an integer (must be from 0-9999) and then you can do :->A to store it to A

And sorry, hit Modify on your post instead of quote :(
Title: Re: Axe for Dummies (like me)
Post by: Geekboy1011 on February 28, 2010, 09:33:49 pm
lol thats ok

and ty that will help alot as i think i might use axe to help make a few simple and fast routines for crimson as it should be faster than doing it in basic
:)
Title: Re: Axe for Dummies (like me)
Post by: miotatsu on February 28, 2010, 09:40:56 pm
could someone go in-depth on these things, such as:
:Asm(EFD74AEFEF4AEB <-what exactly is this asm routine doing? EDIT: was already answered while typing, skip this one :X

:A/256->{L1} <- is "A" 2 bytes in size? and why exactly are we doing these two things :{O
:A^256->{L1+1}
:{L1}*256+{L1+1}->A <- and what exactly are we doing here?
I have yet to try Axe, but i am curious of these things, and have been following it closely :X
Title: Re: Axe for Dummies (like me)
Post by: Eeems on February 28, 2010, 09:43:52 pm
Hmm, that's interesting.
How would you access lists/strings/matricies? And how hard would it be to return a variable to ans?
Also I was wondering, since L1-L6 are pointers in memory, does that mean you can access all areas of ram? But by entering different values to call different areas?
Title: Re: Axe for Dummies (like me)
Post by: Builderboy on February 28, 2010, 10:23:51 pm
Hmmmmm that might actualy be true, because you can run

:Disp L1>Dec

And it outputs 34594.  This shows how all L1-L6 really are is locations! :D So if we find the locations of other things (like flags for example) we could write some pretty interesting routines.
Title: Re: Axe for Dummies (like me)
Post by: Eeems on February 28, 2010, 10:29:08 pm
Yeah that's what I was thinking.
Title: Re: Axe for Dummies (like me)
Post by: calc84maniac on February 28, 2010, 10:32:02 pm
It would help if hex constants were allowed (hint hint, Quigibo ;) )
Title: Re: Axe for Dummies (like me)
Post by: Quigibo on March 01, 2010, 02:08:21 pm
I am thinking of adding hex soon.  Maybe even add ">Rect" do display hex numbers.  Right now, if you need $ABCD, you can do this: Asm(21CDAB)

Edit: Fixed little endian.

Oh and that routine I made to store a 16 bit number works like this:

When you divide a number by 256, a number in hexadecimal like $9D93 becomes $009D so it transfers the upper byte to the lower byte.  This is just like dividing in decimal. 2310 divided by 100 is 0023 if we ignore fractions.  When you do multiplication by 256, the opposite happens.  The low order byte moves to the high order byte.  $9D93 times 256 is $9300.  When you do modulus 256, it means that you only take the remainder of the division, so $9D93 becomes $0093 cutting off the high order byte.  However, I just realized that you don't need this since its automatically cut off anyway.  It can actually be this:

Write:
:A/256->{L1}:A->{L1+1}
Read:
:{L1}*256+{L1+1}->A
Title: Re: Axe for Dummies (like me)
Post by: calc84maniac on March 01, 2010, 02:16:32 pm
I am thinking of adding hex soon.  Maybe even add ">Rect" do display hex numbers.  Right now, if you need $ABCD, you can do this: Asm(21ABCD)
Remember little endian though. It would be Asm(21CDAB)
Title: Re: Axe for Dummies (like me)
Post by: Galandros on March 01, 2010, 02:22:18 pm
I wonder if Axe Parser can really help some people to pass from TI-BASIC to assembly...
Title: Re: Axe for Dummies (like me)
Post by: Quigibo on March 01, 2010, 02:29:59 pm
The thing is, some of the stuff we're talking about here is pretty advanced.  Most programmers won't need to use hexadecimal or multiprecision byte storing, but its pretty cool that you CAN do it.  Hence, Axe Parser has a very wide learning curve.  Its very easy to learn the basics but as you start to get more advanced, you can start doing some pretty crazy stuff.  Even when staying within the syntax and not using assembly, you can literally do almost everything.  Well... maybe not everything right now, but when Axe is finished, this is what I'm hoping.
Title: Re: Axe for Dummies (like me)
Post by: Galandros on March 01, 2010, 02:58:23 pm
The thing is, some of the stuff we're talking about here is pretty advanced.  Most programmers won't need to use hexadecimal or multiprecision byte storing, but its pretty cool that you CAN do it.  Hence, Axe Parser has a very wide learning curve.  Its very easy to learn the basics but as you start to get more advanced, you can start doing some pretty crazy stuff.  Even when staying within the syntax and not using assembly, you can literally do almost everything.  Well... maybe not everything right now, but when Axe is finished, this is what I'm hoping.
Yes, it is advanced but at least we are talking in TI-BASIC like syntax which people are familiar and they will focus on comprehend the theory (generally mathematics) behind it.
Trying to learn this along assembly mnemonics and many possible hazards (register destroy, limited instruction set) is so much harder.
Title: Re: Axe for Dummies (like me)
Post by: Silver Shadow on March 01, 2010, 03:30:48 pm
Personally, I don't find it difficult to understand, even though I never programmed in asm.

I think that Axe, with this half-asm half-basic syntax will help people smoothly go from basic to asm, including me.
Title: Re: Axe for Dummies (like me)
Post by: ztrumpet on March 01, 2010, 05:55:06 pm
This is an awesome thread! :)

Personally, I don't find it difficult to understand, even though I never programmed in asm.

I think that Axe, with this half-asm half-basic syntax will help people smoothly go from basic to asm, including me.
Yes! ;D

Personally, I don't find it difficult to understand even though I never programmed in asm, as I'm stuck around day 15 of 28 days.

I think that Axe, with this awesome half-asm half-basic syntax will help people transition smoothly from basic to asm, including me.

(Note: These sentences are almost the same for me as SilverShadow. :D )
Title: Re: Axe for Dummies (like me)
Post by: DJ Omnimaga on March 02, 2010, 12:01:26 am
This is what's awesome about Axe. You get very fast speed even when using the most basic functions, so anyone who could understand TI-BASIC easily could learn Axe.
Title: Re: Axe for Dummies (like me)
Post by: squidgetx on January 27, 2011, 11:06:58 am
huh, whats Axe? :P

Come on, seriously? -.-
Title: Re: Axe for Dummies (like me)
Post by: aeTIos on January 27, 2011, 11:08:37 am
no.
Title: Re: Axe for Dummies (like me)
Post by: JustCause on January 27, 2011, 02:28:52 pm
Actually, as long as we're asking questions, has anyone else ran into the Down = Enter randomness? That is to say, when you press Enter, the program reacts as if you'd pressed Down? Is this another consequence of the TI's key hardware?
Title: Re: Axe for Dummies (like me)
Post by: aeTIos on January 27, 2011, 02:30:34 pm
I dont know that bug, actually.
Title: Re: Axe for Dummies (like me)
Post by: ztrumpet on January 27, 2011, 02:53:47 pm
Yeah. :(

You can use this to check for other combinations that may or may not work: http://ourl.ca/7652/133708
Title: Re: Axe for Dummies (like me)
Post by: JustCause on January 27, 2011, 03:29:54 pm
Yeah. :(

You can use this to check for other combinations that may or may not work: http://ourl.ca/7652/133708

Not what I meant, actually. With no other keys pressed, Enter will sometimes imitate Down. With no other keys pressed. Read the previous sentence about 100 times. ??? I will pass along the source next time I figure it out, or if you think you can decompile a program I noticed had the glitch I'll post that.
Title: Re: Axe for Dummies (like me)
Post by: DJ Omnimaga on January 27, 2011, 05:07:39 pm
This is weird O.O