Thursday, April 26, 2012

Porting 2KSA to the Replica 1

2KSA is a symbolic assembler written in 1979 by Robert Denison. A PDF document with source code and description is available here.

Cover Page of 2KSA Manual

It was primarily written for KIM-1 systems.

It is a somewhat primitive assembler by today's standards but amazingly it is only about 2 kilobytes in size, written in assembler, allowing it to run resident on very small systems like the KIM-1. It is also well documented mostly portable. It is able to assemble itself.

I thought it would be fun to try to port it to the Replica 1. The first task is to enter the source code. The PDF file is all images, and while I have found some text versions of the document they are OCRed and are incomplete and have errors.

I am in the process of entering the code and getting it to assemble using cc65 to produce the same binary code as the dumps in the documentation. KIM-1 users may find this useful so I will make the original KIM-1 version available.

The next step will be to port it to the Replica 1 which should only involve replacing the I/O routines and some addresses. If it works well I may make some enhancements, like extending the error messages from the current one character messages.

So far I have found a few errors in the document but I can resolve them by looking at the memory dumps.

The source code can be found here.

No comments: