4 ms·
Some FORTH systems even have a "metacompiler" that lets one FORTH system compile another FORTH system for the same or different CPU, word size, byte order, thre
by DonHopkins 6y ago
Some FORTH systems even have a "metacompiler" that lets one FORTH system compile another FORTH system for the same or different CPU, word size, byte order, threading technique, with or without a built-in compiler, etc, from the same source code!
OpenFirmware (the FORTH burnt into boot roms of SPARC, PowerPC, OLPC, and other systems) is a great highly refined example that supports many different architectures:
openfirmware/forth/kernel/metacompile.fth
https://github.com/openbios/openfirmware/blob/d5cc657ce81c0f7d1857b4687766b64d75a4145d/forth/kernel/metacompile.fth https://github.com/openbios/openfirmware/blob/d5cc657ce81c0f...
openfirmware/forth/kernel/meta1.fth
https://github.com/openbios/openfirmware/blob/d5cc657ce81c0f7d1857b4687766b64d75a4145d/forth/kernel/meta1.fth https://github.com/openbios/openfirmware/blob/d5cc657ce81c0f...