In fact, by just adding first class function, retro forth makes the code way easier to read.
In fact, by just adding first class function, retro forth makes the code way easier to read.
Not much of a stretch with C, really - there's a reason its used to write operating systems ;) (the standard library is mostly about OS interaction which is irrelevant in the bare metal/no OS context)
On some systems, C requires a minimal library for compiler-emitted intrinsics (e.g., for 16/32-bit multiplies on 8-bit systems, for floating point, etc).
Just about every PC before the IBM PC came with a BASIC interpreter with a built-in editor and some kind of storage interface, running on the bare metal. So did every IBM PC up to at least the PS/2. CP/M did provide a BIOS and BDOS, but they really were very basic, providing little more than a convention for talking to the terminal and avoiding overwriting disk sectors some other program was using. MS-DOS didn't do much more, especially in the early years. So, I'd say that every programming language implementation from that time qualifies, including Microsoft BASIC-80 (originally Altair BASIC), VisiCalc, Turbo Pascal up to version 3.0, Apple Integer BASIC and AppleSoft BASIC, the 6809 BASIC Microsoft developed for the TRS-80 Color Computer, ZX-81 Sinclair BASIC, BDS C with the RED editor, and so on; not to mention the first FORTRAN compiler (and up through at least FORTRAN III), LISP 1.0, COBOL, and assemblers for pretty much every machine. Also, and perhaps most notably of all, Smalltalk on the Alto, Mesa and Cedar on the Alto, and Oberon on Lilith and its successors (including a version for the IBM PC).
So, Forth is far from unique in being a bare-metal IDE without requiring an OS. It's just unusual in still surviving in that form.
Luckily for my already very limited spare time, so far I've managed to resist this urge.
C is a terrible language for Operating Systems.
No modules, weak-typing, and full of gotchas and pitfalls — plus, it's answers like this that ignore the history of OSes: the Burroughs was written in Algol, Multics was written in PL/I, and VMS in BLISS (plus other languages, thanks to the design/architecture of the CLE).
Here is the retro forth version of adding vector that I was talking about.
Tri@ apply function (2+x)on top 3 items. So get address of the 3rd element of c b a ..