LoginLogin
Might make SBS readonly: thread

SmileBASIC to TI-BASIC

Root / Talk About Programs / [.]

MinxrodCreated:
Hi all! Just kind of announcing that I am attempting to make a program that takes SmileBASIC code and converts it to TI-BASIC. Currently it works on... Print, and things like GCLS, CLS, etc. :D Still figuring out how to best do ones with more complex syntax, but I think it will search for the commas and take the data and use the 'data' in different places or something... Any suggestions or comments? Oh, and also possibly convert backwards, from TI-BASIC to SmileBASIC. ;)

It might be easier to just make a TI-BASIC interpreter in SmileBasic (TI-BASIC is an interpreted language anyway, so making a compiler could break some things) Converting smilebasic code to TI-BASIC won't work very well, since TI-BASIC is very different, and much less powerful.

I don't want to make an interpreter for TI, I'll just use my actual calculator. I know TI isn't that powerful, but I want to try anyways, since I really like TI-BASIC and SmileBASIC ;) Plus some spthings would run O.K, mostly simple graphical things probably, but it's worth a shot to me Thanks for the input! Also BUGs. Currently my thing is very buggy and limited :)

Cool! Do the drawing commands take into account the current window settings like the calculator? Have you implemented window settings yet? I'm decently acquainted with TI-BASIC (even used it on a test once, hehe.) Hopefully this doesn't get thrown out like the trend seems to be in this community.

Drawing commands like line will have to be modified for the calculator settings. I think I might just make the window settings like Xmax of 400 and Ymax of 240, that way I could 'scale' the graphics from the 3DS. Ti stuff like line( and circle( need window settings (much to my dismay in some circumstances) but Pxl-On works fine no matter what. Not sure how to implement this yet - maybe add a default window settings to the start or something. Oh, and I use TI basic for a lot in math - I write equation solvers and such, like for properties of logarithms, I wrote a solver for some equations like a=b(c)^x.

Yeah that would be cool if you could implement the graphing functions.

To evaluate expressions (like TI-BASIC does automatically), you could do something like: (slot 0)
USE 1
INPUT expression$
PRGEDIT 1,2
PRGSET "answer="+expression$
GOSUB 1:@EVALUATE
(slot 1)
@EVALUATE

PRINT answer
RETURN

I'm not sure what people think this is anymore... To clarify what I am trying to do:
  • Make a program that converts programs in SmileBASIC to programs in TI-BASIC.
Like if I have program 'Hello_world' in SB, and I want it in TI-BASIC (or vice versa) I would change the program from PRINT "Hello world!" to Disp "Hello World!" (or vice versa). I am making a program that does this for people. Also, a progress report:
  • Isn't crashing ALL the time
  • Support for GCLS, CLS, PRINT, FOR - TO, WHILE [partly]
  • Watch the program convert it
  • Sucky inefficient code (YAY!)
If anyone wants the key I can give it out.

That sounds cool. Can I have the public key?

Ok. It isn't very good yet ;D but 'some' stuff is working. EDIT: nvm, SmileBASIC won't let me do anything online because it wants a system update. Sorry :(

Ok.

Can you upload it yet?

Can you upload it yet?
No, not system updating. So until I find an alternative that will work I can't upload :(

TI-Basic -> smilebasic would be more useful No smilebasic programs will work in TI-BASIC because it it much slower, and has less features. A TI-BASIC "emulator" (interpreter with screen and button emulation) would be cool.

No smilebasic programs will work in TI-BASIC because it it much slower, and has less features.
That's not really true. They will be slower, but if speed isn't an issue, it will work fine. Also, I plan on 'reversing' the concept as well, from TI to SB.

No smilebasic programs will work in TI-BASIC because it it much slower, and has less features.
That's not really true. They will be slower, but if speed isn't an issue, it will work fine. Also, I plan on 'reversing' the concept as well, from TI to SB.
Anything more complex than "Hello World", or MAYBE a text adventure, would be impossible

Multiplayer. Motion Sensors. 3D. GRPs. XSCREEN. TOUCH. STICK/STICKEX. BGM. What do you plan to do for all of these and any other features that I failed to think of?

Multiplayer. Motion Sensors. 3D. GRPs. XSCREEN. TOUCH. STICK/STICKEX. BGM. What do you plan to do for all of these and any other features that I failed to think of?
Magic

Multiplayer. Motion Sensors. 3D. GRPs. XSCREEN. TOUCH. STICK/STICKEX. BGM. What do you plan to do for all of these and any other features that I failed to think of?
Magic
Dark or Light?

I just don't really see the point. The languages are similar anyway, so translating by hand is easy. never understimate the slowness I will make an interpreter/emulator I guess later.