Simply how compact are you able to make an implementation of a programming language, and nonetheless have a reputable programming language? Impressed by tasks equivalent to milliForth, Philippe Brochard was decided to seek out out. The results of Brochard’s explorations is one thing known as 10biForthOS, and it’s most undoubtedly small at simply 46 bytes. However precisely what that “one thing” is shouldn’t be totally clear.
Brochard calls it a two-instruction implementation of Forth and a full 8086 working system. After the machine boots the tiny code, all interplay with 10biForthOS is dealt with by way of a serial connection. The 2 accessible directions are “compile” and “execute”. A compile instruction is adopted by a byte representing an 8086 opcode, which is saved at a hard and fast reminiscence location. In any case directions have been entered, an execute command does precisely what it seems like — it executes the directions.
The total 10biForthOS implementation (📷: Philippe Brochard)
It’s debatable whether or not or not 10biForthOS actually qualifies as an implementation of Forth. In any case, Forth is a stack-oriented language, and 10biForthOS doesn’t implement a stack. You’ll not discover a dictionary or defining phrases, both. As such, it could possibly be seen as a really fundamental meeting language IDE. However Brochard argues that the inside and outer interpreters, which interpret machine code and meeting code, respectively, are intact, and that is sufficient to depend it as Forth.
You may additionally discover the declare that it’s an working system a little bit laborious to swallow. But it surely does present I/O capabilities, filesystem entry, and the flexibility to program the machine. So perhaps it truly is the world’s smallest working system for an 8086?
No matter it might be, the truth that it could possibly boot up an 8086 and supply something in any respect resembling a programming language or working system in solely 46 bytes may be very spectacular. Now the one query that is still is: Who can do it in 45?