[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

BASIC in ROM - Any Interest?

I'm wondering if there is any interest in having BASIC in ROM allowing turn-key BASIC programming; if so then please read on.

One of my design goals was for my S-100 projects was to get BASIC in ROM running. I wanted to do this for several reasons:
 - It takes me back to the days of my Radio Shack Model I with BASIC in ROM
 - I find BASIC really useful for debugging boards; PEEK, POKE, INP, OUT and WAIT are really useful
 - BASIC gives me a turn key solution; turn the power on and I have the BASIC prompt
 - For quick and dirty code I find BASIC easier to use / manage

The chosen BASIC:
   I looked at the source for several BASIC interpreters and finally settled on using the NASCOM BASIC that had been ported to the "Space Time Productions" SBC. Joel Owens (http://www.joelowens.org/z80/index.html) had ported it, converted it to Console I/O, documented it and provided clean commented source on his web site. Joel gave me the go ahead to use the source for this project.
What I did:
 - One of my design goals was to use common tools to manage the code; NOTEPAD++.EXE as the editor and TASM as the assembler. I wanted to code to be compiled on a PC then using a USB EPROM programmer to program the EPROM.
 - I formatted the code so it looks clean using NOTEPAD++.EXE
 - I added code to allow it to use 16550 UARTS; this was tested using the UART on the prototype S-100 Utility (MSX2) Board.
 - I added code to allow it to use the USB serial adapter on the S-100 Serial IO Version 02 board.
 - The original code had BASIC at the bottom of MEMORY; I wanted it in high MEMORY instead so that the low memory areas are RAM based to allow CPM to run; I made edits to move it to the $E000-$FFFF address space.
 - I modified the CLS command to use ANSI escape sequences to home the cursor and clear the screen.
 - I added a HOME command to use ANSI escape sequences to home the cursor.
   There are two versions (source branches)
 - One meant to run in LOW memory targeting the EPROM socket on the S-100 Utility (MSX2) card (16550 UART).
 - One meant to run in HIGH memory on my S-100 Z-80 CPU V2 board - I had to make a minor change on the board to allow a full 8K of EPROM to be used.

BASIC's Features include:
 - Floating point maths with a full set of functions
 - For, Next, Step, Goto, Gosub, Return, Stop, On, Wait, End
 - String functions MID$, RIGHT$, LEFT$, LEN, STR$, VAL, ASC, CHR$
 - USR function
 - UPPER and LOWER case
 - Fully tokenized BASIC
 - Auto detection of MEMORY size
 - I've updated STAR TREK to run
 - I've updated HUNT THE WUMPUS to run

Still to do:
 - Fully test it
 - Add drivers for other Serial IO devices such as the Z-80 DART
 - Clean up the build environment - currently it's just a BAT file
 - Clean up the source so there is only one source code file that used #DEFINES to control how it's compiled
 - Update the BASIC documentation
 - Have more fun