TOYOSHIKI Tiny Basic - Interpreter


#1

Description

TOYOSHIKI Tiny Basic is Palo Alto Tiny BASIC(1976) clone.
Interpreter is magic. if you see internal structure, you will become wizard :slight_smile:

Installation

Request : Arduino IDE 1.6.x

  1. download from github
  2. pls edit test.bat(windows) or test.sh(osx) for your computer.
  3. execute test.bat
  4. this program need Serial Monitor(terminal). i tested Tera Term. it is famous in Japan.
  5. after connect, input keyboard.

Manual(BASIC grammar)

https://en.wikipedia.org/wiki/Tiny_BASIC
i added CLS, PSET.

sample code:

10 FOR I=2 TO -2 STEP -1; GOSUB 100; NEXT I
20 STOP
100 REM SUBROUTINE
110 PRINT ABS(I); RETURN

Development

compiler : windows Arduino IDE 1.6.9(avr-gcc) + 1.0.6(make.exe)
image converter : python 2.6 + PIL
etc : Visual Studio 2015 C#


[Discuss] Arduboy Game Format (.arduboy) Guide
Smart Response XE Re-purposed into Arduboy
Hello, new here, some screens, and questions
Eried's Unofficial Repo :)
Eried's Unofficial Repo :)
"Semi-Official" Game List for the Arduboy
#2

This is great! Now I don’t need to buy a Windows 10 device to use Continuum; I can just plug my Arduboy into any terminal and GET WORKING! :smiley:

I got it to work with PuTTY.


#3

thanks action reporting!

now is a good age. github have many source code of basic interpreter.
sure, there is good and bad.

…i wanted born 20 years late lol


#4

I made a wacky bouncing ball! :smiley:

1000 REM SETUP

1010 U=4
1020 V=4
1030 X=30
1040 Y=30


2000 REM UPDATE

2010 X=X+U
2020 Y=Y+V

2110 IF X<=0 U=RND(10)
2120 IF X<=-63 U=-RND(10)

2210 IF Y>=63 V=-RND(10)
2220 IF Y<=0 V=RND(10)


3000 REM DRAW

3010 CLS
3020 PSET X,Y

4000 GOTO 2000

SIZE() prints 210.


#5

very fast work!

i runed your program. my tension is max!! Woohoo!!!:joy:
Should I make the instruction word or pset color argument?


#6

Yes, please! This is fun :smiley:


#7

MULTIBALL MODE!

1000 CLS
1010 B=11

2010 FOR I=0 TO B STEP 4

2020 @(I)=@(I)+@(I+2)
2030 @(I+1)=@(I+1)+@(I+3)

2040 IF @(I+3)=0 @(I+3)=5

2050 IF @(I)<=0 @(I+2)=RND(10)
2060 IF @(I)<=-63 @(I+2)=-RND(10)

2070 IF @(I+1)>=63 @(I+3)=-RND(10)
2080 IF @(I+1)<=0 @(I+3)=RND(10)

2090 PSET @(I),@(I+1)
2100 NEXT I

4000 GOTO 2010

SIZE() prints 288.

Array subscripts take too much memory! Add PEEK and POKE :yum: (kidding, haha)

TOYOSHIKI Tiny Basic is the best, :heart_eyes:


#8

PEEK POKE… nostalgic sound.
we can get hex basic core(dump). hahaha its joke.:slight_smile:

By the way
i added pset color argument.

PSET 0,0,1
PSET 127,63,1
PSET 127,63,0

variable and array size s8 -> s16.
i changed bit.

1000 REM SETUP
1010 U=4
1020 V=4
1030 X=30
1040 Y=30

2000 REM UPDATE
2010 X=X+U
2020 Y=Y+V
2110 IF X+U<=0 U=RND(10)
2120 IF X+U>=127 U=-RND(10)
2210 IF Y+V<=0 V=RND(10)
2220 IF Y+V>=63 V=-RND(10)

3000 REM DRAW
3010 CLS
3020 PSET X,Y,1
4000 GOTO 2000

now… new order thinking.
LINE, CIRCLE, SAVE, LOAD, INKEY, &&, ||…
but source code dont keep simple after add new orders.

probably i will add only 1, 2 order.


(B Alan Eisen) #9

I dont think that Peek and poke will work here. I wonder… Is there an annotated ROM? How about a decent development book for newbees? I would be happy to help write one if somebody is willing to do the annotated coding. I am willing to write a table of contents to start this. baleisen@hotmail.com


(Ross) #10

Hey, I’ll add you to the @Developers group. We do love some LaTeX.


(Cody) #11

Looks good will try😛


(Josh Goebel) #12

Program: 15414 bytes (47.0% Full)
(.text + .data + .bootloader)

That is pretty amazing. Any thought to adding higher level drawing commands to basic itself? I still remember advanced BASIC from Commodore 64 days.


#13

The my encounter with BASIC was MSX(Zilog Z80).
I liked cheep beep sound.

no. sry. My next hobby is filament tube(similar to Nixie tube).:sweat_smile: