> There weren't really any new concepts to grasp, it was just extremely fiddly<p>> The need to keep things simple tempered any urge I might've had to generalise prematurely with needless abstraction<p>Probably the defining characteristics of assembly. Not only does it not provide abstractions, it doesn't provide any metaprogramming tools (other than simple text macros) to help you build any either.<p>For a long time I've had in my ideas folder the phrase "typesafe macro assembler?" The idea would be to build the language people sometimes think C is but isn't: it would provide some sort of record type (struct), register allocation, checking to see if you've assigned one thing to a storage location of a different type, and little else. Possibly a means to define a calling convention for caller-saved vs callee-saved registers; possibly some basic structured programming block tools to de-sphagetti your code. Crucially, it would emit exactly the operations you specify (including weirder mnemonic instructions and highly platform specific ones) in the order you specify them.
I did roughly the same thing many moons ago as the final "exam" for my undergraduate embedded systems course. We made Space Invaders, though :^) <a href="https://github.com/tuckerpo/MicroSpaceInvaders">https://github.com/tuckerpo/MicroSpaceInvaders</a><p>We targetted a real SoC, though, so a lot of my implementation can be thought of as a "board support package" or HAL, twiddling LEDs, taking in input, TTY in/out, i2c, timers, IRQ/FIQ handlers, etc...<p>Assembly programming in general is more or less just getting a feel for any given ISA's most important instructions, mnemonics ordering and data/code separation. The rest is a walk in the park if you're comfortable with boring old procedural programming.
Thanks for sharing your experience learning assembly. I'm curious about the resources you used in your learning journey. Could you share some of the books name, tutorials, or other materials you found particularly helpful?
non-JS URL: <a href="https://content.deadbeef.io/pages/a_cpp_developer_learns_assembly.html" rel="nofollow">https://content.deadbeef.io/pages/a_cpp_developer_learns_ass...</a><p>Sadly it doesn't work on my system: the display is drawn at the start (sometimes partially), and then only ever updates when switching between virtual consoles.<p>Tried adding O_SYNC to the open flags for the framebuffer, and it didn't help. It's writing to the device 60 times per second, just won't show for some reason.