In a pleasant past, Aart Bik learned programming on the Casio FX-700P programmable calculator. This calculator is powered by a 455KHz HD61913 processor and features 2KB RAM, with exactly 1568 bytes available for BASIC programs. Output can be printed with the Casio FP-12 mini thermal printer and programs and data can be saved and loaded using the Casio FA-3 cassette interface.
After more than 25 years, all these devices are still functional. In fact, the FX-700P still serves as Aart's desktop calculator. As can be seen on the picture, the built-in battery of the FP-12 was exhausted after so many years and had to be replaced by an improvised external battery holder. But after that, it still produces those cute little thermal print-outs! The FA-3 also still functions, although unfortunately Aart could not read back his programs from times gone by. Time had taken its toll on those old cassettes. Writing and reading new cassettes works fine though.
The BASIC programming language of the FX-700P only supports one-dimensional arrays. Array elements are aliased onto 26 scalar variables and other array elements in the following manner (DEFM 1 and up extends the memory for variables at the expense of memory for BASIC programs; up to 222 variables, not counting the special $ variable). This aliasing allows for interesting programs where array elements with a constant index are accessed through a scalar variable.
DEFM 0 : A = A(0) B = A(1) = B(0) C = A(2) = B(1) = C(0) . . X = A(23) = B(22) = C(21) . . = X(0) Y = A(24) = B(23) = C(22) . . = X(1) = Y(0) Z = A(25) = B(24) = C(23) . . = X(2) = Y(1) = Z(0) ------------------------------------------------------------- DEFM 1 : A(26) = B(25) = C(24) . . = X(3) = Y(2) = Z(1) . . DEFM 196: A(221) = B(220) = C(119) . . = X(194) = Y(195) = Z(196)
Afer the Casio FX-700P. Aart's interest in computer science grew further while programming BASIC and 6510 machine code on the Commodore 64, a present from his dear grandfather and parents. This old home computer is still occasionally used.
If you do not own a Commodore 64 anymore, you can still relive the good old times with an emulator, such as CCS64 (Per Håkan Sundell), C64S (Miha Peternel), MP64 (in active development by Michael Plet), or VICE (the VICE team). Resources related to the Commodore 64 or the 65xx microprocessor family can be found at 0xc64, 6502, Arnold C64, CBM 8-bit, Cocos, C64.com, C64.org, C64 Music Blog, C64 Bach music, Lemon64, Soft6502, or Quantum Link.
Aart wrote a MOS Technology 6510 cross-assembler (and disassembler), which converts an assembler source file into a target file that can be executed by an emulator or, with some effort, uploaded to a real Commodore 64 or other 65xx-based microcomputer. The assembler supports all "documented" and "undocumented" opcodes of the 65xx microprocessor family, as well as many useful directives and common file formats (C64S or T64, H6X, raw bytes, paper tape format). The following downloads contain the license, the documentation, sample source files, and Windows binary win2c64, Linux binary lin2c64 or MacOS binary mac2c64 for version 2.0.4 of the assembler:
A source file with Peter Jennings' famous Microchess, originally written for the KIM1, appears below. The program was extended by Daryl Rictor to support text-based board display and subsequently modified by Aart Bik to work with win2c64 on the Commodore 64 (the authors have given explicit permission to post the modified source).
Aart also occassionally enjoys programming 6502 on the Micro-KIM, which is a modern replica of the seventies KIM1 microcomputer made available by Briel Computers. The original KIM1 featured a 6502 microprocessor, 1K of static RAM, two 6530 RRIOT IC's, a keypad, and a 6 character 7 segment LED diplay. The Micro-KIM is a suprisingly accurate clone, but features a single 6532 RIOT, 2K EPROM for the monitor program, 5K RAM, and an onboard RS232 serial port, DC input, and expansion bus. Aart's cross-assembler described above is also useful to develop programs for the Micro-KIM, since it supports the paper tape format that can be directly uploaded and executed on this microcomputer.
Aart is writing a series of tutorials on how to operate and program the Micro-KIM. The tutorials cover many topics ranging from using a cross-assembler to generate programs in paper tape format, uploading and running these on the kit, exploring routines in the monitor program, taking full control of the LED display with custom made characters and even adjusting the brightness, reading the keypad, communicating over the RS232 serial port, and programming interrupt service routines. The series is being published in the Briel Computers Support Forum and on Aart's Blog.Download the source code of the examples in the tutorials (slow but ongoing!):