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 ... 116 117 [118] 119 120 ... 135
1756
Axe / Re: Moving sprites in a circle
« on: April 06, 2010, 04:21:09 am »
Axe doesn't have sin() and cos() yet.  I'm adding those when I switch to singed numbers.  Builderboy used the first 2 terms of the taylor series expansion of sin to get approximations.  That's probably why the code doesn't make much sense at first glance.  If you haven't taken calculus then its probably best you wait until I get the trig functions supported becasue the actual math involved is a lot more complicated.

1757
The Axe Parser Project / Re: Features Wishlist
« on: April 06, 2010, 04:15:00 am »
In such command, though, how would you specify (in this syntax) if you want to point to a byte in an appvar instead of inside the program?

Select(Str1)
getCalc()->A
instr(A,'Z',100)

This would search for the character 'Z' in the first 100 bytes of the appvar.

1758
The Axe Parser Project / Re: Features Wishlist
« on: April 06, 2010, 04:08:31 am »
I was planning to add an instr() command, but a little more general than what you are referring to.  It would be like this:

instr(START,BYTE<,SIZE>)

The last option is optional.  You give it a pointer, and it searches for the byte until it finds it and then returns the pointer to that byte, or it returns zero if not found.  That way, its not just limited to application variables, you can use it anywhere.

Its pretty easy to add, but I haven't yet because honestly, it really isn't as useful as it sounds.  There is a regular assembly instruction that does exactly this called "cpir" but I've never used it or needed to use it ever for anything.  I've almost never seen it used in other programs either.  It would only be needed for very specific applications, and even then its easy to write a subroutine yourself with existing commands.  But yes, I will support it eventually, but its in the back of my list.

1759
The Axe Parser Project / Re: Bug Reports
« on: April 05, 2010, 02:46:10 pm »
Okay, I found it.  This one was pretty obvious.  The math subroutine replacement was being calling from a 2nd level stack and a 3rd level stack in two different places, but the routine sometimes exited specifically on the 2nd level.  Now they both call on the second level so everything is even.

A way around it until next week is to use extra parenthesis.  Like if you need to do 3*int(5) instead you can either do 3*(int(5)) or int(5)*3.

1760
The Axe Parser Project / Re: Axe Parser
« on: April 05, 2010, 02:42:13 pm »
I might be able to write an encryption algorithum eventually.  I'll explain in detail later how to use the new features in the program, I was just too tierd last night.

Just beware the new commands are kind of vulnerable to change since I'm not sure exactly how I'll generalize them to other variables in the future.

1761
The Axe Parser Project / Re: Latest Updates (***DO NOT POST HERE!***)
« on: April 05, 2010, 05:00:47 am »
Axe Parser
Alpha 0.1.4



Added all this stuff last minute... I've been busy.

New Features:
  • Create Application Variables.
  • Read and Write to Appvars.
  • Archive and Unarchive Appvars.

Changed:
  • Fixed a bug that caused some programs to freeze.

New example program to show file saving and auto-archiving.

1762
The Axe Parser Project / Re: Bug Reports
« on: April 04, 2010, 11:55:37 pm »
Hopefully so :)  And Quigibo, did you ever find this?
I was never able to replicate that one unfortunately.  I assumed it was a fluke in the calculator.  If you find yourself getting that error again, I'll take a look at the source file.  I know it would be hard in this circumstance since it could freeze the parser and/or clear the ram, but you can try archiving it before parsing it so a reset doesn't delete it.

EDIT: 256th post! All my posts can be counted by a single byte!

1763
The Axe Parser Project / Re: Bug Reports
« on: April 04, 2010, 10:34:40 pm »
You have no idea... I spent about 5 straight hours searching today... I couldn't find the error... and then finally... I found it, and it took 30 seconds to fix.  *face palm*  That's the worst thing about bugs.  Once you know whats wrong, its easy to fix but actually finding that bug is a nightmare, especially in a parser where you have switch statements with hundreds of arguments and tons of subroutines that are intertwined with each other so much, that a tiny change in one affects everything else.

Anyway, the resolution is a bit too complicated to explain, but the issue is resolved now.  I'll post an update late tonight.  This has been the hardest bug yet!

EDIT.

1764
The Axe Parser Project / Re: Bug Reports
« on: April 04, 2010, 04:17:06 am »
The bug described here goes a little deeper than I thought.  I still haven't found it yet, but I'm almost certain what's happening is that the 2 passes the parser makes are getting out of sync.  Normally, the 2nd pass has to follow the code exactly identically to the first pass but without actually writing anything so that static pointers can be replaced with their correct locations.  When they get out of sync, the 2nd pass starts writing those pointers over the wrong locations, in this case, over a subroutine call causing the program to call some random location in memory which causes the freeze.

I haven't added many new features yet because I need to get this resolved first, just in case it would force me to change any new code.  Hopefully I will locate the exact problem tomorrow and have added enough new features for a Sunday night update.  I'll keep you all posted. Just wanted to let everyone know whats been going on.


1765
The Axe Parser Project / Re: Axe Parser
« on: April 02, 2010, 03:22:28 am »
After further investigation, I think it has something to do with the parser and not the source.  I'm going to look into what the problem could be.  Its very weird that this has gone unnoticed until now.  It must be something really specific, probobly something wrong with one of the commands.

1766
TI Z80 / Re: Progress
« on: April 01, 2010, 03:41:39 pm »
Yeah, hexadecimal doesn't exist if you don't want it to.  You can just think of it as base 10 if you want.  You can even think about it in base 3, or 4, or 255, or 9000, whatever you want!  As long as you understand a number is a number no matter what base you write it in.

This is what you should do if you want to use decimal:
Ξ”List(8,9,10,11,12)->GDB1

Instead of doing this:
[08090A0B0C]->GDB1

They are both identical.


EDIT: and by the way, this is correct:

:{GDB1}+1->{GDB1}

Not any of these:

:{GDB1}+1->GDB1
:GDB1+1->GDB1
:GDB1+1->{GDB1}

The last one is syntactically correct, but it won't do what you're trying to make it do.

1767
The Axe Parser Project / Re: Axe Parser
« on: April 01, 2010, 03:49:25 am »
You have a subroutine called "MN" but you never call to it from the main loop... that would explain why it doesn't do anything.

1768
TI Z80 / Re: Progress
« on: March 31, 2010, 02:23:08 pm »
And nice trick Quigibo I didn't realise that x.x it should be easier for coding menus.

You can use that for menus, but then you can't have auto scrolling.  You know where if you hold down one of the arrows for a second, it starts automatically scrolling for you by registering that key press a bunch of times.  I think the regular "getkey" is probably better for menus since its simpler to use and you don't need a quick response or multiple key presses anyway.

1769
TI Z80 / Re: Progress
« on: March 31, 2010, 02:12:44 pm »
Axe naively supports integer constants and integer arrays... why would you want to convert them to hex?  But I guess if you're using tying to compress the source file or something where you really need hex, there is a whole section for base converters on ticalc.org.  I actually have my own converter there too.

If the cursor is uncontrollable, you can always either have a short pause once a key is detected or you can move in smaller increments.  If you want the key press action to only happen once per click, then you can add this after your key actions in the code:

While getkey(0):End

This causes the calculator to wait until all keys are released before continuing.

1770
The Axe Parser Project / Re: Features Wishlist
« on: March 31, 2010, 04:40:50 am »
Heh, Dj what you just did is RLE :)
Yeah I was about to say that lol.  That's a good idea.  It would be quite easy to add too, but maybe a little advanced for most users and it would absolutely require a helper tool or a sketch on paper.  Its not just sprites you can compress.  Level data, text and even entire programs can potentially be compressed if they're sparse enough.

Pages: 1 ... 116 117 [118] 119 120 ... 135