Brutech B.E.M. and Radio Bulletin

Brutech and the Radio Bulletin magazine worked together. The hardware produced or resold by Brutech was offered to the magazine for reviews. And Brutech placed many advertisements in the magazine. I visited the Brutech offices several times, it was close to where I lived.

BEM-1 card, as used in the KIM memory expansion article November 1977
The BEM bus
Brutech sold the VIM-1 and SYM-1, with their cards as expansions.
Review in Radio Bulletin November 1978
Brutech sold also the PC100, the Siemens OEM version of the AIM 65. Again the expansions could be used, same bus.
Review in Radio Bulletin August 1980
The AIM 65 and KTM-2 packaged as the Samson system,. the BEM-4 memory card, the SYMP universal programmer.
Review in Radio Bulletin November 1980
BEM RTC1 card, advert in the RB CB Special 1980
BEM-Impact 1000, a BEM-bus based development system, review in Radio Bulletin Oktober 1980
BEM Eurocard system, article by C.J. Bruyn, on the BEM bus, BEM-MON-1 (a TIM 6530 004 system!) and other cards

Micro-gebeuren november 1977, BEM-1, other BEM cards
Micro-gebeuren April 1980, BEM-PSIO-1 USART card, BEM-AD3, BEM-AD4
Micro-gebeuren Mei 1980, BEM-6 16/32K EPROM card

KIM-1 Case

The KIM-1 came from MOS Technology and Commodore without a case or power supply. So you either build your own housing or looked at what other firms sold for the KIM-1.
There was a lot on offer, mostly targeted at system expansion with large cases.

One of the cases you saw quite often was this case. It came with one of my KIM-1’s. Small, simple and effective

A perfect solution for an unexpanded KIM-1. Quite popular in education. Add a power supply and you can start using it without exposing the electronics. The LED display was behind a red plexiglas cover, so that improves readability.

New versions of KIM-1 Simulator V2.0.0 and TIM Simulator V0.9

The KIM-1 Simulator has seen a large update.
A new piece of hardware is added, the SD Card/RTC Shield by Corsham Technology.
This addition has been written by Eduardo Casino. Lots of code contributed, thanks Eduardo!
He also added support for two operating systems using the SD Shield, xKIM by Bob Applegate and CP/M-65 by David Given.

The problem with local language keyboard layouts is solved by Eduardo. Now the host operating system takes care of the different layout.

The documentation has been enhanced and moved from a local limited html file to an online version.

Enjoy! See it here.

The keyboard and online improvements have been ported by me to the TIM/Jolt Simulator.

Download it here.

CP/M-65 on the SD Card/RTC Shield

CP/M-65

CP/M-65 is a native port of Digital Research’s seminal 1977 operating system CP/M to the 6502.
Developed by David Given. Ported to many 6502 systems, see the original github archive.

Currently you can cross-assemble programs from a PC, as well as a working C toolchain with llvm-mos. For native development, there’s a basic assembler, a couple of editors, a BASIC, and a byte-compiled Pascal subset and interpreter.

Eduardo Casino ported CP/M-65 to the KIM-1 with an MTU K-1013 FDC, directly connected SD card module, the 1541 drive or Corsham Technology SD CARD/RTC Shield.
And now Eduardo has ported a version special to the KIM-1 Simulator with SD Card/RTC Shield simulation. See his fork of CP/M-65 on his github archive. Several branches are available, development versions with a.o. the KIM-1 Simulator version.
The main changes are to support the KIM-1 Simulator character I/O, using the ACIA simulation instead of low level KIM-1, for non-blocking character input.

How to start CP/M-65

To start using the SD Card/RTC Shield go to the menu settings.

  1. Enable Corsham SDShield emulation
  2. Copy the folder from the KIM-1 Simulator setup distribution archive called SDCARD to your disk.
  3. Choose the Disk images directory pointing to the folder SDCARD. You will see the files on Disk 0 etc filled in, DSK files are for operating systems like CP-M/65
  4. Make sure the first disk mounted is CPM-BOOT.DSK. The DSK files are in the SDCARD folder.

Now you start CP/M-65.

  1. Load the file bootshield.pap into memory with File – Load file in Memory – papertape.
    The file is in the SDCARD folder.

  2. Start the console by pressing the TTY Console button on the main window
  3. Start the Simulator by pressing Run/Stop button
  4. Start CP/M with
    0200 G
    and see the CP/M-65 prompt.
    Note that this boot program gets overwritten by CP/M-65, so you have to load it again after a reset.

Alternative boot program
In the SDCARD folder you find a second boot program called bootsdshield-kimrom.bin
This one can be placed in the unused 6530-003 ROM area, the same idea as Wozmon for the KIM-1.
The advantage is that this is not overwritten by CP/M-65,
Load at $1AA0, start at $1AA0.

Working with disks

The disks, stored in files with type .DSK are in the SDCARD folder. You can mount/dismount/create disks from the Settings screen.
You can have as many as four.

On the Settings screen the disks mounts are shown. Click on the name of a mounted disk or an empy Mount, to go to the Mount Disk dialog. Mount/Dismount here, in Write or read Only mode.

Press the the three … next to the field Image file to select or create a disk image.

Press New and you get the New diskimage dialog.

There is also the IMU utility in CP/M-65 to work with disks from within CP/M-65: mount/unmount, list the directory of the SDCARD folder. create/delete and copy.

Example session

KIM                                                   
0200 D8                                               
KIM                                                   
0200 D8 G                                             
                                                      
CP/M-65 for the KIM-1                                 
                                                      
A>dir                                                 
A: SCRVT100 COM : IMU      COM                        
A: IMU      TXT : SYS      COM                        
A: PASC     PAS : ASM      TXT                        
A: HELLO    ASM : DEMO     SUB                        
A: ASM      COM : ATTR     COM                        
A: BEDIT    COM : CAPSDRV  COM                        
A: COPY     COM : CPUINFO  COM                        
A: DEVICES  COM : DINFO    COM                        
A: DUMP     COM : LS       COM                        
A: STAT     COM : SUBMIT   COM                        
A: MORE     COM : BEDIT    ASM                        
A: BEDIT    TXT : DUMP     ASM                        
A: LS       ASM : CPM65    INC                        
A: DRIVERS  INC : ATBASIC  COM                        
A: ATBASIC  TXT : OBJDUMP  COM                        
A: MKFS     COM : ADM3ADRV COM                        
A: ADM3ATST COM : CLS      COM                        
A: LIFE     COM : QE       COM                        
A: SCRNTEST COM : VT52DRV  COM                        
A: VT52TEST COM : KBDTEST  COM                        
A: MBROT    COM : DS       COM                        
A: DS       TXT : PINT     COM                        
A: PASC     OBB : PLOAD    COM                        
A: HELLO    PAS : IMU3     TXT                        
A: HELLO    SYM                                       
                                                      
A>pint PASC.OBB PASC.PAS PASC.OBS                     
Pascal-M interpreter for CP/M-65: B66F bytes free     
Pascal-M compiler V2k1 for CP/M-65                    
Processing: writeerr                                  
Processing: beginlin                                  
Processing: endline                                   
Processing: error                                     
Processing: stringsi                                  
Processing: nextchar                                  
Processing: insymbol                                  
Processing: enterid                                   
Processing: searchse                                  
Processing: searchid                                  
Processing: getbound                                  
Processing: hexout                                    
Processing: writeout                                  
Processing: bytegen                                   
Processing: wordgen                                   
Processing: genujpen                                  
Processing: plantwor                                  
Processing: skip                                      
Processing: test1                                     
Processing: test2                                     
Processing: intest                                    
Processing: constant                                  
Processing: comptype                                  
Processing: isstring                                  
Processing: simplety                                  
Processing: fieldlis                                  
Processing: typ                                       
Processing: constdec                                  
Processing: typedecl                                  
Processing: vardecla                                  
Processing: paramete                                  
Processing: procdecl                                  
Processing: ldcigen                                   
Processing: ldagen                                    
Processing: lodgen                                    
Processing: condgen                                   
Processing: loadsetc                                  
Processing: cspgen                                    
Processing: incgen                                    
Processing: load                                      
Processing: store                                     
Processing: loadaddr                                  
Processing: falsejum                                  
Processing: calluser                                  
Processing: selector                                  
Processing: variable                                  
Processing: processt                                  
Processing: readproc                                  
Processing: processt                                  
Processing: writepro                                  
Processing: newstate                                  
Processing: releases                                  
Processing: resetrew                                  
Processing: closepro                                  
Processing: assignpr                                  
Processing: getcomma                                  
Processing: ordfunc                                   
Processing: succfunc                                  
Processing: predfunc                                  
Processing: chrfunc                                   
Processing: oddfunc                                   
Processing: eofeolns                                  
Processing: callnons                                  
Processing: call                                      
Processing: opgen                                     
Processing: setexpre                                  
Processing: factor                                    
Processing: term                                      
Processing: simpleex                                  
Processing: expressi                                  
Processing: assignme                                  
Processing: compound                                  
Processing: ifstatem                                  
Processing: casestat                                  
Processing: repeatst                                  
Processing: whilesta                                  
Processing: forstate                                  
Processing: statemen                                  
Processing: body                                      
Processing: block                                     
Processing: stdnames                                  
Processing: enterstd                                  
Processing: enterstn                                  
Processing: enterund                                  
Processing: initiali                                  
Processing: compileh                                  
Processing: compilep                                  
Processing: skipspac                                  
Processing: getword                                   
Processing: findend                                   
Processing: openfile                                  
Processing: closefil                                  
Processing: dumperro                                  
Processing: cpascalm                                  
Compilation successful.                               
No compilation errors PASC.PAS                        
                                                      
A>pload PASC.OBS PASC.OBB                             
Opening input file...                                 
Opening output file...                                
Reading OBP...                                        
Seen 94 procedures                                    
Writing output file...                                
Closing output file...                                
Success.                                              
A>type HELLO.PAS                                      
program HelloWorld;                                   
                                                      
begin                                                 
    writeln('Hello from Pascal!')                     
end.                                                  
                                                      
A>                                                    
A>pint PASC.OBB HELLO.PAS HELLO.OBS                   
Pascal-M interpreter for CP/M-65: B66F bytes free     
Pascal-M compiler V2k1 for CP/M-65                    
Processing: hellowor                                  
Compilation successful.                               
No compilation errors HELLO.PAS                       
                                                      
B>A:pload A:HELLO.OBS HELLO.OBB                       
Opening input file...                                 
Opening output file...                                
Reading OBP...                                        
Seen 1 procedures                                     
Writing output file...                                
Closing output file...                                
Success.                                              
B>A:pint HELLO.OBB                                    
Pascal-M interpreter for CP/M-65: B66F bytes free     
Hello from Pascal!                                    
                                                      
B>                                                    
post

MTU K-1008 Visible Memory

The MTU Visible Memory is a memory mapped video display made by MTU. Supported by the KIM-1 Simulator.

See the MTU K-1008 pages how it works.

Enabling it will display a form on which the video memory is shown (according the packing of the pixels in bytes, see the manual).

Use the Settings from to enable or disable (default) the K-1008. The base address in memory can be set to what the original board allowed with jumpers.

The K-1008 display can be resized from 1x to 3x. Larger means a slower display, not much effort has been put in making it display fast.
A fourth option is to choose for a correct aspect ratio.

Screenshot of 1.3.3 with ‘correct’ aspect ratio.

Note that the pixel only appears on screen when the corresponding memory location is written to by the CPU. Use Refresh in the Debugger to force the display.

Using MS Basic: the interpreter will detect the video memory as normal memory. No harm done, MS Basic does not support the K-1008. The memory test of MS Basic is visible on the K-1008 display!

There are several ways an image can be loaded to the K-1008 video display:

  • Load a K-1008 formatted binary file into memory. It will show on the K-1008 display if enabled via Settings.
  • The Refresh button in the debugger will also refresh the K-10008 display from memory
  • With a C header file. see below

How to make a C Header image file with threshold

  1. Choose a high contrast image
  2. Load the image in GIMP (a freeware image processing app for Windows, Linux etc)
  3. Scale the image to 320×200 exactly(have the ties between the dimension windows untied)
  4. Use the Treshold tool to convert to black and white, play with the settings until it looks good
  5. Export to, choose the C header file format, a file
  6. This file can be loaded with the File menu entries of the KIM- Simulator main window and Debugger
  7. The file is converted if you load in it into memory
  8. If you have the K-1008 display on (see Settings) it will display it too
  9. Now you can save the image if you wish with the ‘Memory to file’ menu entries

Make a C Header image file with dithered images

  1. Open image in GIMP
  2. Crop the image to 320×200 or a multiple like 960×600
  3. Image – Scale the image to 320×200
  4. Image – Mode – Indexed to black white palette Floyd-Steinberg (normal)
  5. Image – Mode – RGB
  6. File -Export As Select file type – C source header
  7. Export

Note there is a command line program in the folder K-1008 load C Header , called LoadK1008 that converts a C header image file to a K-1008 formatted binary.

D:\k1008\LoadK1008.exe h
LoadK1008 is a program to convert a 320x200 C header file from GIMP to
MTU Visable memory K-1008 image
LoadK1008 <C header filename> <K-1008 binary filename>

Prepare the C header file in GIMP as follows:

  1. Load an image in GIMP
  2. Scale to 320×200 (detach the link between the sizes)
  3. Threshold or dither to black and white, play to get a nice result
  4. Export as C header file
  5. Feed the C header file to this program
  6. Convert the result, a binary file into a program like my Convert 8 bit hex formats (included with the KIM-1 Simulator) to a papertape format with the start address of the K-1008 (2000-C000)
  7. Load the papertape into the KIM-1 or KIM-1 Simulator

Also there are examples of C header and binary K-1008 formatted files.

Sources of LoadK1008 commandline

The folder K-1008 load C Header contains the Freepascal source and original JPG files.

post

TTY Serial

TTY Serial

The KIM-1 Simulator comes with a ‘console’, a glass teletype 24×80 screen. It has a subset of ANSI/VT100 support.
Of course there are much better terminal emulators, like Teraterm, Putty, Coolterm, Minicom etcetera.

And a real VT100 type device is really fun! Or a real Teletype …
Now the KIM-1 Simulator can use either an external serial device, e.g a PC with Teraterm or Minicom, or a terminal emulator locally on the same PC.

Activate serial input/output local on your PC as follows:

  • Start your external terminal emulator, e,g, Teraterm or Minicom with serial port settings 9600 baud.
  • Choose the desired serial port, See below for Windows or Linux null modem setup
  • Start the KIM-1 Simulator
  • Activate TTY Console, the Console window appears
  • Choose Settings – Setup serial port
  • set for 9600 baud
  • Choose the desired serial port, the OTHER in the null modem setup
  • Press the Use serial button, the console window disappears
  • Start the Simulator from the main Window with Run/Stop
  • Now the serial terminal emulator shows the KIM prompt
  • Note the Simulator is not very forgiving if you make a mistake with serial ports in this first version, Close the Simulator application and start over.

Windows
Install the com0com null-modem emulator from here.
That delivers two COM ports that act as if they are connected via a null modem, anything entered at one is sent to the other and vice versa.See the device manager for the ports created.

Use a terminal emulator as Teraterm with a serial connection to the other COM port. With the same settings for serial as in the Simulator!
Then select in Settings – Use serial and start the emulator.
Note the KIM-1 only works with uppercase characters.

Linux

Use this commmand (install socat if not present).

socat -d -d pty pty

The code above returns (the pts numbers may be different).

2013/11/01 13:47:27 socat[2506] N PTY is /dev/pts/2
2013/11/01 13:47:27 socat[2506] N PTY is /dev/pts/3
2013/11/01 13:47:27 socat[2506] N starting data transfer loop with FDs [3,3] and [5,5]

Any character entered at one is sent to the other pts device as if a null modem cable is connected.

Use the device /dev/pts/2 in the KIM-1 Simulator Settings – Setup serial. Default is 9600.
Start a terminal emulator like minicom or Coolterm and select device /dev/pts/3 at 9600 baud.
Select in Settings – Use serial port /dev/pts/3 and start the terminal emulator.
Now you can control the TIM via minicom or any suitable VT100 like terminal emulator.
Select in Settings – Use serial and start the emulator

Minicom is easy to use. Just set the terminal serial port (the other than the emulator uses).

Coolterm is tested, but is a little bit troublesome to configure.
Force the serial port via Custom and ignore the warning messages.

post

TTY Console

TTY console mode

Press the TTY console switch to let the KIM simulator use a glass teletype in a console window. The standard KIM user interface is shown, see the manual how to use.
Note: set the PC keyboard to CAPS Lock, only uppercase is used in the KIM monitor.
Note the menu options to record a session, (Load Text to Console) or play (Save text from Console, followed by Stop saving text ) a text file in the console.
This is in fact the same functionality as a teletype with high speed papertape punch or reader. You can use this to load and save Basic programs as ASCII text files. Or use the KIM-1 tape routines built in KB9 Basic!

The console

The console is an emulation video terminal (ANSI color, subset) connected to an ACIA (a Motorola 6850) in the KIM-1. The KIM Monitor is patched to send or receive via the ACIA and is transparant to the user of the KIM-1 I/O routines (even the quirks like flags and returned register values!)

Keyboard input, when the console window has focus, is sent to the serial input of the ACIA. No local echo. The KIM-1 monitor only accepts uppercase (hint: Caps lock!), user programs are free to use upper or lowercase.

Characters sent tot to ACIA output are received by the console window and handled as a VT100 would do, a subset of the ANSI/VT100 is implemented.
All keys of the PC are usable, SHIFT works. Note the translation of codes from the PC keyboard to ASCII characters is for the keybaord choosen in Settings.
Other mappings are possible by changing the routine in console.pas: procedure TFconsole.FormKeyDown

Received characters by the console are handled as follows, a subset of the ANSI set.

Single control character

$01 : CursorHome 
$04 : CursorRight 
$05 : CursorUp 
BS  : Backspace 
TB  : Tab 
LF  : LineFeed 
FF  : ClearScreen 
CR  : CarriageReturn 
$13 : CursorLeft 
$16 : DeleteToEndofLine 
$18 : CursorDown 
DEL : Backspace  

ESC sequences
ESC[K             Clear from cursor to the end of the line
ESC[0K            Clear from cursor to the end of the line
ESC[1K            Clear from the beginning of the current line to the cursor
ESC[2K            Clear the whole line
ESC[J             Clear the screen from cursor
ESC[0J            Clear the screen from cursor
ESC[1J            Clear the screen until cursor position
ESC[2J            Clear the screen and move the cursor to 0-0, defined sprites are removed, loaded bitmaps are kept

Insert / Delete
ESC[1@            Insert a blank character position (shift line to the right)
ESC[1P            Delete a character position (shift line to the left)
ESC[1L            Insert blank line at current row (shift screen down)
ESC[1M            Delete the current line (shift screen up)

Move cursor
ESC[H             Move to 0-0
ESC[f             Move to 0-0
ESC[s             Save the cursor position 
ESC[u             Move cursor to previously saved position 
ESC[(Row);(Col)H  Move to row,column
ESC[(Row};(Col)f  Move to row,column
ESC[nA            Move the cursor up n lines
ESC[nB            Move the cursor down n lines
ESC[nC            Move the cursor forward n characters
ESC[nD            Move the cursor backward n characters

Attributes
ESC[m             Reset all attributes
ESC[0m            Reset all attributes
ESC[1m            bold
ESC[4m            underline
ESC[5m            italics
ESC[7m            Turn on reverse color
ESC[27m           Turn off reverse color

Color attributes

color     FG       BG      FG high  BG high 
--------------------------------------------
black    ESC[30m  ESC[40m  ESC[90m  ESC[100m
red      ESC[31m  ESC[41m  ESC[91m  ESC[101m
green    ESC[32m  ESC[42m  ESC[92m  ESC[102m
yellow   ESC[33m  ESC[44m  ESC[99m  ESC[103m
blue     ESC[34m  ESC[44m  ESC[94m  ESC[104m
magenta  ESC[35m  ESC[45m  ESC[95m  ESC[105m
cyan     ESC[36m  ESC[46m  ESC[96m  ESC[106m
black    ESC[37m  ESC[47m  ESC[97m  ESC[107m

FG = foreground
BG = background
High = higher intensity

Note that setting colors is implemented in a limited way.
Combining attributes and fore/background in one Escape sequence is not supported
If you want to use for example

  ESC [1;31;104m (bold, red foreground, blue background)

you will have to use

  ESC[1m  ESC[31m ESC[104m

Printable character (>= $20): placed on screen where the cursor is, cursor moved to next position
Wrap around at end of line, screen scroll up when bottom line is reached 
post

SD/RTC Card System, xKIM and CP/M-65


The SD-Shield is a mass storage device designed by Bob Applegate for Corsham Technologies. He named it SD/RTC Card. Based upon an Arduino Shield, an SD card interface and RTC are made available to a computer like KIM-1 or 6800 based machines.
Bob developed supporting KIM-1 software called xKIM, as loadable on a standard KIM-1 or integrated in the KIM Clones and Memory expansions.
Corsham is no more, but you can still build one yourself by visiting Eduardo Casino’s remake or buy one ready made with a Pico at RetroSpy Technologies.
Eduardo also made a PAL-II adapter for the SD Card Shield.

The main functions of the SD Shield are to allow programs access to files on the SD card and get/set the time on the Real Time Clock.
The interface to the SD Card is described in the Remote Disk Protocol Guide..

The SD card Shield and the KIM-1 Simulator

The SD Card shield is emulated in the KIM-1 Simulator since version 2. It used the second RRIOT PIA ports, so the LEDs and switched on the main windows are disabled when in use.
The emulator makes the SD card available as a folder on the disk of the computer, from now on called SDCARD folder. You can place any file there of interest there.

The contents of SDCARD in the KIM-1 distribution is

bootsdshield-kimrom.bin
bootsdshield.bin
bootsdshield.pap
CPM-BOOT.DSK
kb9.ihex
newimage.dsk
SD.cfg
xKIM.ihex

The usage of these files is explained on this page. You can add any file there at wish.

To start using the SD Card/RTC Shield go to the menu settings.

  1. Enable Corsham SDShield emulation
  2. Copy the folder from the KIM-1 Simulator setup distribution archive called SDCARD to your disk.
  3. Choose the Disk images directory pointing to the folder SDCARD. You will see the files on Disk 0 etc filled in, DSK files are for operating systems like CP-M/65. See below.
  4. Put the KIM-1 in TTY mode on the main window and start the emulator. The usual KIM prompt will appear and you are in the KIM-1 monitor.

Now you either start xKIM or CP/M-65.

XKIM on the KIM-1 Simulator

xKIM is developed by Bob Applegate to support his SD-Shield.
By adding SD Card/RTC Shield support to the KIM-1 Simulator by Eduardo Casino we can run xKIM there now!

KIM                                                                                              
0200 00                                                                                          
0201 48                                                                                          
E000 
E000 4C G

Extended KIM Monitor v1.8 by Corsham Technologies, LLC
www.corshamtech.com

>?
Available commands:

  ? ........... Show this help
  C ........... Show clock
  D ........... Disk directory
  E xxxx ...... Edit memory
  H xxxx xxxx . Hex dump memory
  J xxxx ...... Jump to address
  K ........... Go to KIM monitor
  L ........... Load HEX file
  M xxxx xxxx . Memory test
  O xxxx xxxx . Calculate branch offset
  P ........... Ping disk controller
  S xxxx xxxx . Save memory to file
  T ........... Type disk file
  K ........... Go to KIM monitor
  ! ........... Do a cold start


>C
Date: 03/25/2026, 15:16:47

>Disk Directory...
   bootsdshield-kimrom.bin
   bootsdshield.bin
   bootsdshield.pap
   CPM-BOOT.DSK
   kb9.ihex
   KIM-1 simulator start.jpg
   kim-1-sdshield.zip
   kimsimSETTINGS.jpg
   M2000.BIN
   newimage.dsk
   SD.cfg
   SDMP1.jpg
   SDMP2.jpg
   SDMP3.jpg
   SDMP4.jpg
   SDMP5.jpg

>T - Enter filename: SD.CFG
# SD Card Disk Configuration
# Format: drive:filename or driveR:filename (for read-only)
0:CPM-BOOT.DSK
1:newimage.dsk

>S 2000-2199
Enter filename, or Enter to display to console: K2000.BIN
..........................
>Disk Directory...
   bootsdshield-kimrom.bin
   bootsdshield.bin
   bootsdshield.pap
   CPM-BOOT.DSK
   K2000.BIN
   kb9.ihex
   KIM-1 simulator start.jpg
   kim-1-sdshield.zip
   kimsimSETTINGS.jpg
   M2000.BIN
   newimage.dsk
   SD.cfg
   SDMP1.jpg
   SDMP2.jpg
   SDMP3.jpg
   SDMP4.jpg
   SDMP5.jpg

>T - Enter filename: M2000.BIN
:102000001510922D4C000020902860A00CA900997A
:10201000922D8810FA4CD425A9FF8D942DA9008DFE
:102020009E2D60084898488A48AD942D3004A00041
:10203000911A68AA68A8682860A51A49FF2D952DED
:102040008D952DA51B49FF2D962D8D962D18602061
:10205000CD20A90F204325B02BA00CB11A8522A0BA
:102060001FB10E911A8810F920A923A00CB11AC52E
:1020700022F00AA9009002A980A00F911AA522A01F
:102080000C911A186020CD20206428A90F20432528
:102090009037A900A010911AC8C020D0F9A9E5A0D6
:1020A00000911AA901204325B01FA001B11A910E79
:1020B000C8C020D0F7ADB12DA000910E20AF26A949
:1020C0000120D22720A9231860A9FF3860A00EA9FB
:1020D00000911AA000B11A8D942D290FAACA1003DD
:1020E000AEB02DADB12D911A8A4CD42520D320202D
:1020F000A625206428A00EB11A10021860A90F208E
:01210000439B
:00000001FF
>
>L
Enter filename, or Enter to load from console: m2000.bin
.................
Success!

CP/M-65 on the KIM-1 and KIM-1 Simulator


Thanks to the work of David Given (who developed CP/M-65) and Eduardo Casino (who ported CP/M-65 to the KIM-1 with the SD-Shield (developed by Bob Applegate of Corsham Technology) and the addition of the SD-Shield simulation to the KIM-1 Simulator by Eduardo Casino I can run my Pascal-M compiler (written by Mark Rustad in 1977 and ported my Hans Otten to Lazarus and ported by david Given to CP/M-65)) on my PC in the KIM-1 Simulator (developed by me Hans Otten since 2019) compiling itself and showing it can compile ‘hello world’ program.

Pfff, long sentence showing that all this is made possible by many clever people!

Here a log of a session (captured by Teraterm connected to the KIM-1 Simulator).

KIM                                                   
0200 D8                                               
KIM                                                   
0200 D8 G                                             
                                                      
CP/M-65 for the KIM-1                                 
                                                      
A>dir                                                 
A: SCRVT100 COM : IMU      COM                        
A: IMU      TXT : SYS      COM                        
A: PASC     PAS : ASM      TXT                        
A: HELLO    ASM : DEMO     SUB                        
A: ASM      COM : ATTR     COM                        
A: BEDIT    COM : CAPSDRV  COM                        
A: COPY     COM : CPUINFO  COM                        
A: DEVICES  COM : DINFO    COM                        
A: DUMP     COM : LS       COM                        
A: STAT     COM : SUBMIT   COM                        
A: MORE     COM : BEDIT    ASM                        
A: BEDIT    TXT : DUMP     ASM                        
A: LS       ASM : CPM65    INC                        
A: DRIVERS  INC : ATBASIC  COM                        
A: ATBASIC  TXT : OBJDUMP  COM                        
A: MKFS     COM : ADM3ADRV COM                        
A: ADM3ATST COM : CLS      COM                        
A: LIFE     COM : QE       COM                        
A: SCRNTEST COM : VT52DRV  COM                        
A: VT52TEST COM : KBDTEST  COM                        
A: MBROT    COM : DS       COM                        
A: DS       TXT : PINT     COM                        
A: PASC     OBB : PLOAD    COM                        
A: HELLO    PAS : IMU3     TXT                        
A: HELLO    SYM                                       
                                                      
A>pint PASC.OBB PASC.PAS PASC.OBS                     
Pascal-M interpreter for CP/M-65: B66F bytes free     
Pascal-M compiler V2k1 for CP/M-65                    
Processing: writeerr                                  
Processing: beginlin                                  
Processing: endline                                   
Processing: error                                     
Processing: stringsi                                  
Processing: nextchar                                  
Processing: insymbol                                  
Processing: enterid                                   
Processing: searchse                                  
Processing: searchid                                  
Processing: getbound                                  
Processing: hexout                                    
Processing: writeout                                  
Processing: bytegen                                   
Processing: wordgen                                   
Processing: genujpen                                  
Processing: plantwor                                  
Processing: skip                                      
Processing: test1                                     
Processing: test2                                     
Processing: intest                                    
Processing: constant                                  
Processing: comptype                                  
Processing: isstring                                  
Processing: simplety                                  
Processing: fieldlis                                  
Processing: typ                                       
Processing: constdec                                  
Processing: typedecl                                  
Processing: vardecla                                  
Processing: paramete                                  
Processing: procdecl                                  
Processing: ldcigen                                   
Processing: ldagen                                    
Processing: lodgen                                    
Processing: condgen                                   
Processing: loadsetc                                  
Processing: cspgen                                    
Processing: incgen                                    
Processing: load                                      
Processing: store                                     
Processing: loadaddr                                  
Processing: falsejum                                  
Processing: calluser                                  
Processing: selector                                  
Processing: variable                                  
Processing: processt                                  
Processing: readproc                                  
Processing: processt                                  
Processing: writepro                                  
Processing: newstate                                  
Processing: releases                                  
Processing: resetrew                                  
Processing: closepro                                  
Processing: assignpr                                  
Processing: getcomma                                  
Processing: ordfunc                                   
Processing: succfunc                                  
Processing: predfunc                                  
Processing: chrfunc                                   
Processing: oddfunc                                   
Processing: eofeolns                                  
Processing: callnons                                  
Processing: call                                      
Processing: opgen                                     
Processing: setexpre                                  
Processing: factor                                    
Processing: term                                      
Processing: simpleex                                  
Processing: expressi                                  
Processing: assignme                                  
Processing: compound                                  
Processing: ifstatem                                  
Processing: casestat                                  
Processing: repeatst                                  
Processing: whilesta                                  
Processing: forstate                                  
Processing: statemen                                  
Processing: body                                      
Processing: block                                     
Processing: stdnames                                  
Processing: enterstd                                  
Processing: enterstn                                  
Processing: enterund                                  
Processing: initiali                                  
Processing: compileh                                  
Processing: compilep                                  
Processing: skipspac                                  
Processing: getword                                   
Processing: findend                                   
Processing: openfile                                  
Processing: closefil                                  
Processing: dumperro                                  
Processing: cpascalm                                  
Compilation successful.                               
No compilation errors PASC.PAS                        
                                                      
A>pload PASC.OBS PASC.OBB                             
Opening input file...                                 
Opening output file...                                
Reading OBP...                                        
Seen 94 procedures                                    
Writing output file...                                
Closing output file...                                
Success.                                              
A>type HELLO.PAS                                      
program HelloWorld;                                   
                                                      
begin                                                 
    writeln('Hello from Pascal!')                     
end.                                                  
                                                      
A>                                                    
A>pint PASC.OBB HELLO.PAS HELLO.OBS                   
Pascal-M interpreter for CP/M-65: B66F bytes free     
Pascal-M compiler V2k1 for CP/M-65                    
Processing: hellowor                                  
Compilation successful.                               
No compilation errors HELLO.PAS                       
                                                      
B>A:pload A:HELLO.OBS HELLO.OBB                       
Opening input file...                                 
Opening output file...                                
Reading OBP...                                        
Seen 1 procedures                                     
Writing output file...                                
Closing output file...                                
Success.                                              
B>A:pint HELLO.OBB                                    
Pascal-M interpreter for CP/M-65: B66F bytes free     
Hello from Pascal!                                    
                                                      
B>