Ok, so BOSshell v5 won't be out for a while... but I think we all expected that
I have dreamed of making an interpreted language for the CE, and now, that dream is closer to reality than ever before!
Introducing: BOS-BASIC!
This language is run
directly from a TI-BASIC program, no need to open any kind of interpreter first!
Code:
Asm(prgmBOSBASIC
Return
These two lines of code will make the rest of your program run as BOS-BASIC!
BOS-BASIC will have a whopping 62 one-character variables!
It will have all the functionality of ICE!
This language will be extendable by the user as well!
An example "Hello World" program:
Code:
Asm(prgmBOSBASIC
Return
GFX
Disp Hello World!
LET 11=x05
Disp Hello World in Green!
FLIP
getKeyWait
GFX
Another capability of this language is it's ability to recognize a token both input from a menu, or written character-by-character, as the same command!
Current command list (including TO-DOs) and what they do:
Code:
GFX - toggle full-screen graphics
Disp String - put the following text to the screen. Will scroll the text if it overflows the bottom of the screen, just like on the homescreen
LET var=value - store value to var
getKey - get key value and update key register
getKeyWait - wait until a key is pressed, update key register
FLIP - display graphics. Use this when you are done drawing, right before getting a key value. Uses "Blit(1" (ICE)
Lbl NAME - program label
Lbl NAME var - program label. Stores label offset from start of program to var
Goto NAME - goto label
vGoto var - goto label from offset stored in var
Call NAME - call label
vCall NAME - call label from offset stored in var
Return - Return from subroutine (Call )
++ var - add one to variable
-- var - subtract one from variable
+val var - add value to variable
-val var - subtract value from variable
*val var - multiply var by val
/val var - divide var by val
^2 var - square var
θ+ var1 var2 - add var1 to var2 and store to var1 (works with "+","-","*", and "/")
θ+ var1 var2 var3 - add var1 to var2 and store to var3 (works with "+","-","*", and "/")
// - comment
If/Else/End works same as in ICE, but only one variable can be compared with a variable or value for each "If" statement.
Variable syntax:
Code:
There are 62 variables. 0-9, A-Z, and a-z.
A variable is accessed by adding one of the following to the end:
:a - get/store all 3 bytes
:x - get/store the first two bytes of a variable. Usually for an X coordinate, like when you are going to draw something
:y - get/store the last byte of a variable. Usually the Y coordinate
:0, 1, and 2 - the first, second, and third bytes of the variable
:d - get/store from the adress stored in the 3b of the variable
:o - get/store from the offset (from the temporary data file) stored in the first 2b of the variable
ex: Aa - 3b number from variable A
ex: 0x - current X draw coordinate
ex: 0y - current Y draw coordinate
ex: 10 - current Background color
ex: 11 - current Foreground color B
ex: 12 - current Foreground color A
NOTE: when setting all 3 colors at once, use a hexidecimal value "x000000" where the first two are Foreground colors B and A, and the last one is Background color.
Value syntax:
Code:
:0 - regular integer value
:x - hexadecimal value
:" - string value (will actually append the string to the temp file. Gets the offset of the first byte of the string)
:: - hexidecimal string (appends to temp file and gets the offset)
ex: 0256
ex: x100
ex: "Hello World!
ex: :0102030400
I will be adding a lot more to this language, so stay tuned for more!