Close

Showing the Initial Result

A project log for Fungesector

A Befunge-93 interpreter which runs on x86 real mode

louis-paulLouis Paul 09/17/2024 at 01:330 Comments

In this project log I'll show the initial result of developing for the real mode. The binary I have generated loads the sectors from the pendrive and prints "Hello Sector" with borders on the center of the screen from the second stage. I created a folder and organized the files with source codes for the first stage, the second stage, the subroutines and the helpers with the constants and macros.

Basically when the computer is booted, the BIOS loads 512 bytes on the physical address 0x07c00 (using the calculation of segment << 4 + offset), this 512 bytes is typically called the first stage. If you want more bytes, you have to load additional sectors using the Diskette BIOS Services (in this case, int 0x13), and after loading the sectors jump to the second stage.

I have created code which includes the files of first stage and second stage, sets the magic bytes to make the binary bootable, and has a option to generate a floppy image or binary file.

Now I'll show the result on the 86Box, with the configuration of machine type [1988 i386SX] and machine [ALi M1217] Chaintech 325AX (MR BIOS):

And running the binary on real hardware in the pendrive (I had to take a photo using a camera):

PS: This project log was supposed to be posted on the Sunday, but I had problems which prevented to post it on the Sunday. I realized the biggest challenge of the project isn't the project itself, but to keep thinking about the next project log and write the details. And also I had problems on uploading the images, I solved this by getting the direct image URL location using the Developer Tools of Mozilla Firefox.

Discussions