Jan 23, 2021
It took a while, but I've finally ported a pre-existing Mu program to baremetal (not atop Linux): an RPN calculator.

Screenshot showing an RPN calculator written in Mu being built into a bootable disk image, and a session of the calculator inside Qemu. The session includes a half-written command and a cursor working as expected.

This was hard, purely because of cursor management. I have a greater appreciation for everything that display hardware and terminal emulators provide for text mode. Mu so far puts the onus on the programmer.

http://akkartik.github.io/mu/html/baremetal/rpn.mu.html

In the end it's interesting to visualize the changes I had to make:

vim -d apps/rpn.mu baremetal/rpn.mu

Screenshot showing a diff between the old apps/rpn.mu and the new baremetal/rpn.mu. All the changes are in `main`. The rest of the program is folded away at the bottom because it's identical.

They're entirely in main; the rest is unchanged.

This post is part of my Freewheeling Apps Devlog.

Comments gratefully appreciated. Please send them to me by any method of your choice and I'll include them here.

archive
projects
writings
videos
subscribe
Mastodon
RSS (?)
twtxt (?)
Station (?)