Close

My first MC6800 program - Towers of Hanoi on the Heathkit!

A project log for PicoRAM Ultimate Rev. 2

SRAM Emulator and SD Card Interface for Vintage Single Board Computers (such as the Heathkit ET-3400, Lab-Volt 6502, and Microprofessor)

michael-wesselMichael Wessel 06/28/2025 at 13:380 Comments

Well, that was a bit of work to get that running... getting to know the side effects of the built-in firmware / monitor routines for driving the keyboard and display are always a bit of work! I almost went insane yesterday when sequences of `PSHA`, `PSHB` and ` PULB` and `PULA` op-codes consistently "transmuted" into `PSHA`, `PSHA` and `PULB`, `PULB`, and only when actually *running* the code... turns out there was still something slightly off with PicoRAM's timing, that oddly only showed up when accessing the stack. At first I suspected that there was something wrong with the assembler, ASM80.org, or that push/pull are only supported for the `A` accumulator, and that the MC6800 "would correct" these op-code "on the flx". I then replaced PicoRAM with the original 2112 SRAMs, and saw that the problem went away too - ops! After 2 hours of PicoRAM debugging I found that I needed to remove a few `NOP`s... and, problem fxed! There is a new firmware version, 1.3: https://github.com/lambdamikel/picoram-ultimate/blob/main/firmware/v1.3/picoram_ultimate.uf2 

Anyhow, after I understood how indexed addressing from the stack using `TSX` and `LDAA <offset>, X` works, I got it running - my first MC6800 assembly program. Thanks again to ASM80.org for hosting a very useful tool online. Here is the code, which might be instructive for anyhow trying to learn how utilize the ET-3400's built-in monitor / firmware ROM routines for their own programs:

https://github.com/lambdamikel/picoram-ultimate/blob/main/software/et-3400/HANOI.A68

I also uploaded the programs to the ET-3400 Google IO group here: 
https://groups.io/g/ET-3400/files/9.%20Sample%20Programs/Towers%20of%20Hanoi%20Assembly%20and%20Hex

And, a video too - enjoy! 

Discussions