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 ... 131 132 [133] 134 135
1981
The Axe Parser Project / Re: Axe Parser
« on: February 04, 2010, 06:57:40 pm »
I think (but i'm not sure) is that when multiplying by any arbitrary number, it uses the general multiplication routine, but when multiplying by 2, you use the dedicated x2 routine?

Correct.  The general x2 routine is to add the number to itself :P

1982
The Axe Parser Project / Re: Axe Parser
« on: February 04, 2010, 06:54:02 pm »
No, no, it just means that multiplying by powers of 2 will use a smaller, faster code that multiplying the regular way.  Its just an optimization.  Even things like +1 and +2 can be optimized.

Probably won't be in the next release, but I'll get to automatic optimizations eventually.

1983
The Axe Parser Project / Re: Axe Parser
« on: February 04, 2010, 04:04:22 pm »
Yeah, its only one byte more for the compatibility.  Worth it. ;)

Quote
Also, if you haven't done this already, I'd like to suggest that you auto-generate multiplication algorithms when multiplying by constants.
I probably will for powers of 2, but I don't think there will really need to be such high speed math operations, I mean, I don't think anyone will be making a first person shooter or anything.  But I guess if a few microseconds are important enough to account for the program size increase, you can always add some Hex code to do the faster multiplication.

1984
The Axe Parser Project / Re: Features Wishlist
« on: February 04, 2010, 03:53:57 pm »
Alright, (x,y) at 0 it is!  I've finished that command.  Interestingly enough, "Output(" and "Disp" are nearly identical commands.  The only difference is that output first gets the coordinate position.  Then, after the second comma, the compiler treats whatever follows as if it were a Disp command.  Since my Disp command, unlike BASIC, does not have automatic line returns, they really are equivalent!  That also means that things like Output(x,y,Str1,"Hello",Str3) are valid.

Thanks for the feedback!

1985
The Axe Parser Project / Re: Features Wishlist
« on: February 03, 2010, 11:59:59 pm »
Sorry to double post, but I've just started to add the "Output()" feature and I'd like to get some feedback on it.

I know that native BASIC uses Output(y,x) but I much prefer the form of Ouput(x,y).  Should I keep it the old way to less confuse people transitioning from BASIC to Axe, or should I change it to (x,y) so that its more consistent with "Text(" "Pt-On(" and the other drawing commands?

1986
The Axe Parser Project / Re: Axe Parser
« on: February 03, 2010, 11:11:55 pm »
Thanks for that division routine, but I found this one and its a lot smaller.

Code: [Select]
HL_div_DE:
ld a,h
ld c,l
ld hl,0
ld b,16
__DivLoop:
sll c
rla
adc hl,hl
sbc hl,de
jr nc,__DivSkip
add hl,de
dec c
__DivSkip:
djnz __DivLoop
ld h,a
ld l,c
ret

I'm just a little bit worried about the use of the sll command, will that sacrifice compatibility with the Nspire?

1987
The Axe Parser Project / Re: Features Wishlist
« on: February 03, 2010, 07:05:16 pm »
Apparently you can't break at all, so it doesn't matter. But Quigibo, if you save the stack pointer somewhere at the beginning of execution, it should be no problem (this method is used quite a bit in asm programs iirc)
Yes I use this too.  But it would still require a special interrupt setup and interrupt routine which might prevent custom interrupts.  Regardless, I think I'll just worry about this later and focus on the more important stuff for now.

Quote
So what would happen if you broke out of the program but didn't restore the stack pointer?
It would return out of the subroutine without finishing it causing unknown consequences.  It would not exit the program either.

1988
The Axe Parser Project / Re: Axe Parser
« on: February 03, 2010, 05:45:25 pm »
When I said fast, I didn't expect unrolled fast ;)  I'd prefer the smallest code possible that doesn't use a naive method.

I think I see the pattern though.  I can just figure out how to roll it up again. 

Here is the super efficient HL*DE multiplication routine I'm using, only 14 bytes  :)  The real routine is a little bit bigger just because it has to find which of the two arguments is smallest and exchange them if necessarily.
Code: [Select]
_DE_Times_L:
xor a
ld h,a
ld a,l
ld l,h
_Loop:
rra
jr nc,_Skip
add hl,de
_Skip:
sla e
rl d
or a
jr nz,_Loop
ret

1989
The Axe Parser Project / Re: Axe Parser
« on: February 03, 2010, 05:06:42 pm »
Does anyone know a fast routine for dividing two unsigned 16-bit registers?

1990
The Axe Parser Project / Re: Features Wishlist
« on: February 03, 2010, 05:02:09 pm »
It is not possible to arbitrarily break a program from asm without using interrupts and special exit code.  BASIC is interpreted so that's why it can break anywhere.

Luckily however, the security is taken care of by Axe Parser itself.  It will give you the option of automatically archiving all the RAM including your source code before testing your program so that if it crashes, you have everything backed up and you don't lose anything.  I will start working on these features in a few weeks probably.

1991
The Axe Parser Project / Re: Features Wishlist
« on: February 03, 2010, 04:35:31 pm »
I assume you all mean that when you press the on button, it breaks the program.  Unfortunately this is nearly impossible since you'd have to break out of an unknown amount of subroutines and the stack would not return the program to the home screen.  Now, I could implement something that saves the stack size and creates an interrupt for exiting when the on button is pressed, but it would take up probably around 200 extra bytes or so and be very complicated.

You will be able to poll the [on] key as a direct key input though, so you can always manually check if it needs to exit.

I have a feeling that if I do implement interrupts, it will be towards the end of the development.

1992
The Axe Parser Project / Re: Features Wishlist
« on: February 03, 2010, 05:05:07 am »
Linking is easy.  Syncing is hard.  Really, no matter what routine I write for linking, it is up to the programmer to write code that will properly synchronize the calculators.  Lets say you need to send some critical data from calc A to calc B.  You have to send the byte, but calc B might not be ready to receive a byte, so you have to keep sending until calc B sends a confirmation byte back to calc A. When time is critical, you have to be very cautious about how often the calcs check to see if there are incoming bytes.  It needs to be frequent enough so there aren't long delays between sending, but sparse enough to not slow down the program.

1993
The Axe Parser Project / Re: Features Wishlist
« on: February 02, 2010, 11:28:09 pm »
hmm quigbo how much of the total app space have you used up so far??(out of teh whole thing :))

Only like 4 or 5 kB so far I think.

Feel free to post all your ideas.  I just won't be able to implement them for a while, but its good to have a large collection of ideas for when I do.  I'm almost as the point where the commands and code for each command is completely templated, making adding new features a breeze.  After that point, the functionality will skyrocket.

1994
The Axe Parser Project / Re: Axe Parser
« on: February 02, 2010, 11:20:56 pm »
Hmmm, it seems the - character is not supported correctly in Strings?  It becomes a q on my 84SE
Thanks for pointing that out!  Unfortunately, TI decided that the single character tokens are not the same as their corresponding ascii values.  I've already re-routed the question mark, exclamation mark, and space.  I haven't done + or - yet, I'll get to those next time.

Tokens are no longer displayable (no one really uses them anyway) you'll have to just type them normally.  But they do allow you to type some cool non standard characters.  For instance the "Output(" token will display the black cursor box.

1995
The Axe Parser Project / Re: Axe Parser
« on: February 02, 2010, 06:02:53 pm »
Axe 0.0.2

New update!  I made my first game using Axe Parser.  Its a grayscale platformer, try it out!






Just kidding, its a guess the number game, but hey, its a start  ;D

Pages: 1 ... 131 132 [133] 134 135