|BBC BASIC (Z80) for the ZX Spectrum|
BBC BASIC files
|Install.htm||Installing BBC BASIC on the Spectrum|
|BBCBasic.rom||16K||BBC BASIC language and system ROM.|
|BBCBasic.rom||32K||Combined BBC BASIC and ZX BASIC ROM.|
|BBCBasic.tap||17K||BBC BASIC loadable to main RAM.|
|BBCBasic.txt||20K||BBC BASIC documentation.|
|Utils.tap||9K||Some test utilities.|
|Utils.mdr||135K||Microdrive file of test utilities.|
|Sample.tap||104K||Some sample programs.|
|Sample.mdr||135K||Microdrive file of sample programs.|
|Host40.src||57K||Source for Spectrum host code.|
|Docs||Spectrum BBC BASIC documentation.|
Certain code within the conversion of BBC BASIC (Z80) in order to enable it to run on the Sinclair Spectrum remains the Copyright (C) of J.G.Harston, 1989-2005.
Now doesn't need to be pre-configured with BASIC's ROM number. Checks ROMs to find out where BBC BASIC is on startup. Same ROM image should now work in a &7FFD ROM and in DOCK or EX. Uses a simplistic test on startup to see if Timex MMU present. Does this by checking if IN &FF is zero. Also issues Service 1 on startup to let other code have a look-in. If shadow memory paged in, ensures screen paged in when needed. BASIC runs in shadow mode with PAGE at &4000. This gives 44K free - exactly the same as with BBC HIBASIC on the 6502 CoProcessor!
Update: ensured file load/save deselects the screen where appropriate. Note: with PAGE at &4000 can't load files into screen memory at the moment. Need to fully implement 32bit->16bit addressing as specified in Spectrum/FileDocs. Also, Escaping from cat/load/save with shadow memory present causes a crash. BBC BASIC uses DOCK/EX as previously selected, doesn't ensure same is selected, so slight chance DOCK may swap with EX.
First version made that can run from main RAM. Results in PAGE at &6000 and HIMEM at &BB00. Seems to work, but not fully tested yet.
ROM port no longer a variable. ROM paging able to use Timex/Spectrum SE paging registers at &F4 and &FF. ROM numbers are:
DOCK/EX paging disabled by default with b7 of SCREEN set. Will also select external ROMs with OUT &7FFD,n*16 with n>3. Shadow memory can page screen out if available by ORing ROM number with 3. BASIC ORs its own ROM number with 3 to try to select shadow memory.
Testing reveals v0.38 works on the Spectrum SE, but when BASIC pages the screen memory out it forgets to page it back in to check for keypresses! Filenames now changed slightly, adding '.rom' extensions for easier use on extension insistant systems.
Generalised ROM paging routine, ROM port a variable in high memory. IM2 interupts use I=&FD with two overlapping vectors at &FDFE-&FDFF and &FDFF-&FE00 so interupts with data=&FE and data=&FF both work. RdCh checks for Escape state before waiting for a key, so Escape state doesn't wait for a keypress.
Page &FFxx entry points rearranged to fit ROMPAGE entry point in. High memory contains ROM numbers of BBC BASIC and ZX BASIC, so can be changed. Reset code rewritten, doesn't clear memory, abandoned seperating RST &00 from RESET. *Quit quits Speculator with &FDFD opcode. MEMBOT a variable and so can be changed.