Subject: TIdBiT XB/BASIC translator

From: Owen Brand <[email-masked]>
Date: Wed, 16 Feb 2011 11:26:26 -0500

This is an interesting idea.... Matthew Hagerty has created an XB
translator... it allows you to write BASIC code using labels instead of line
numbers and translates it into TI-readable XB or BASIC code.  for instance
(and I'm sure Yahoo will maul this formatting)

This allows me to free-form code in Notepad++ using common BASIC/XB syntax
but without being tied to line numbers... changing any routine is as simple
as adding, subtracting from, or editing the content of a section of code
indicated by a label... no resequencing countless times or trying to find
space between two lines for another routine.  I spent quite a bit of time on
this last night, and it is pretty awesome.

This is the code I inputted for the translation:

*note, all my labels end with a colon, so A:, K:, W:, W1:, S:, S1:, and E
are my labels... in case the formatting gets screwy.  =)  You can find this
translator at the link below the code.  Great job Matthew!!!!
**************************
REM PROGRAM START

   FOR I=2 TO 14 :: CALL COLOR(I,16,1):: NEXT I

A: CALL CLEAR :: CALL SCREEN(2)

   DISPLAY AT(1,4):"THIS IS A MENU TEST";"   FOR BERYL REICHARDT";
   DISPLAY AT(8,1):"PRESS 1 FOR WEAPONS";"PRESS 2 FOR STATS";"PRESS 3 TO
EXIT";
K: CALL KEY(0,K,S):: IF S=0 THEN GOTO K

   IF K>51 THEN GOTO K ELSE IF K<49 THEN GOTO K
   ON K-48 GOTO W,S,E
W: CALL CLEAR :: PRINT "WEAPONS" :: PRINT "PRESS ENTER TO EXIT"
W1:  CALL KEY(0,K,S):: IF S=0 THEN GOTO W1
   IF K=13 THEN GOTO A ELSE W

S: CALL CLEAR :: PRINT "STATS" :: PRINT "PRESS ENTER TO EXIT"
S1: CALL KEY(0,K,S):: IF S=0 THEN GOTO S1
   IF K=13 THEN GOTO A ELSE S

E: CALL CLEAR :: PRINT "THANK YOU"
   CALL SOUND(1000,440,30)
   END

************************************

And this is what it output:

100 REM PROGRAM START

110 FOR I=2 TO 14 :: CALL COLOR(I,16,1):: NEXT I

120 CALL CLEAR :: CALL SCREEN(2)

130 DISPLAY AT(1,4):"THIS IS A MENU TEST";"   FOR BERYL REICHARDT";

140 DISPLAY AT(8,1):"PRESS 1 FOR WEAPONS";"PRESS 2 FOR STATS";"PRESS 3 TO
EXIT";

150 CALL KEY(0,K,S):: IF S=0 THEN GOTO 150

160 IF K>51 THEN GOTO 150 ELSE IF K<49 THEN GOTO 150

170 ON K-48 GOTO 180,210,240

180 CALL CLEAR :: PRINT "WEAPONS" :: PRINT "PRESS ENTER TO EXIT"
***************************

http://codehackcreate.com/archives/237

***this is the link to Matthew's excellent program!!!  His site is FULL of
TI-related hardware and software projects, this is the one I'm mostly
playing with now.  He also has a great store where you can buy "Pitfall!"
carts and many other things, such as cart boards, logic chips, etc.

---

From: Owen Brand <[email-masked]>
Date: Wed, 16 Feb 2011 11:36:35 -0500

sorry.. code got cut off in that last pasting... Ugh

***here's the output code

100 REM PROGRAM START

190 CALL KEY(0,K,S):: IF S=0 THEN GOTO 190

200 IF K=13 THEN GOTO 120 ELSE 180

210 CALL CLEAR :: PRINT "STATS" :: PRINT "PRESS ENTER TO EXIT"

220 CALL KEY(0,K,S):: IF S=0 THEN GOTO 220

230 IF K=13 THEN GOTO 120 ELSE 210

240 CALL CLEAR :: PRINT "THANK YOU"

250 CALL SOUND(1000,440,30)

260 END