Author Topic: z80 TI-BASIC to PRIZM-BASIC: the BASIC (not the Game)  (Read 9393 times)

0 Members and 1 Guest are viewing this topic.

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
z80 TI-BASIC to PRIZM-BASIC: the BASIC (not the Game)
« on: February 20, 2012, 09:29:36 pm »
ok. Many people got their Prizm through the CASIO event and I assume that many people are willing to try to program. :D
However, Casio Basic and Ti Basic are different. D:
So, I decided to write a really simple (not complicated) "conversion table" from TI-BASIC to Prizm BASIC! :D



1. Input/Output

TI-BASIC
Input Stuff
Input "DISPLAY", Stuff
Output(row,column,"DISPLAY")
Disp "CONTENT"

to Prizm BASIC
?→Stuff
"DISPLAY"?→Stuff
(Color) Locate column,row,"DISPLAY"
"CONTENT"

Also, I think it's a good idea to mention that while TI-84+SE has 16x8 homescreen available to use for program, Prizm has 21x7 homescreen available to use for program. Yes. One less row. D:
At least, Locate can have color stuff XD Oh. Color can be accessed by [SHIFT] [5] [5] [1] in program editor.



2. Loops

TI-BASIC
:If Condition
:Then
:Code
:Else
:Another Code
:End

For(Variable,Start_Num,End_Num(,Increment value))
:Stuffs
:End

While Condition:Code:End

Repeat Condition:Code:End

to Prizm BASIC
If Condition
:Then
:Code
:Else
:Another Code
:IfEnd

For Start_NumVariable To End_Num(Step Increment Value)
:Stuffs
:Next

While Condition:Code: WhileEnd

Do:Code:LpWhile Condition

It's worthy to mention that in Prizm BASIC, "Then" is must be used in If statement.
Also, Do-LpWhile loop loops until the condition is true, unlike Repeat!



3. =>
=> is really awesome to use! :D

=> is called "Jump condition" iirc, and its syntax is this:
Condition=>Condition if true[:Condition of false]

It's kinda like ? function in axe. Kinda.

So instead of all this jarble:
If A=3
Goto 1
Else
Goto 2
IfEnd

You can do this!
A=3=>Goto 1:Goto 2

=> can be found in [shift] [vars] [f3] [f3].



4. Strings

TI BASIC
sub(Str1,Start_from,how_many_chars)

to Prizm BASIC
StrMid(Str 1,Start_from,how_many_chars)



I'll add more later. :D
« Last Edit: March 01, 2012, 09:08:38 pm by TBO_Yeong »
Sig wipe!

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: z80 TI-BASIC to PRIZM-BASIC: the BASIC (not the Game)
« Reply #1 on: February 20, 2012, 09:42:26 pm »
Yeah it's kind of weird that you can't get at the bottom row, I guess it's because of the program inadvertently scrolling the screen or something.

I'm wondering if there's a kind of catalog help for the Prizm anywhere, I just looked around (including the official thingy at casio's site) and didn't see any :/
Vy'o'us pleorsdti thl'e gjaemue

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: z80 TI-BASIC to PRIZM-BASIC: the BASIC (not the Game)
« Reply #2 on: February 20, 2012, 09:44:54 pm »
The only place I could think of is the Prizm manual(Hard to find some stuffs XP ) and cemetech prizm wiki which has 100+ commands documented so far.
Sig wipe!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: z80 TI-BASIC to PRIZM-BASIC: the BASIC (not the Game)
« Reply #3 on: February 21, 2012, 02:19:04 am »
The bottom row was actually reserved for the menus. It kinda sucks though because it makes porting 83+/86 games even more of an hassle.

By the way I think Qwerty.55 was working on a similar tutorial before, it might be somewhere on the forums. However he stopped.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: z80 TI-BASIC to PRIZM-BASIC: the BASIC (not the Game)
« Reply #4 on: February 21, 2012, 03:43:33 pm »
Thanks TBO_Yeong! I got my calculator today and started playing around with programs immediately. This is a really useful topic. (I'd rate you up but I can't from where I am D:)
« Last Edit: February 21, 2012, 03:44:01 pm by Deep Thought »




Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: z80 TI-BASIC to PRIZM-BASIC: the BASIC (not the Game)
« Reply #5 on: February 21, 2012, 05:48:27 pm »
I forgot to add the color in Locate and Else. XD
Just added them.
Sig wipe!

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: z80 TI-BASIC to PRIZM-BASIC: the BASIC (not the Game)
« Reply #6 on: February 21, 2012, 07:38:47 pm »
By the way, you know you can use [hr] to draw horizontal lines:
So you don't have to use [spoiler][/spoiler].




Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: z80 TI-BASIC to PRIZM-BASIC: the BASIC (not the Game)
« Reply #7 on: February 21, 2012, 09:21:44 pm »

THAT was what I was looking for XD
Thanks
Sig wipe!

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: z80 TI-BASIC to PRIZM-BASIC: the BASIC (not the Game)
« Reply #8 on: February 25, 2012, 09:27:17 pm »
updated for => stuff.
I think this should go to tutorial eventually... :D
Sig wipe!

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: z80 TI-BASIC to PRIZM-BASIC: the BASIC (not the Game)
« Reply #9 on: February 26, 2012, 09:30:19 pm »
With the => do you have to use goto's? Or could you simply tell it to do something like Locate blahblablah?
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: z80 TI-BASIC to PRIZM-BASIC: the BASIC (not the Game)
« Reply #10 on: February 26, 2012, 09:35:07 pm »
For the Disp Command you just showed text in quotes but this wont work for variables all the time(It at least didnt work in my program but that may be my fault)
Also istn there some strange triangle thing for Disp then pause?
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: z80 TI-BASIC to PRIZM-BASIC: the BASIC (not the Game)
« Reply #11 on: February 26, 2012, 09:37:24 pm »
I know how to display, I was just asking about the => command. Also yes the triangle thing will act as a pause in most cases
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: z80 TI-BASIC to PRIZM-BASIC: the BASIC (not the Game)
« Reply #12 on: February 26, 2012, 09:43:54 pm »
Oh I wasnt responding to yours saintrunner and I think that the => command should work with anything I'll test it on calc in a minute
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: z80 TI-BASIC to PRIZM-BASIC: the BASIC (not the Game)
« Reply #13 on: February 27, 2012, 12:36:48 am »
Looks nice so far Yeong. When it reaches more progress, you should put it in the tutorials section with a link to this thread. :D

Offline turiqwalrus

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 840
  • Rating: +51/-2
  • Wheeeeeee~!
    • View Profile
Re: z80 TI-BASIC to PRIZM-BASIC: the BASIC (not the Game)
« Reply #14 on: February 27, 2012, 12:05:34 pm »
Looks nice so far Yeong. When it reaches more progress, you should put it in the tutorials section with a link to this thread. :D
we'd need a prizm-basic section, though... we only have prizm-C and prizm-general

Also, I'd be happy to help a bit with these tutorials, Yeong :D