pjc50
a year ago
> There weren't really any new concepts to grasp, it was just extremely fiddly
> The need to keep things simple tempered any urge I might've had to generalise prematurely with needless abstraction
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.
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.
pjmlp
a year ago
This actually has already been done in OS research.
https://en.m.wikipedia.org/wiki/Verve_(operating_system)
https://en.m.wikipedia.org/wiki/Typed_assembly_language
Which eventually grew to stuff like this,