3076
Grammer / Re: Grammer
« on: October 13, 2011, 01:55:25 pm »
I love that part, yeong
Here is an update on the things that have been changed or added:
DispGraph can now have a pointer to tell it which buffer to display. For example, if you want to display appBackUpScreen as a buffer, you can do DispGraphπ9872. To display the normal graph screen, just do DispGraphπ9872 (remember that the pi symbol tells it to read the number as hex). If you omit the argument, it will just display the default buffer.
Disp will let you change the default buffer location. For example, if you want to use appBackUpScreen instead of the graph screen, just do Disp π9872.
Func will let you execute a subroutine as an interrupt. Interrupts activate a little over one hundred times per second, regardless of what is happening code wise. For example, this will automatically display the graph screen, even if you don't have any other DispGraphs in your code:
And finally, the Send( command will let you make a program or appvar of any size you want (assuming there is enough memory). So to create the program named HI with 768 bytes (which can be used as a screen buffer):
This also returns the location of the variable in case you are using it for a buffer *cough*
Hopefully the next update will include a readme that is up to date and has more examples/explanations. For now, here is a screenie and the latest version of Grammer. Feel free to ask questions (as well as how to do things)!
Here is an update on the things that have been changed or added:
DispGraph can now have a pointer to tell it which buffer to display. For example, if you want to display appBackUpScreen as a buffer, you can do DispGraphπ9872. To display the normal graph screen, just do DispGraphπ9872 (remember that the pi symbol tells it to read the number as hex). If you omit the argument, it will just display the default buffer.
Disp will let you change the default buffer location. For example, if you want to use appBackUpScreen instead of the graph screen, just do Disp π9872.
Func will let you execute a subroutine as an interrupt. Interrupts activate a little over one hundred times per second, regardless of what is happening code wise. For example, this will automatically display the graph screen, even if you don't have any other DispGraphs in your code:
Code: [Select]
FuncLbl "INTERRUPT ;the Lbl "INTERRUPT part will return the location of the routine
Repeat getKey=15
rand/1024→Y
rand/683→X
rand/1024→R
Circle(Y,X,R,3
End
Goto Lbl "Stop ;Jumps to the end of the code
.INTERRUPT
DispGraph
End ;Ends the interrupt
.Stop
Stop
Note that this isn't optimised And finally, the Send( command will let you make a program or appvar of any size you want (assuming there is enough memory). So to create the program named HI with 768 bytes (which can be used as a screen buffer):
Code: [Select]
Send(768,"EHI
Programs have a prefix of "E", protected programs have a prefix of "F" and appvars have a prefix of "U"This also returns the location of the variable in case you are using it for a buffer *cough*
Hopefully the next update will include a readme that is up to date and has more examples/explanations. For now, here is a screenie and the latest version of Grammer. Feel free to ask questions (as well as how to do things)!