KIM-1 Software

KIM-1 Paper Tapes

This is a collection of KIM-1 software in the paper tape format that be can loaded using the “L” command of the KIM monitor. The languages I have configured include:

  • Tiny Basic
  • Microsoft Basic – KB-9
  • Focal
  • KIMForth
  • Enhanced Basic for KIM-1

I use RealTerm: Serial Capture Program 3.0.1.45 to Load (L) or dump (Q) these files.

Here are notes about the tweaks and patches to various binares:

Tiny Basic

Download Tiny Basic raw
TinyBasic_2000_raw.ptp – 5.73 KB

A straight dump of a copy of Tiny Basic loaded from a cassette tape I own with a 1978 copyright by Tom Pittman. It loads from $2000-$28FF. Cold start is at $2000 and warm start is at $2003.

Download Tiny Basic VT100
TinyBasic_2000_VT100.ptp – 5.73 KB

This is a version of the above that I patched to work more smoothly with the ANSI (VT100) emulation in RealTerm. Implemented a control character filter to remove the unnecessary x-on, x-off and rubout characters and set Backspace ($08) as the delete character.

Microsoft Basic for KIM-1

Download Microsoft Basic
kb9.ptp – 21.90 KB

There are several binaries and tape dumps for Kim Basic (KB9) floating around. The only one I could find that would run cleanly was from the Corshamtech.com website (buried in a Tech Tips page https://www.corshamtech.com/tech-tips/basic-interpreters-for-the-6502/ ).

Cold start for KB9 is $4065. It starts and asks:

MEMORY SIZE? – enter upper memory limit in DECIMAL. Or hit Return and it will find the top of memory

TERMINAL WIDTH? – Return defaults to 72. I typically use 80

WANT SIN-COS-TAN-ATN? – Y = yes, recommended.

Warm start is at $0000.

Download Microsoft Basic VT100
kb9_VT100.ptp – 21.91 KB

The original KB9 was used “_” (underscore $5F) as a delete character. I implemented a patch to get backspace ($08) to work as the delete character.

FOCAL

Download Focal raw
focal_FCL65E_raw.ptp – 14.48 KB

A straight dump of a cassette load of FCL65E copyright 1978 Wayne Wall. The upper memory limit $0053-$0054 set to $3F00. It loads and runs in just an 8K memory expansion with a cold start at $2000. Rubout ($7F) is the delete character that generates a ‘\’.

Download Focal VT100
focal_FCL65E_VT100.ptp – 14.48 KB

As with most early code, Focal was set up to use a teletype and has extra pad characters. Patches were made for video terminal operation and memory to $7FFF.

KIMForth

KIMForth is an implementation of the 6502 FIG-FORTH 1.1 specifically for KIM-1 systems with additional memory starting at $2000. I have incorporated the full Bill Ragsdale 6502 assembler and a few additional words to facilitate code development. In the 6502 FIG-Forth implementation the upper memory boundary is hard coded and used in several places throughout the code. So, at this time, I created four versions representing different memory expansion starting at $2000 and stopping just short of the upper memory boundary to not interfere with any interrupt vectors or their mirrored addresses. In all cases, Cold start is at $2000 and Warm start is at $2004.

Download KIMForth ($2000-$5F00)
KIMForth_5F00.ptp – 22.03 KB
Download KIMForth ($2000-$7F00)
KIMForth_7F00.ptp – 22.03 KB
Download KIMForth ($2000-$DF00)
KIMForth_DF00.ptp – 22.03 KB
Download KIMForth ($2000-$FF00)
KIMForth_FF00.ptp – 22.03 KB

For details see my KIMForth page.

KIM-1 Enhanced Basic

I have created 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 Basic
enbasic_kim.ptp – 28.11 KB

For more details see my KIM-1 Enhanced Basic page

Tools and Utilities

A great resource information and tools for 6502 systems is www.6502.org Various cross assemblers and compilers can be found under the Development Tools link. Many of them were meant to run under older Windows or DOS systems or Linux environments which would require setting up virtual machines or other environments. I found the Charles Bond assembler (cbA65) to be an excellent cross assembler that runs cleanly in Windows 10 from the command line.

http://www.crbond.com/6502.html

I originally found the cba65 assembler via the www.6502.org link, which later broke and I updated the link above. In case the link breaks again I have include the cba65 assembler and manual in the following zip file since the author indicated “All software is offered freely and without restriction”.

Download Charles Bond Assembler
cba65.zip – 502.46 KB

KIM-1 Paper Tape Utility – KIMPTP.py

However you generate your code for the KIM-1 you will end up with either a binary file or a hexadecimal format file. To load these into a KIM-1 system using the “L” command they need to be converted into the KIM-1 paper tape format. I developed the following Python script to facilitate this conversion which generated a .ptp file suitable for loading with the KIM-1 “L” command..

Download KIM-1 Paper Tape Utility
KIMPTP.py – 7.31 KB

Usage: KIMPTP.py  file.ext  (starting address)

If invoked without arguments it will ask for a filename and if the extension is .bin it will ask for a starting address in hex.

Optimized for use with the Charles Bond CBA65 6502 assembler

Typical usage is to create a makeproject.bat file containing

CBA65 project.cba
KIMPTP.py project.h65

Then execute the makefile from a CMD window

KIMPTP makes the conversion based on the file extension and generates a project.ptp output file.

  • .hex – Converts Intel Hex format text file
  • .bin – Converts a binary file also needs a starting address for the binary
  • .h65 – Converts a h65 file generated by the Charles Bond CBA65 assembler
  • .mos – Converts a Moshex file generated by the Charles Bond CBA65 assembler