3 ms·
A lot of lisps end up writing their own assemblers, the lisp model of 80/20ing your own compiler with every compiler step being a different set of s-expressions
by monocasa 3y ago
A lot of lisps end up writing their own assemblers, the lisp model of 80/20ing your own compiler with every compiler step being a different set of s-expressions as sorts of intermediate representations works best holistically. On the old lisp machines even the microcode source would be specific s-expressions that as a final pass would be converted into the actual bit pattern needed by the machine.
This paradigm is well seen in the GOAL (Game Oriented Assembly Lisp) code for Jak & Daxter that could mix relatively standard lisp, MIPS asm, and PS2 custom vector asm all within the same function: https://web.archive.org/web/20070127022728/http://lists.midnightryder.com/pipermail/sweng-gamedev-midnightryder.com/2005-August/003804.html https://web.archive.org/web/20070127022728/http://lists.midn...
- senkora 3y agoAlso seen in the nanopass compiler framework: http://nanopass.org/ http://nanopass.org/
- rprospero 3y agoThank you for the explanation about the microcode. Many years ago, someone was explaining to me that Lisp machines were Lisp “all the way down”. There were no layers that you couldn’t reprogram with Lisp. When pressed for details, he claimed that even the band gap potential in the transistors of the machine could be reprogrammed, because the transistors were just an abstraction over more Lisp. Your explanation makes far more sense.
- lispm 3y agoIn the early days the CPUs had loadable microcode. With new operating system versions came language extensions for Lisp. Then one also got a new version of the microcode, which then had been extended for, say, inclusion of an instruction for OOP method dispatch. One also could compile some code to microcode. Later the CPUs were actually Microprocessors (from TI and Symbolics). At least for the Symbolics Ivory microprocessor, the microcode no longer was loadable.
- r9550684 3y agodon't forget that besides microcode much of the lisp machine logic was implemented with PALs, which were themselves programmed in Lisp. the simple gates, mixers and flip-flops were describe with lisp code, so that the logic could be tested on the lisp machine. I don't know if they built the test tables using the lisp code, or wrote them out manually, but you essentially had multiple sources of truth that could be mutually verified: lisp code, test tables, and the behavior of the specific PAL.
- pjmlp 3y agoIronically we are back to loaded microcode and memory tagging. The turns the world does instead of adopting good ideas from the get go.
- msk-lywenn 3y agoWhat kind of memory tagging are you referring to? I can think of W^X, but I don't see how well it compares to lisp stuff.