Focal runs on KIM-1 Simulator

KIM-1 Simulator version 1.1.6 has been published. Get it here.

It now supports Focal-V3D 12-AUG-77 (the Aresco version) from the KIM-1 Software page, see here.

Updates to the Simulator are a working echo suppression (see here for background). Available to any program.

For Focal V3D a setting has to be made in the Settings, to allow Focal to do its magic in the input routine.

By working on Focal I did add comments to the disassembly of what I found. You will find the original by Paul R. Santa-Marie and my partly commented version in the archive.

macOS compiled version of KIM-1 Simulator

Thanks to user hobo of https://groups.google.com/g/pal6502 a macOS compiled app is now included.

post

Tiny Basic

Tiny Basic

Tom Pitman’s Tiny basic. Small enough to fit in the 1K KIM-1, yet a real Basic interpreter

Tiny Basic binaries,
low memory version is tiny3, load address 0000 start address 0200
high memory version is tiny 1 load address 0000 + tiny3 load address 2000, start address 2000
Tiny Basic manual as pdf
Tiny Basic manual as html
Tiny Basic manual as text file
Tiny Basic Experimenters kit as pdf
Tiny Basic Experimenters kit as html
Tiny Basic Experimenters kit as text
Getting the most of Tiny Basic.pdf
Articles on tiny Basic from 6502 User notes
Source of Tiny Basic, monitor, and Tiny Basic Bill O’Neill
Tiny Basic for CC65 assembler sources
Tiny Basic games, such as adventure
Games for Tiny basic from Dr Dobbss Vol 1 Page 1, Page 2
Articles from the dutch KIM user Club:
KIM Kenner 10 Tiny Basic, tips how to save and load and change prompt, Hans Otten.
KIM Kenner 23 Tiny Basic, Filip van Kenhove, adapt to Elektor Junior

1977 01 Tiny Basic a mini language for your micro
kilobaud 1977 12 Tiny Basic
1978 06 Tiny BASIC shortcuts
1978 10 Not so Tiny (Basic)
Tinkering with Tiny Basic
post

KIM-1 programs by Nils

Nils a.k.a. netzherpes typed in a number of KIM-1 programs to run on his PAL-1, the KIM-1 compatible clone.
Not only does he types them in in assembler, some even by contacting the original author!, tests the programs and also provides source and ready to run binaries or papertapes.
And he draws nice looking cover images!

On his github page he has the most recent versions and adds new programs regularly.
Also checkout his blog!

Here a summary of the programs:

Banner for KIM-1

KIM-1 Banner
by Jim Zuber
from KIM USER NOTES #18

Download here!

Battleship

You have 20 shots to detect a 3×1 ship on a 8×8 grid. The ship can be aligned horizontal, vertical or diagonal.
How to play: Enter the coordinated and fire (Button F). If you hit the ship, the mostright counter will jump to 01.
If you hit all 3 coordinates of the ship, you won, the display will show “dEAd” and the number of shots used.
(c) 1978 Roland Kushnier (orig)
(c) 1979 Jody Nelis (bugfix)

Download here!

Target 1 for KIM-1

Little shooting game for the KIM-1
June 18th, 1979
(C) Fer Weber

Download here!

Target 6 for KIM-1

The 6 column Version of Fer Webers Target1 Shooter Game (https://github.com/netzherpes/Target1-for-KIM-1)
Author Fer Weber
published in KIM Kenner 8 on 18.06.1979

Download here!

Telefonbuch for KIM-1

original title: “Datensuche”
by Herwig Feichtinger
(c) 1981 in Anwendungsbeispiele für den Mikroprozessor 6502

Download here!

Phonebook 2.0 for KIM-1

original title: “Datensuche”
by Herwig Feichtinger
(c) 1981 in Anwendungsbeispiele
für den Mikroprozessor 6502

Download here!

Pocket Calculator for KIM-1

by Siep de Vries, KIM Club The Netherlands
INPUT/OUTPUT IS EITHER TELETYPE
OR KIM KEYBOARD AND DISPLAY

Download here!

Tunesmith for the KIM-1

(c) 1979 Anthony T. Scarpelli
found in micro 6/79

Download here!

KIM-Piano

a silly small Piano for your KIM-1
KIM Piano
(c) by Peter Engels 1979 *

plays whole notes from C to D
by pressing the buttons 0-F.
Download here!

LEDIP a text editor for the KIM-1

The author of the program, Kiumi Akingbehin, Professor at the Michigan University

Download here!

KIM-1 Dungeons and Dragons Dice Simulator

(c) 29.7.80 Myron A. Calhoun
Manhattan, KS

Download here!

TTY rapid Dump/Load

an extension to M.Gönners hex Loader by Bruce Nazarian

Located in Compute II June 1980
Download here!

Baseball-for-KIM-1

‘Bob’ Leedom published another game called Baseball in the KIM user notes issue 16

Download here!

MatchThis-for-KIM-1

by Gino F. Silvestri
A Simon says game for the KIM-1

Download here!

KIM Venture walktrough

This is a walkthrough of one of the most amazing computer games in history.
KIMventure is a (colossal cave like) adventure game for the KIM-1 that fits in only 1 (ONE) KB of RAM. It offers 24 room to explore with a lot of traps and riddles to solve. It was programmed in 1979 by Robert Leedom with pen and paper (no assembler etc.)

Download here!

Hexpawn – another KIM-1 game from 1978


Download here!

KIM-1 Simulator breakpoints and watches

The KIM-1 Simulator is updated to version 0.10.1.

Changes in this version are an extension to the “Run to” execution

    • up to 10 breakpoints are now possible instead of one
    • up to 10 watch points addresses. When the CPU accesses the watch point execution stops
    • Save file to memroy bug fixed (thank Nils!)

Watch and breakpoints can be enabled or disabled at will, even while the program is running.

Telefonbuch

Found in Hobbycomputer #1 (c) 1980 Herwig Feichtinger (of EMUF fame!) improved by Nils Andreas, a phonebook
In fact, it is a searchable text database. Full article here

The program is written, probably by hand, Herwig Feichtinger in the German magazine Hobbycomputer, Issue 1.

On the github page of Nils you can find source and executables.

Hobby Computer magazine

A German magazine, from Franzis Verlag. Sonderheft der ELO Funkschau Elektronik

Full magazines at archive.org. Here you will find the articles of interest about KIM-1 and 6502.


Hobbycomputer 1

KIM-1 articles llike Telefonbuch. See also the page on Telefonbuch restauration.

 

 

 

 

 

 

Hobbycomputer 2

KIM-1 and more general 6502 articles.

 

 

 

 

 

 

Telefonbuch

Found in Hobbycomputer #1 (c) 1980 Herwig Feichtinger (of EMUF fame!) improved by Nils Andreas, a phonebook

On the github page of Nils you can find source and executables.

In fact, it is a searchable text database.

The program is written, probably by hand, Herwig Feichtinger in the German magazine Hobbycomputer, Issue 1. Available on archive.org.

I took the source as typed in by Nils, added the comments from the (see below) listing in the article and made sure it was binary compatible with the listing. There are some problems with the first entry in the database.

Source, listing, article, binary, papertape of original version of Telefonbuch

; Target assembler: TASM 
;*****************************
;* Telefonbuch               *
;* (c) 1979                  *
;* Herwig Feichtinger        *
;*****************************
; typed in and checked by Nils Andreas
; comments entered from German listing into source
; checked for being binary compatible with original listing in HobbyComputer 1 1979
;
; Note that getch in KIM-1 returns with Y = $FF, used in this program to save two bytes?
; Testcase for the KIM-1 Simulator, which now emulates this getch behaviour
;
; Hans Otten, 15 december 2021
; 
CR     =       $0d             ; carriage return
esc     =       $1b             ; escape

crlf    =       $1e2f           ; KIM-1 print cr 
getch   =       $1e5a           ; KIM-1 read char for tty
space   =       $1e9e           ; KIM-1 print space tty
outch   =       $1ea0           ; KIM-1 print car on tty
incpt   =       $1f63           ; increment pointer
;
; zeropage
;
savy    = $f9
tablep  = $fa                   ; pointer into table 
bufferp = $df                   ; buffer
table   = $0200                 ; table starts here
;
         .org    $0000
;
start:   lda     #(table & $ff) ; low byte table address
         sta     tablep
         lda     #(table >> 8)  ; high byte table address 
         sta     tablep + 1     ; 
         ldx     #$17           ; 17 bytes clear
         lda     #$00
buffer:  sta     bufferp,x      ; clear buffer
         dex
         bne     buffer
;         
read:    jsr     getch          ; get ascii character
         cmp     #esc           ; escape? 
         bne     chkend         ; no
         iny                    ; yes, y = 0
chkfre:  jsr     incpt          ; increment table pointer 
         lda     (tablep),y     ; query buffer
         bne     chkfre         ; free space in buffer?
input:   jsr     getch          ; get ascii character
         iny                    ; y=0
         cmp     #esc           ; escape?
         beq     start          ; yes, back to begin
         sta     (tablep),y     ; no, store in table
         jsr     incpt          ; increment table pointer
         jmp     input          ; and again

chkend:  cmp     #CR            ; return?
         beq     zzz            ; yes, line ready
         sta     bufferp +1,x   ; no, store char in buffer
         inx                    ; increment buffer index
         cpx     #$15           ; is $15?
         bne     read           ; next character
;
zzz:     nop                    
         nop
;
newline: jsr     incpt          ; table after return
         ldy     #$00           ; search for character
         lda     (tablep),y     ; in table           
         beq     printquest     ; 
         cmp     #CR            ; found?
         bne     newline        ; no, search again
found:   ldx     #$00           ; yes, compare character in table
compbuf: iny                    ; with character in buffer
         lda     bufferp +1,x   ; no, compare table and buffer
         beq     printline      ; show it
         lda     (tablep),y
         cmp     #CR            ; return?
         beq     zzz
         cmp     bufferp +1,x   ; next character
         bne     found
         inx
         bne     compbuf
;         
         nop
         nop
;
printline:
         jsr     crlf           ; new line
         ldy     #$01
loadchar:
         lda     (tablep),y     ; load character from table
         beq     printquest     ; zero is ready
         cmp     #CR            ; return?
         beq     zzz            ; end of table entry
         sty     savy           ; save Y
         jsr     outch          ; and print character
         ldy     savy
         iny                    ; increment Y, next
         bne     loadchar       ; load new character
printquest:
         jsr     crlf           ; print return
         lda     #'?'           ; print ?
         jsr     outch          ; 
         jsr     space          ; print space
         jmp     start          ; return
;
        .end

Here the pages where the program is described and the listing shown.

Update to the KIM-1 Simulator

Nils, a very enthousiast PAL-1 user discovered in an old German magazine, 1979, HobbyComputer 1, a small phonebook program for the KIM-1.
It is a command line utility, extremely small and quite clever. See the post about it here.

So he entered the code in assembler and did some tests on his PAL-1 (it worked) and in the KIM-1 Simulator, which was not working.
He found the ‘database’ corrupted.

Of course I had to look at it and see what was going on. It had to be something about using zeropage pointers into the database.
And it was. In the source an instruction appeared:

INY  ; Y = 0

followed by an indirect addressing, Y into the database and preceded by a call to getch, reading a character from the keyboard.
Y was not used in the program before, so in the Simulator it was uncertain what the value was.

GETCH is known to destroy the Y register, delivering the character in register A. How is unspecified.
In the KIM-1 Simulator the KIM-1 GETCH is patched to the ACIA routines of the emulated 6850 serial interface.
Those routines do not use Y, so it is left untouched.

So time to study the KIM-1 routines. In the delay a bit routine the Y register is filled with the final state of a counter, TIMH.
It looks like the decrement ends with the value $FF, when the BPL becomes false, the whole purpose of the use of Y seems to determine that end of the loop?

 1ED4  AD F3 17  DELAY   LDA   CNTH30                           
 1ED7  8D F4 17          STA   TIMH
 1EDA  AD F2 17          LDA   CNTL30
 1EDD  38        DE2     SEC   
 1EDE  E9 01     DE4     SBC   #$01 
 1EE0  B0 03             BCS   DE3  
 1EE2  CE F4 17          DEC   TIMH
 1EE5  AC F4 17  DE3     LDY   TIMH
 1EE8  10 F3             BPL   DE2
 1EEA  60                RTS

Anyway, the KIM-1 Simulator 0.9.4. GETCH routine now returns with Y=$FF and the phonebook program seems to work.

Microsoft Basic for the KIM-1 KB-6

I know KB6 existed. The ‘6’ stands for the precision in digits of the floating point number. In the documentation KB-6 is described.
Never seen a version in the wild. I know KB6 existed. The ‘6’ stands for the precision in digits of the floating point number. In the documentation KB-6 is described. Never seen a version in the wild. So the reconstruction here is not checked with the original, addresses in the reconstruction from the linker differ from the documentation.”>So the reconstruction here is not checked with the original, addresses in the reconstruction from the linker differ from the documentation.