bitbornSOURCE-BACKED EXPERIMENTS

EXAMPLES / ONE MECHANISM AT A TIME

Small programs.
Visible mechanisms.

Twenty-one experiments with actual literal sources, byte tables, and reproducible checks. Choose the execution environment first, then follow what each byte does.

01 / THE LINUX SYSCALL INTERFACE

A process, a register,
an observable result.

These ELF files need Linux x86-64. Python adds a non-executable ELF container around the unchanged handwritten payload. Payload sizes below exclude that header. Expected nonzero exit statuses are part of the demonstrations.

02 / BEFORE AN OPERATING SYSTEM

Firmware, memory,
and a first sector.

Use legacy-BIOS x86 system emulation in QEMU. Smaller payloads are packaged into sectors; disk-read and monitor images also include a separately handwritten loader and padded second stage. They are not UEFI programs.

12 / BIOS → 32-BIT PROTECTED MODE568-BYTE PAYLOAD

Cross into protected mode

A separately loaded literal stage installs a GDT, enables 32-bit code, writes and reads actual RAM, and dispatches a software interrupt through an IDT gate. IRETD returns before the success halt. This runs in QEMU, beyond the browser's 16-bit model.

13 / X86 BIOS / FIVE-SECTOR DISK813-BYTE PAYLOAD

A shell that loads another program

Nine commands expose bounded keyboard editing, actual RAM reads and writes, a register snapshot, and BIOS disk loading. The five-sector image combines the loader, shell and separately authored returning app. Its behavior has actual QEMU checks.

14 / REAL-MODE DISK APP / NEEDS SHELL150-BYTE PAYLOAD

Load, compute 42, and return

The shell loads this payload at physical 0x9000. It computes 7 × 6, stores the resulting byte 2A at 0x0601, prints that result and returns to the shell. This .bin is not independently bootable; use the shell image and its run command.

03 / DATA BECOMES AN INSTRUCTION

One writer bit.
A different live operand.

15 / X86 BIOS82-BYTE PAYLOAD

Rewrite a future instruction

Initialize the stack before the BIOS call, store 61 over a future MOV operand containing 41, jump to it, and emit lowercase a. A separate literal one-bit control emits A. QEMU verifies code RAM, serial and VGA; the source file and read-only image stay unchanged.

04 / BYTES BECOME PIXELS

One palette bit.
Sixteen native pixels.

16 / NATIVE VGA GRAPHICS / QEMU142-BYTE PAYLOAD

Recolor a literal bitmap

Eight authored rows draw a native letter. One DAC operand bit changes its green component while all 64,000 framebuffer indices stay identical. The GIF crops actual screens from two separate boots; the browser CPU model rejects this graphics mode.

Actual QEMU letter bitmap, cropped and enlarged from two separate native boots with green palette components 31 and 63

05 / A SMALL ARENA

One request bit.
Who gets the last byte?

17 / NATIVE REAL MODE / QEMU220-BYTE PAYLOAD

Allocate a guarded arena

Five calls reserve bytes from a sixteen-byte arena. Change the third request from 13 to 12 and the next one-byte call succeeds. Two separate QEMU boots verify the native-written RAM logs, zero and wrap rejection, both guards and unchanged code. These are native final halt snapshots. The CPU lab can run both sources with the same logs and guards; its recorded rewind is a separate model check.

13-byte request: [2000,2003) [2003,2010)
12-byte control: [2000,2003) [2003,200F) [200F,2010)

06 / THE MACHINE INTERRUPTS

Three entries.
One wrong port.

18 / NATIVE 32-BIT IRQ / QEMU568-BYTE PAYLOAD

Receive real timer interrupts

Literal PIC/PIT setup delivers IRQ0 to a protected-mode gate. The handler records the actual saved frame, sends EOI and returns with IRETD. One count bit changes three entries to two. One EOI port bit leaves the first IRQ in service and a later request pending. Final QMP snapshots include both log guards; this is no browser hardware simulation or timing benchmark.

Program: 3 entries, masked final halt
Count bit: 2 entries, third slot empty
EOI port bit: 1 entry, ISR0 + pending IRQ0

This 1536-byte disk includes the separately handwritten loader. The payload alone is not bootable and exceeds the CPU lab's 512-byte input bound.

07 / A PAGE SAYS NO

Protect. Fault.
Repair and retry.

19 / NATIVE LEGACY PAGING / QEMU424-BYTE PAYLOAD

Repair a protected write

Literal instructions build two page structures and enable supervisor write protection. A read-only page rejects the store: error 3, CR2=B000, original EIP=7C99. The native handler repairs PTE.RW, invalidates the translation and returns to the same store. Both complete structures and the retained frame are captured from QEMU.

Protected: 1 fault, repair, retry → 42
PTE RW bit: 0 faults, writable page
CR0 WP bit: 0 faults, page still read-only

The CPU lab model stops at LGDT before paging setup. This proves a controlled supervisor fault; user-mode isolation and browser paging remain unsupported.

08 / ONE SHARED FRAME

Two frame shapes.
One dispatcher.

20 / NATIVE LEGACY EXCEPTIONS / QEMU736-BYTE PAYLOAD

Normalize actual exception frames

One shared handler records divide error, breakpoint, invalid opcode and selector general protection. Stubs normalize the presence or absence of a CPU error code. IRETD preserves the seeded registers and direction flag; the breakpoint keeps its already-advanced EIP. Eighteen legacy gates are mapped, but only these four vectors have native delivery proof.

Program: DE, BP, UD, GP → return
Divisor bit: BP, UD, GP → return
Stop bit: 1 DE, retained context
Retry bit: 4 records; fifth entry stops

The 1536-byte disk uses the handwritten loader. This native payload exceeds the CPU lab's 512-byte input bound; its literal prefix stops at LGDT. General recovery, privilege-changing frames and modern vectors are not claimed.

09 / A STAR INSIDE 492 BYTES

Find the star.
Change one predicate.

21 / NATIVE BIOS TEXT GAME / QEMU492-BYTE PAYLOAD

Play Bit Hunt

Move the white @ with WASD, dodge walls and collect the star. R restarts; Q quits. One goal-operand bit makes the same route finish with WIN: N. Actual keyboard input drives both boots; VGA, counters, guards and immutable code/map bytes have native checks, including 260 moves that saturate at FF.

Actual QEMU Bit Hunt captures: blocked moves, star collection, one-bit no-victory control, sticky win, restart and quit
Same route, same cell, 11 moves
Program: WIN Y · goal bit: WIN N
WASD moves · R resets · Q quits

The GIF contains twenty actual QEMU frames from two boots, cropped and enlarged without overlays. Its pacing explains states, not native timing. Both sources fit the CPU lab import bound but stop at unsupported C6 after fourteen setup steps; the model does not emulate this game.