If like me you play with 80's computers, you remembered the time where computer have all-in-one OS & Language BASIC.
My goal is to have an equivalent with the Raspberry PI
The goal of this project is to provide BASIC support for the PI Computer
This project use
- Raspberry Pi bare metal environment Circle.
- C and C++ standard library support for Circle Circle-stdlib.
- A small C basic interpreter Bwbasic
- same prerequisites than circle-stdlib
- Successfully tested with:
- gcc-arm-8.2-2019.01-x86_64-arm-eabi.tar.xz from https://developer.arm.com/open-source/gnu-toolchain/gnu-a/downloads
- Successfully tested with PI 1
-
Install circle (provided as example)
cd $HOME/opt
git clone https://github.com/rsta2/circle.git -
Build circle (provided as example)
In $HOME/opt/circle create Config.mk
RASPPI = 1
PREFIX = arm-eabi-Then
cd $HOME/opt/circle
./makeall clean
./makeall -
Install circle-stdlib (provided as example)
cd $HOME/opt
git clone --recursive https://github.com/smuehlst/circle-stdlib.git -
Build circle-stdlib (provided as example)
cd $HOME/opt/circle-stdlib
./configure
make -
Build circle-bwbasic
cd $HOME/opt/circle-stdlib/samples
git clone --recursive https://github.com/fbockelee/circle-bwbasic.git
make
Then copy these files to SD :
kernel.img
profile.bas
TEST.bas
Current Release v0.1
- Use Circle Step 40.
- Use Circle-stdlib v11.
- Use Bwbasic v3.20.
Initial build of circle-bwbasic with Circle, Circle-stdlib
- The banner of bwbasic is ok, so stdout work
- Input in command-line, so stdin work
- some basic BASIC test work (example : 100 PRINT "HELLO")
- access to files on SD works (LOAD "TEST.BAS" and then RUN)
-
some function may not be called : sleep(),chdir(),mkdir(),rmdir() - Missing in circle-stdlib ?
Analyzed : some functions exists in circle (fatdir.cpp)
-
Typing OPTION TERMINAL ANSI and then CLS hangs the system (work under linux)
Analyzed : Sequence escape [2J not implemented in circle
in screen.cpp function CScreenDevice::Write (char chChar) -
I have a french keyboard
Analyzed : change mapping in circle in stdlib
-
When compiling, message for TRUE/FALSE redefined : conflict between STDLIB define and bywater define (in progress)
-
Some minor warning in compilation
-
When no keyboard, scrolling with false input (minor)
-
Many commands/functions not tested
- Create kernel.cpp,kernel.h,main.cpp
- Create Makefile
- Update of bwbasic files :
-
bwbasic.c
replace
extern int main (int argc, char **argv);
by
#if defined(NO_MAIN)
extern int main_bwbasic (int argc, char **argv);
#else
extern int main (int argc, char **argv);
#endif -
bwbasic.h
uncomment #include "bwb_user.h"
replace
extern int main (int argc, char **argv);
by
#if defined(NO_MAIN)
extern int main_bwbasic (int argc, char **argv);
#else
extern int main (int argc, char **argv);
#endif
- add bwb_user.h file
#define HAVE_UNIX TRUE
#define DIRECTORY_CMDS FALSE
#define NO_MAIN
#define HAVE_UNIX_GCC FALSE
- HAVE_UNIX TRUE added to compile with stdlib
- NO_MAIN created replace main by main_bwbasic
- DIRECTORY_CMDS FALSE added to avoid use of chdir(),mkdir(),rmdir()
- HAVE_UNIX_GCC FALSE added to avoid use of sleep()
- Stabilization of BWBASIC --> will be the new reference (actually my reference is BWBASIC on linux)
- Creation of PIBASIC = BWBASIC with enhancements (speed, editor, most hardware connection with circle, best method to add command)
This project is licensed under the GNU GENERAL PUBLIC LICENSE Version 3 - see the LICENSE file for details
- Rene Stange for Circle.
- Stephan Mühlstrasser for Circle-stdlib.
- Ted A. Campbell,Jon B. Volkoff,Dale DePriest,Howard Wulf for Bwbasic.
- The Newlib team for Newlib.
- The mbed TLS team for mbed TLS.