August 22, 2025

Sun 3 bootrom souce - the Sun 3/80 - a first bare metal demo

Can we call this bare metal, when it uses routines in the ROM to output characters. At least it works, and it is a first step. The first step was just to output 'X' in an endless loop. This works when I call the "mayput" ROM entry point. Calling the "putchar" vector just kicked me back to the ROM prompt!

If I can output a single character, it is a short step to having my printf working.

I can type a "break" character and get back to the ROM prompt!

Now I try to use printf and weird things happen. I see this:

XTiTiTiTiTiTiTiTiTiTiTiTiTi
I should see 10 X characters, then I should be printing "Tick 13" in an endless loop.
At least it is not kicking me right back into the ROM, but it only prints the first one two characters, then drops characters (I never knew this when printing endless 'X' was the game.). Maybe I need to check the return status from mayput?

Indeed I do. It returns 0 on success and -1 if it could not send the character. Now I get the output I expect:

  Starting test
Tick 0
Tick 1
Tick 2
...

Feedback? Questions? Drop me a line!

Tom's Computer Info / tom@mmto.org