Pretty big update this week thanks to the long weekend. I was inspired by @Kartik Agaram single page Mu language description and by how it was a language designed to fit the hardware. I knew I had to do the same and hadn't achieved that yet, so I reworked uCISC syntax from the ground up to be what it should be given the hardware and wrote a compiler for it. From there, I went full emulator, trying and succeeding to get really close parity with the virtual version with the hardware. Faster iterations, better debugging without losing predictable hardware execution. To put the new language through it's paces, I started writing a game you can play over UART. It's about 800 lines of code written from the ground up, text routines, I/O, everything and translates to about that many instructions. Approaching 2k words after you add in text literals. I demo it at the end:
https://youtu.be/ZeUq9h4zSj8▾
🤯 4
❤️ 1
👍 2
k
Kartik Agaram
11/30/2020, 2:59 AM
This is amazing!!
What do you rely on the IDE for? I notice some Kotlin code in other tabs?
r
Robert Butler
11/30/2020, 3:54 AM
I use the IDE to write the Kotlin code for the emulator. I'm trying to see if the IDE can change my mind about just using vim + CLI. As I ramp up my mainly ucisc code writing rather than Kotlin, I suspect I'll find it less useful.
👍 1
j
Jack Rusher
11/30/2020, 4:27 PM
Nice work! One thing thing I've enjoyed doing in this situation, after writing an emulator, is to provide interactive tooling through a side-channal to the emulator, thus enabling things like livecoding, rewind/replay debugging, and so on. For me, this drastically improves the experience of coding for embedded systems.
k
Kartik Agaram
11/30/2020, 5:38 PM
Just to make sure I'm understanding: you were developing on an emulator for a while, but the above video was interfacing with real hardware?!
r
Robert Butler
11/30/2020, 9:17 PM
That is correct. The main thing I wanted with the emulation was real parity with the hardware, so build and debug in the emulator with great confidence it will work just the same on the hardware, timing quirks and all. In the video, that was running on 100% real hardware but I did all the dev work on the emulator.
k
Kartik Agaram
11/30/2020, 9:21 PM
Yes, that is super valuable. I still remember the couple of weeks of hell it took me to realize x86 has different register encodings for some instructions.
r
Robert Butler
11/30/2020, 9:24 PM
@Jack Rusher I think you blew my mind with the thought of live coding assembly.