Here is an implementation of Lee Davidson’s Enhanced Basic that runs on a KIM-1 with expansion memory starting at $2000. Start is at $2000. It needs at least 16K of expanded memory. The challenge to porting to the KIM is the software UART and implementing a non-waiting GETCH. This is not perfect but works well with manual typing and text down load if the text is transmitted with a 20 ms delay between characters and 250 ms delay and end of a line. Slow and steady wins the race.
Download KIM-1 Enhanced Basicenbasic_kim.ptp – 28.11 KB Download KIM-1 Enhanced Basic – Source
enbasic_kim.cba – 336.49 KB
Implementation Details
Modifications:
- 1. Decss changed from $EF to $DC to move away from KIM-1 memory allocations
- 2. Ibuffe changed from $47 (72) to $78 (120) to increase input buffer to 120 characters
- 3. Start at $2000 and Ram_top determined automatically at end of assembly
- 4. Interrupt code was cut out. Removed IRQ,NMI,RETIRQ,RETNMI
- 5. Added a BYE command that exits to the KIM monitor. Cold start needed after BYE
- 6. Embeded ACIA equivalent code for KIM-1 software UART for serial i/o and RST_vec startup code. Implemented a non-waiting GETCH. Not perfect but works well with manual typing and text down load if the text is transmitted with a 20 ms delay between characters and a 250 ms delay and end of a line.
- 7. Kept KIM-1 hardware echo of input characters to keep from spending time on outputting via the software UART. This required removing several echos from the code. Removed the JSR LAB_PRNA from LAB_137F to prevent echo of input character. Removed the JSR LAB_PRNA from LAB_134B to prevent echoing backspace.
- 8. Ctrl-C break is non-functional. Have not found a way to implement with soft UART
Enchanced Basic for Hans Otten KIM-1 Simulator
I found the Hans Otten KIM-1 simulator extremely helpful in implementing and debugging Enhance Basic. The simulator can be found here:
http://retro.hansotten.nl/6502-sbc/kim-1-manuals-and-software/kim-1-simulator/
One of the great features of the simulator is it implements a simulated 6850 ACIA for serial I/O. I implement a version of Enhanced Basic that uses this 6850 emulation. All ACIA functions are coded in the source. No calls to a monitor are made. Origin, Ram_base, Ram_top currently $2000, $4800, $E000 for the Hans Otten simulator. 6850 ACIA base address is $1620. The Ctrl-C function works as expected. Note the KIM-1 version above will not run on the simulator because it makes very specific use of the soft UART hardware and KIM monitor code which is not fully implemented in the simulator.
Download KIM-1 Simulator Enhanced Basicenbasic_sim.ptp – 28.13 KB Download KIM-1 Simulator Enhanced Basic – Source
enbasic_sim.cba – 335.64 KB