Close

Making Progress

A project log for Fungesector

A Befunge-93 interpreter which runs on x86 real mode

louis-paulLouis Paul 10/08/2024 at 01:450 Comments

During this week when the RetroChallenge has started, I added more functionality to the Befunge-93 interpreter. The editor page now accepts input to enter simple code and to execute it press F5 key, I implemented the basic commands to print the string enclosed in double quotes, and the commands to change the program counter flow.

As I said, I'm developing the interpreter using 8086 assembly, I'm not using C language or another high-level language. The reasons are:

The 8086 assembly isn't that hard, considering that's a CISC processor, which means the processor has single instructions that can execute various operations.

Even that the Befunge-93 is limited to 80x25 cells and has only one stack, it's powerful enough to write interesting programs, like Hunt the Wumpus or Game of Life. Remember the mantra Fetch-Decode-Execute for parsing the individual commands.

The fun I'm having on building the interpreter is the concept of 8086 assembly and real mode on one side and an esolang on the other side. I'm learning more about the memory segmentation, the various BIOS interrupts of video and keyboard and the commands of Befunge-93.

Here is a video where I enter the example code and press F5 key to execute it:

Discussions