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

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

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.

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

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.

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

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 ‘\’.

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 6520 FIG-Forth implementation the upper memory boundary is hardcoded and used in several places throughout the code. So, at this time, I created three 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.

For details see my KIMForth 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”.

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..

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