Omnimaga
Calculator Community => TI Calculators => Axe => Topic started 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...?
-
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 ??
-
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.
-
The new pointer function, in particular.
-
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
-
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.
-
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
-
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
-
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 ??
-
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 ??
:Asm(EFD74AEFEF4AEB
You can then store to a variable.
-
so i would put that in the program and it basically points to ans for me ??????????
-
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 :(
-
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
:)
-
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
-
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?
-
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.
-
Yeah that's what I was thinking.
-
It would help if hex constants were allowed (hint hint, Quigibo ;) )
-
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
-
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)
-
I wonder if Axe Parser can really help some people to pass from TI-BASIC to assembly...
-
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.
-
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.
-
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.
-
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 )
-
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.
-
huh, whats Axe? :P
Come on, seriously? -.-
-
no.
-
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?
-
I dont know that bug, actually.
-
Yeah. :(
You can use this to check for other combinations that may or may not work: http://ourl.ca/7652/133708
-
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.
-
This is weird O.O