This is an old revision of the document!
Table of Contents
BBC BASIC
Implementing BBC BASIC on Rienk Koolstar's sbc-2g-512
Richard Russell maintains a website providing a number of different versions of BASIC which have compatibility with the original BBC Micro 6502 BASIC and Jonathon Harston has documented over 30 platforms which have implemented BBC BASIC on them.
It was Ben Ryve's homebew Z80 Computer implementation that drew my attention to the existence of a Z80 version of BBC BASIC.
A limiting factor around the BBC BASIC ROM is that no source code has been published. However, tools and documentation exists to relocate and expand this system.
Other versions of BASIC around the web:
ZX Spectrum BASIC ROM
Another version of BASIC that I found particularly interesting is Dr Andy Wright's ZX Spectrum BASIC ROM which has published source code and designed to work in a system with paged ROM addressing system. Source code can be found here. Other source code for Sinclair and Spectrum ROMs can be found here.
Tiny BASIC
Doug Gabbard at retrodepot.net has updated and implemented Li-Chen Wangs' Tiny Basic and the source code is available here.
Resources
R.T. Russell Z80 CPM: http://www.rtrussell.co.uk/bbcbasic/z80basic.html
Z80 CP/M Manual: http://www.bbcbasic.co.uk/bbcbasic/mancpm/index.html
J.G Harston Z80 porting tool: http://mdfs.net/Software/BBCBasic/Z80/port.htm
Porting
J.G Harston port.zip contains the following files
BBC0100 - Object code PortZ80 - Documentation Relocate - BASIC program to relocate the BBC0100 Object code
NOTE: The Relocate program in this archive needs to be run under the windows trial version of BBC BASIC. Or use this ASCII text version:
:playground:b1ackmai1er:bbcbasic:relocate.zip
Memory map:
Header | Prog Code | Scratch | Workspace | Lowest PAGE | highest HIMEM | OSCLI | BRKV | |
---|---|---|---|---|---|---|---|---|
BBC BASIC | &0100 | &0200- | &34EE | &3500-&37FF | &3800 | ? | &FFF7 | &FFFA |
SBC-2G-512 | &0100 | &0200- | &FF88 | &4000-&42FF | &4300 | &FF80 | ? | ? |
&0100-&01FF needs to contain the initialization for the board and a jump table for the minimum set of functions required for BBC BASIC to communicate.
The Bbcdist.mac file provides the example code for this area.