Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Quigibo

Pages: 1 ... 119 120 [121] 122 123 ... 135
1801
News / Re: Axe: a new TI-BASIC-like language for the TI-83+ and 84+
« on: March 20, 2010, 05:07:12 pm »
I think the final syntactical release of 1.0 will be around late May.  From that point on, the syntax will be locked and any further changes will just be to the GUI.  There are a lot of features I would really like to add like scrolling the source code to where the error is like how BASIC does it, but that involves key hooks and some really tricky coding.  Also things like editing archived programs, clearing ram from within an app, and running asm programs from within an app I eventually need.  I'll have to get a lot of help from some hardcore asm programmers and I'm not sure where to turn for that.  I could always try the chats and stuff I guess.

1802
Axe / Re: [tutorial] Program Flow - Platformer
« on: March 20, 2010, 04:50:40 pm »
You should get used to having the number come before the sprite.

Instead of doing:
Pic1+(A*8

Do this:
A*8+Pic1

It saves 2 bytes in the compiled code since you don't need the parenthesis.  Same thing with lists.  You can even extend it to 3 dimensions.  Say you need to reference an 8x8x8 grid:

Instead of doing this:
L1+(X*64)+(Y*8 )+Z

You can do this:
X*8+Y*8+Z+L1

Notice the multiplication distributes which even further reduces the code since powers of 2 are more optimized when they're smaller.


EDIT:  By the way, the routine for copying memory from one place to another is conj(source,destination,bytes to copy)  So your example would be conj(GDB1,L1,#)

1803
Axe / Re: Key codes (for Getkey() users)
« on: March 20, 2010, 03:54:13 pm »
By the way just so we're all clear, asm does not naively support on-breaks.  Instead, you have to create your own interrupt code to deal with the breaks.  So there really isn't any short term solution until I add interrupt support, which isn't that far away.

1804
The Axe Parser Project / Re: Axe Parser
« on: March 20, 2010, 03:49:38 pm »
Yeah, I mean that in a good way not a bad way.  I enjoy seeing the increased popularity of Axe Parser, but I was just pointing out that it seemed a little over-hyped as if it were already finished.  If its this popular already, I can't even imagine the results when its done ;)

By the way, those changes are not that major.  I don't think a single example program I've made so far would need to be modified at all.  Mainly it will affect people who already have complicated code.  I was just pointing out that there were going TO BE changes, even though they are small, since I had stated earlier that I thought there weren't going to be any.

1805
The Axe Parser Project / Re: Axe Parser
« on: March 19, 2010, 08:13:09 pm »
I've finished rewriting the commands list document.  It should be easier to understand and find commands.  Also, you can name programs now.  You'll see those Sunday probably.

On an unrelated note, I find it very funny that every time someone mentions a new project on these forums, everyone is immediately asking if it is/was/is going to be made using Axe Parser.  Now I realize that its a pretty neat toy at its current state, but realistically its not ready for the majority of applications yet.  There are still a lot of important features that I have been putting off like saving to files.  Not only that, but I don't feel that its as stable as it appears to be.  Major changes to the functions are coming soon.  I feel I should warn everyone ahead of time of some of these changes (not all in the next release):

  • All default math routines will become signed routines.
  • Logical And,Or,Xor might replace the bitwise And,Or,Xor. Either way that command will use order of operations.
  • A few other functions might be given order of operations.
  • Headers might become a requirement, right now they are optional.
  • External libraries might use special labels.

I can foresee some other potential changes in the future.  I'd say my command set is probably about 30-40% complete right now so there are still TONS of commands I still have to add.  I do still go through the features list from time to time, so be patient if you don't see your request show up, I'll get to it eventually.

1806
Axe / Re: Routines
« on: March 19, 2010, 07:47:33 pm »
Can I see the assembly for that write-back hex code?  And does it work when the program is archived?  And if so does it re-archive the program when it copies back?

1807
Axe / Re: Key codes (for Getkey() users)
« on: March 19, 2010, 02:40:44 pm »
So I guess I will make 41 the [on] key since it appears to be missing.  Nice layout!  I was going to add one, but I couldn't find one on the internet and I didn't want to spend time making my own.

1808
ASM / Re: Linking Asm Subroutine
« on: March 18, 2010, 03:40:09 pm »
Its going to be very slow if you have to send a list of floating points.  Can we make the assumption that each element in the list is 1 byte (an integer between 0 and 255) because then it could be lightning fast.

And there is no such thing as sending when not in receive mode.  One of the calculators must wait.  Either the sender waits until the receiver confirms it got the message, or the receiver has to wait until it get a message from the sender.  However, there is a way to make neither of them wait, but then you can't guarantee that the message will actually received.

1809
The Axe Parser Project / Re: Your Projects - Post and Critique
« on: March 18, 2010, 03:23:18 pm »
Yes and yes, except that you only need to include the program once and then you can call to the subroutines in the other program since they share the same labels.  You will probably not be able to add inline code from other programs since I'm trying to make it as unconfusing as possible, and you should never need that feature.  It will function more like the c-style #include directive.  So you just include the library somewhere in your program, then you can use all of the subroutines from it as if they were in the regular code.

1810
The Axe Parser Project / Re: Axe Parser
« on: March 17, 2010, 09:35:55 pm »
No, you only have 8 bits numbers in each location.  Using int() just allows those numbers to be between -128 and 127 instead of 0 to 255.  Anything outside those ranges will give inaccurate numbers.  More technically, it will instead be the number modulo 256, but I doubt you will ever need to exploit this detail.

1811
The Axe Parser Project / Re: Your Projects - Post and Critique
« on: March 17, 2010, 09:32:35 pm »
Awesome!  I will be adding a new feature soon that lets you insert external code into your programs so you can use other people's routines and libraries in a separate package from the rest of the main code.

1812
Axe / Re: Need code help with Sprites
« on: March 17, 2010, 09:24:52 pm »
Just going to help optimize a bit and fix some code
Code: [Select]
ClrHome
ClrDraw
DiagnosticOff
.DOWN
[3C245A42A5A55A663C245A42A5A55E603C245A42A5A55A663C245A42A5A57A06→Pic1
.RIGHT
[3824445858582838382444586C6894EC3824445858582838382444585C4894EC→Pic2
.LEFT
[1C24221A1A1A141C1C24221A361629371C24221A1A1A141C1C24221A3A122937→Pic3
.UP
[3C244242A5A55A663C244242A5A55E603C244242A5A55A663C244242A5A57A06→Pic4
0→X
1→A→B                   ;More efficient way to initialize similar variables

Repeat getKey(15)             ;"Repeat" is the same as "while zero"

Pt-On(A,B,D*64+Pic1)       ;Each sprite group is 64 bytes apart
                                     ;Draw the rest sprite every frame, even if it gets written over.
If X+1→X=20             ;You can put the storage statements in if conditions.
  0→X
End
Pause 100

If getKey(1)              ;You don't need the equals one here
  B+1→B
  0→D                     ;D should start at zero
  sub(DW)
End
If getKey(2)
  A-1→A
  1→D
  sub(DW)
End
If getKey(3)
  A+1→A
  2→D
  sub(DW)
End
If getKey(4)
  B-1→B
  3→D
  sub(DW)
End

DispGraph
End
ClrHome                         ;Clear the screen on exit
Return

Lbl DW
ClrDraw                                   ;Clear the screen.  It will erase the rest sprite.
Pt-On(A,B,D*64+(X/5*8)+Pic4)   ;Draw the sprite with the right sprite set.
Return


Haven't tested anything.  But it should work I think.  There are a lot more optimizations you can do, but they are relatively minor and I don't want to confuse you since you're new to this.

1813
The Axe Parser Project / Re: Axe Parser
« on: March 17, 2010, 02:03:23 pm »
The {} actually are in the doc in the middle, but I am getting the feeling that the doc is starting to get so large, that I really should divide it into categories like Math, Data, Constants, etc. to make individual commands easier to find.

int() is almost always used with {}, in fact, I might even change it to imply the brackets.  But right now, its like this:

say you have a data structure like this:
[-2,-1,0,1,2]
And you want to display 2 more than the number so your program looks like this:

-2->{L1}
-1->{L1+1}
0->{L1+2}
1->{L1+3}
2->{L1+4}
For(A,0,4)
Disp {L1+A}+2>Dec
End

Try it.  It doesn't return the right number since even though FF is -1 for an 8 bit number, it is actually 00FF as a 16 bit number.  That value is 255, not -1 as a 16 bit.  So we need to extend the sign.  In general, that means that 00xx has to become FFxx so our 00FF becomes FFFF which IS -1.  This is the low level explanation.  You don't need to know the technical details of HOW it works, just know that it preserves the sign when reading bytes in RAM.

Now try this:

-2->{L1}
-1->{L1+1}
0->{L1+2}
1->{L1+3}
2->{L1+4}
For(A,0,4)
Disp int({L1+A})+2>Dec
End

Tada!

1814
The Axe Parser Project / Re: Features Wishlist
« on: March 17, 2010, 01:49:35 pm »
No, "getkey" tells you the last key pressed once and then gets reset back to zero.  Its essentially identical to the basic getkey but with different numbers.

"getkey(KEY)" tells you if that particular key is held down right now.  So you can chain these together like "getkey(1) and getkey(2)" notice I don't need the parenthesis on the and operation since they're boolean.

1815
The Axe Parser Project / Re: Features Wishlist
« on: March 17, 2010, 01:36:06 pm »
I'm almost positive that you can detect as many keys at one as you need.  I don't think there are actually any limits by the nature of the commands.

What is the effect of this though?
xor a
out (1),a
I've never seen this used.  I thought it only works when a in binary is a combination of all ones and a single zero.

getkey(0) is a good idea, but isn't getkey=/=0 basically the same thing?  I was actually planning on making getkey(0) detect the [on] button.

EDIT: wait nevermind, you were requesting an indefinite return.  Regular getkey only is true once and then gets reset back to zero.  I'll have to add that command.

Pages: 1 ... 119 120 [121] 122 123 ... 135