⌨ Learn: the lessons, in your browser — the source, a DOS PC that builds and runs it, and the video
💬 Community: facebook.com/groups/OWLOS
Real games in real 8086 assembly (VGA mode 13h — and, in the newest one, everything back to Hercules — integer maths, no libraries), running in the browser through DOSBox-WASM, and readable to the last byte. The assembler ships with them, so you can rebuild any of it yourself without buying or installing a thing. Built by the team behind Owlos: keeping legacy systems alive is our day job; writing new software for MS-DOS is how we relax.
Then. A DOS game fit in five kilobytes because it had to. The machine offered one stretch of memory worth caring about, no libraries, no framework — and the programmer knew the price of every byte and every instruction, because the bill arrived instantly: the program either fit and ran at full speed, or it did not exist. Software was written against the machine, with the whole machine held in one head.
Now. That way of working is being forgotten. The people who wrote like this are retiring, while the systems they built still run banks, factories and railways — and the skill to look after them is leaving the industry faster than the systems are. This is Owlos's day job: we know how these systems were written, and we modernise them so they can be supported for the years ahead — and when the job calls for it, we can still write the way they were written.
So. This repository is the proof, kept in public:
- Part lineage. The smallest one ships beside its successors, and they are meant to be played in order — a wireframe night-flight, then a flight simulator, then a multiplayer air war. One idea growing up inside the same constraints, on the same 8086, every byte still readable.
- Part working method. When the job calls for writing the old way, we still can — and these games are the demonstration, built exactly as it was done then: arithmetic you can prove on paper, memory budgets you read as a number before you build, the hardware itself used as the library it always was. And where the old meets today's tools, today serves yesterday — modern converters prepare the art and the sounds, but the 8086 is the runtime, never the toolchain.
- Part lesson. Every routine in ~30,000 lines of assembly carries its reasoning, not just its mechanics — what this is for, why the constant, what broke the last time someone touched it. The code teaches the way it was taught: by being read.
What the method buys — then and now — is the advantage of this repository: nothing hidden behind a framework, the cost of everything visible, and programs small enough that one person can hold the whole machine in their head. That is not nostalgia. It is an engineering standard, and this is what it looks like applied.
| Game | What it is | |
|---|---|---|
OWL FLY III |
The one that runs on the card you actually have. OWL FLY II's sky, opened up to seven video systems — Hercules 720×348 mono, CGA, EGA at 320×200 and 640×350, MCGA, VGA, and VGA 640×480 — and three detail levels, from the full game down to a wireframe world with a flat grid for ground. There is still only ONE renderer: every mode converts the same finished 320×200×256 frame through a baked lookup at blit time, and each retro cockpit is its own artwork, drawn offline for its card. The detail levels are conditions inside that renderer, never a second one — LOW turns the whole world to wire with a single branch, and it flies on hardware two generations below the target. | ▶ play · Hercules |
OWL FLY II |
The multiplayer successor, 105 KB of code and 162 KB of data: one shared sky over IPX-through-WebSocket, and no menu — you arrive as a spectator over the bot war, an orbit camera on whoever has a missile on his tail, and Enter takes a jet, stopped on your own runway with the brakes set. An F-15 SE II cockpit with NATO-shape radar symbology, three MFD pages (MAP / SIT / TGT), a ground school (rotation speed, wheel brakes, nose-wheel steering), a recorded sound bank mixed through one DMA ring, and an afterburner worth four dry engines. The data is the painted cockpit (63 KB front, 47 KB side views) and the sounds (52 KB). | ▶ play |
OWL FLY |
The combat flight simulator, 40 KB: procedural island, destructible city, two air forces of five aircraft types, missiles, a photo cockpit with a working radar, a real jet engine in one Sound Blaster channel. Fly, owl! | ▶ play |
WIRE CITY |
The one that named the arcade, 5.5 KB in a single source file: a wireframe night-flight over a procedural megacity. Where the rest of it started. | ▶ play |
Thirteen standalone .COMs, a few KB each, built on the same
ENGINE/ modules the games use — each demonstrates one technique on
the real engine code rather than on a copy of it. See
EXAMPLES/:
the hangar ·
the island factory ·
the avionics ·
the ring mixer · the take-off, the approach and the touchdown as three
separate programs · a particle trail · a network chat over IPX.
They all build from their own folder with nothing but this repository:
cd EXAMPLES
MAKE all thirteen
MAKE JET just that one
RUN JET
A video series that builds a DOS game from nothing, one constraint at a time — LESSONS/. Every lesson is one small program you can read in an evening, and each one is built to hand over one fact about the machine.
▶ Watch is the video. ⌨ Open it is the lesson itself, on the course page: its source in an editor, a DOS PC beside it that assembles it with FASM and runs it, and the video under the PC. Change a line, press F9, and see what the change did. Nothing is installed; what you edit stays in your browser until you reset the lesson.
▶ The whole series as a playlist · ⌨ every lesson in your browser · 💬 questions in the group
The lecture numbers are the videos' own, and from 0D on they count in hex — as the machine does — so 10, 11 and 12 each name two lessons. The links never mix them up.
| Lesson | The fact it hands over | |
|---|---|---|
| 1 — the screen is memory | Two addresses — B800 for text, A000 for pixels — and why far exists. Written in C and Pascal: the only one that is not assembly, and the only one that needs a compiler you install yourself. |
▶ watch |
| 2 — the file is the program | COM against EXE: eighteen bytes, one source line decides which file comes out — and you can patch those bytes by hand and watch the program change its mind. | ▶ watch · ⌨ open it |
| 3 — the screen, one byte at a time | Mode 13h from assembly: a dot, then every colour there is — and why that picture comes out slanted. | ▶ watch · ⌨ open it |
| 4 — the arithmetic underneath everything | A program cannot even show you a number until it can divide. Fixed point, and why MUL and DIV are the instructions you cannot afford. |
▶ watch · ⌨ open it |
| 5 — sixty-five numbers, and what they are for | A sine table instead of floating point: a circle is 256 steps, an angle wraps with AND, and a quarter of the table is the whole of it. |
▶ watch · ⌨ open it |
| 5B — a ring with no multiply in it | Lesson 4's debt, paid: 70 is three shifts and two adds. Both rings are drawn on one screen and every coordinate compared, so the claim is checked rather than asserted. | ▶ watch · ⌨ open it |
| 6 — ten clocks, and one formula | The radius vector. Hold the length and turn the angle — that is a circle. Hold the angle and grow the length — that is a clock hand. Ten live clocks, one formula, and the formula 3D is built on. | ▶ watch · ⌨ open it |
| 7 — memory is one line, the screen is not | Where that line folds is the whole difference: across, the bytes are neighbours and one instruction writes them all; down, they never are. | ▶ watch · ⌨ open it |
| 8 — the program that rewrites itself | Slanted lines, and JIT by its old name: instead of asking the same question every pixel, rewrite the ADD once and drop the question. |
▶ watch · ⌨ open it |
| 9 — self-modifying code | The titles' own program, run for real: patched live, and the word it spells appears on the glass. | ▶ watch · ⌨ open it |
| 10 — the square that is not there | Four radius vectors become vertices, edges and a turning wireframe — and the three transformations, which are all a "square" ever was. | ▶ watch · ⌨ open it |
| 11 — the keyboard is a computer | Scan codes at port 60h, the BIOS and its 16-cell buffer, the DOS line — and a square driven by our own INT 9. |
▶ watch · ⌨ open it |
| 12 — the triangle that turns the sky | Sin and cos out of the school triangle, the rotation matrix out of two anchor arrows — and a solar system out of one routine. | ▶ watch · ⌨ open it |
| 0D — the arm that adds up | A robot arm in one table: every link inherits its parent's place and its turn, and because every joint turns about the same axis, the angles simply add. | ▶ watch · ⌨ open it |
| 0E — the first cube | Eight corners and twelve pairs saying which to join: a model is a list of vectors and a list of joins, and moving it is transforming the vectors. | ▶ watch · ⌨ open it |
| 0F — perspective is one divide | Two similar triangles make x' = x*d/z: one IDIV per coordinate, then the same with no divide through a table — and the near plane, which is the difference between a table that lies and a divide that traps. |
▶ watch · ⌨ open it |
| 10 — move the camera, or move the world | The view and projection matrices by their classical names — and why a picture cannot tell you whether the cube moved or the camera did. | ▶ watch · ⌨ open it |
| 11 — a landscape out of random numbers | A game ships a recipe, not a world: one multiply and one add make a random number, and Diamond-Square turns them into a 64×64 island — integers only, minted fresh on every key. | ▶ watch · ⌨ open it |
| 12 — the notebook | From a right triangle to a 3D camera with a pencil and paper — no assembly at all, and every step of the engine to come. | ▶ watch |
| 13 — clipping | A point behind your eye has no image, and the machine hands you a number anyway: the near-plane cut, the screen clip, the divide fault caught and counted — on the modules OWL FLY is built from. | ▶ watch · ⌨ open it |
| 14 — flight | The aeroplane stops waiting for you: four rules out of WIRE CITY, and a keyboard interrupt of its own, so a held key is a fact and not an event. | ▶ watch · ⌨ open it |
| 15 — the ground stops being flat | Relief on the lattice, and hidden lines in 320 bytes, drawn from the eye outwards — measured, and hiding turned out faster than a plain line. | ▶ watch · ⌨ open it |
| 16 — the ground becomes a surface | Every square filled, painted far to near — the painter's algorithm. The first crash into a hillside, and a 16-bit word that overflowed when the view turned 45°. | ▶ watch · ⌨ open it |
| 17 — a town on the ground | Houses placed by a hash, so the town plan costs no memory; a byte of fraction carried with ADC; windows as big as they really are; and night, which is nothing but the palette. |
▶ watch · ⌨ open it |
| 18 — the forces | The aeroplane gets an engine: OWL FLY III's flight model — thin air, thrust, drag, a = F/m with the fuel in the mass, a climb paid for out of speed, the stall, the wind — run on the BIOS clock, not the frame; a byte of fraction for the speed with ADC and SBB; and the numbers on the screen in the PC's own font. |
▶ watch · ⌨ open it |
| 19 — the three axes | The aeroplane stops being a point on a rail: the arrows roll it about its nose all the way round, the stick moves the nose towards the pilot's head — pitch += q·cos(roll), heading += q·sin(roll) — so a pull climbs, banked it turns, inverted it dives; three angles flip over the top of a loop; the picture pitches again, and the cull is rebuilt for any attitude. |
▶ watch · ⌨ open it |
| 1A — letters you draw yourself | A breather: in mode 13h nobody draws letters for you. The PC's 8x8 font out of the BIOS ROM, then the game's own 4x6 — 246 bytes whose binary numbers are the pixels — drawn with SHL into the carry flag; three new letters written in binary, lower case for one AND, and a grey ring round every letter made of bit masks: OR grows, AND NOT carves. |
▶ watch · ⌨ open it |
| 1B — HUD tapes | The numbers become instruments: OWL FLY III's head-up display tapes. Every tape is one sum, y = 83 − (mark − value) / scale, its first mark a DIV and a MUL — or, for the compass, an AND. The physics each one reads: the IVV is the climb the flight model already computes, step·sin(nose); the G is 1 + v·ω/g, in the game's units 1 + q·vel/512. Red lines for the stall, the floor and the ceiling; rings first, then ink. |
▶ watch · ⌨ open it |
| 1C — the middle of the HUD | The gunsight where the nose points, the horizon line where the horizon really is — FOCAL·tan(pitch) below it — and, once the horizon has left the middle, the pitch ladder: a rung every ten degrees, turned by the bank with the same lines that turn the world, each rung walked in 8.8 fixed point. Conformal: a rung sits FOCAL·tan(p − a) from the nose — a tangent of a difference is not a difference of tangents. |
▶ watch · ⌨ open it |
| 1D — the wing | The nose is not the path. The stick asks for a load, the wing finds the angle of attack that gives it — alpha = ACRIT·Ncmd/Nmax, Nmax growing with the air and the square of the speed — and the lift, tilted by the bank, bends the path against the weight. A flight path marker under the gunsight, an honest G (minus one upside down), a stall that is an angle and not a speed, and a stall line that moves with the pull: Newton's square root in six rounds. |
▶ watch · ⌨ open it |
| 1E — the hangar | A break from the flight: OWL FLY III's five aeroplanes on a stand, turning. An aeroplane is two tables and nothing more — vertices, a dw x,y,z each read off squared paper, and faces, four vertex numbers and a colour — made again every frame: the spin, a 20-degree tilt in double words (IMUL, ADD/ADC), the lens. Hiding is only order: the faces bubble-sorted far to near, and the last byte written wins. W shows the wire and the vertex numbers — the table's own rows. |
▶ watch · ⌨ open it |
| 1F — only the palette moves | A debt paid: 1E's nozzle burned and nobody said how. A pixel is a number, not a colour — the VGA DAC turns it into one, seventy times a second. The Mandelbrot set drawn once in 4.12 fixed point (IMUL into DX:AX, the test for 4 on the high word, half the rows mirrored), then not one pixel written again: every frame, in the retrace, 385 OUTs to ports 3C8h/3C9h turn 128 colours and the whole picture flows. The BIOS clock times the picture against a thousand turns. |
▶ watch · ⌨ open it |
| 20 — the traffic | The hangar's five aeroplanes fly in the wing lesson's sky. Each is five numbers — x, y, z, a heading, a type — and a tick turns it a step and moves it on at the game's speed; one that strays is leashed back. Each is drawn as the hangar drew it, from where the eye is: the ground's own turn, its heading minus yours, and the engine pitches and banks it with the world. F4 is OWL FLY III's orbit camera — the eye on a sphere round an aeroplane, the arrows and Z/X to fly it. A camera is six numbers. | ▶ watch · ⌨ open it |
| 21 — the breakup | An aeroplane hit by a shell, on a test stand of its own. It is already its pieces — every face a centre, four corners, a velocity, a mass, a spin. A piece's mass is its area (half the cross product of its diagonals, Newton's square root on a double word); the blast pushes it by mass, dv = J/m; the sum of all the pushes is taken out again, because a blast is the aeroplane pushing on itself; the shell brings the only momentum from outside. The centre of mass rides a whole aeroplane's path until the floor touches a piece: an explosion has no momentum of its own. |
▶ watch · ⌨ open it |
| 22 — the guns | Guns for you and for the traffic, and lesson 21's breakup in the sky. A round is a piece with nothing to break: the muzzle's 75 units a tick plus its aeroplane's own step, and gravity. It hits only what it really reaches, tested in four quarter steps; the last hit breaks the aeroplane by lesson 21's laws. Their sights are two products of a sine and a distance; they fire where you are, not where you will be. A hit on you turns the sky red and lays OWL FLY III's red and yellow bands over the world. A gun is carried by its aeroplane. | ▶ watch · ⌨ open it |
| 23 — multiplying without MUL | The 8086 multiplies the way you do on paper: no multiplier in the chip, a MUL is microcode shifting and adding once a bit, 118 clocks and more. The trap flag stops the CPU after every instruction, and an INT 1 of our own counts the multiplies and divides of one frame - tens of thousands. Two programs, the same island: a divide by 256 becomes the product's middle two bytes, and a table pays when one factor is known in advance. And the famous table of squares, said honestly: on the 8086 it does not pay. | ▶ watch · ⌨ open it |
| 24 — which processor is this | The first step towards the 386. Four small programs, one growing: the flags register in ones and zeros; then written and read back - bits 12 to 15 are wires, tied to 1 on an 8086, to 0 on a 286, and on a 386 they take what is written. Past that verdict, the course's first 32-bit code: EAX, PUSHFD, the 66h prefix, and bit 18 of EFLAGS, which only a 486 keeps. Bit 21 says CPUID is there, and the processor tells its own name. The detector is 8086 code to its last jump, or it dies on the chip it was meant to recognise. A bit that is not there reads back its wire. | ▶ watch · ⌨ open it |
| 25 — what the 386 changed | The map before writing for the 386, in four small programs, one growing; each asks first whether this is an 80386 (lesson 24's detector, now ENGINE\E_CPU.INC) and prints the 8086's way and the 386's side by side. The registers: 32 bits, the low half keeps the old name, FS and GS. The addresses: any register, times 1, 2, 4 or 8, and LEA as a calculator. The new instructions: MOVZX, MOVSX, IMUL into any register, SETcc, BSR. And what stayed: one memory address an instruction, real mode's 1 MB and 64 KB segments. The carry the 8086 left in a flag, the 386 carries into bit 16. |
▶ watch · ⌨ open it |
| 26 — the game on the 386 | Lesson 23's flight on the 80386. The timer chip first: the crystal's 1193182 pulses, a divider of 16384, our own INT 8 at 72.8 ticks a second, every fourth handed to the BIOS. Then the game: four pixels a write with REP STOSD and REP MOVSD, every polygon filled with one divide an edge and then only adds (16.16 in a double word), the picture drawn between the steps of the physics, its angles in eighths of a step so a bank turns without jumps. No slow mode left. The time is a crystal and a divider. |
▶ watch · ⌨ open it |
ARCHITECTURE.md — the 64K one-segment discipline and the whole machine · 3D graphics (and the beginner version) · avionics · LESSONS — what 40 kilobytes taught us · llms.txt for your AI assistant.
GAMES/OWLFLY3/ OWL FLY III, seven video systems and three detail levels
GAMES/OWLFLY2/ OWL FLY II, the multiplayer successor (EXE, far segments)
GAMES/OWLFLY/ the flight simulator: SRC/, res/, INSTALL/, its README
GAMES/WIRECITY/ the wireframe night-flight: one CITY.ASM, its README
ENGINE/ engine modules with documented contracts (shared by all)
EXAMPLES/ the thirteen teaching machines (each states its contract)
LAB/ the workbenches, one folder each: HOUSE/ (a city block
that holds still) and OWLFLY4/ - not shipped
docs/ the arcade site: gallery, players, bundles, deep dives
docs/course/ the course page (a prototype): source, DOS PC and video.
course/?l=7 opens lesson 7 - the old lNN.html pages and
wbtest.html?l=N, linked from the videos, now land there.
Its lesson files are copied in by docs/pack-course.ps1
docs/owlosui/ a copy of OWLOSUI's web library, which the course page is
built on - its own project, github.com/KirinDenis/OWLOSUI;
refreshed by docs/pull-owlosui.ps1, never edited here
TOOLS/KC/ Kirin Commander for DOS, the commander the DOS PC starts
into - its own project, github.com/KirinDenis/Kirin_Commander;
refreshed by docs/pull-kc.ps1, never edited here
TOOLS/ the assembler, the DPMI host and the converters
- see THIRD-PARTY.md for what is whose
TASM/ the Turbo Assembler originals of everything that has
finished migrating, with the binaries they produced
GO.BAT start here, inside DOS. The only batch file in the root,
and it builds nothing - each program builds itself
Everything that serves one program lives in that program's folder — its
source, its MAKE, its RUN, its README. A root full of per-game batch
files is the mess this layout exists to avoid.
Building it, in DOS. Mount this folder in DOSBox and type GO. It tells
you the rest: each program is built and run from its own directory, with
MAKE and RUN. Nothing has to be bought, downloaded or installed. The
assembler is flat assembler in TOOLS/FASM,
free to use and to pass on; MAKE also loads the small DPMI host in
TOOLS/CWSDPMI, because FASM is a 32-bit program and DOS is not.
Building it, from Windows. Every folder has a MAKEWIN and a RUNWIN
that open DOSBox for you and close it again. They are not a second build —
they drive the same MAKE.BAT the DOS route uses, so there is only ever one
way anything here is assembled. Machine paths go in a gitignored LOCAL.BAT
(set DOSBOX=...).
The site deploys from docs/ via GitHub Pages; PUBLISH.BAT packs a fresh
game bundle (filename-versioned — js-dos caches by path).
Running the browser build yourself. Everything the web version needs is in
docs/, and none of it depends on our site: a page, a .jsdos bundle which is
a zip of the game and its data, and jsdos/ — DOSBox compiled to WebAssembly.
Nothing is fetched from anywhere else at run time.
You cannot just double-click the page: a browser will not let a file opened from disk fetch other files, so it has to be SERVED. Any small web server does; this one is already in the game READMEs because it needs nothing installed on most machines:
python -m http.server -d docs 8080then open http://localhost:8080/owlfly2.html. No Python? Anything static
works - npx serve docs, php -S localhost:8080 -t docs, VS Code's Live
Server, or simply uploading the folder to any hosting.
Two things to know before you put it on a server of your own:
file://will not do. The page fetches its bundle, so it needs a real origin. Any static host will do — there is nothing to run server-side.- It needs HTTPS off localhost. js-dos wants
SharedArrayBuffer, which wants COOP/COEP headers;coi-serviceworker.jssupplies them, and a service worker only runs in a secure context.localhostis the exception, a LAN address is not.
The emulator is GPL-2.0 and the games are MIT: if you redistribute the
docs/ folder, docs/jsdos/NOTICE.md has to travel with it. See
THIRD-PARTY.md.
This was written with Borland's Turbo Assembler, which is commercial software: it cannot be shipped, so it cannot be handed to you, so the sources were not really yours to build. Every program has now moved to FASM — the three games, the trainer, the force-model aeroplane, the lab, the model precompiler and all thirteen teaching machines. The assembler that builds them is in this repository and free to pass on.
The originals are frozen in TASM/ with the binaries they produced,
and those binaries are the point: a translation between assemblers cannot be
checked with a checksum, because the two builds are not meant to match. TASM
is one-pass, so it reserves room for a long jump and pads what it could not
take back with NOP. The standard here is complete accounting — every
byte of the difference named. TOOLS/BinAccount decodes
both builds instruction by instruction and stops at anything it cannot
explain.
dotnet run --project TOOLS\BinAccount -c Release -- TASM\EXAMPLES\JET.COM EXAMPLES\JET.COMAll twenty programs pass. OWL FLY II, the one real EXE, is checked segment by segment — its five windows sit end to end and the game counts paragraphs past them, so the boundaries are read from the executable's own relocation table and each is accounted for on its own.
That is not ceremony. It caught ten 386 instructions in a WIRE CITY build
that looked finished: TASM's .8086 restricts the instruction set, FASM has
no equivalent directive, and the restriction was silently lost in
translation. The build ran perfectly on every emulator and would have died on
the machine the code is written for.
ENGINE/E_8086.INC puts it back — and the same file
now carries LOOP and JCXZ, which reach 127 bytes and have no long form on
any processor at all.
One disk instead of eleven downloads. Today every lesson ships as its own
browser bundle, and each one carries its own copy of the assembler — six
lessons is about 985 KB, of which some 930 KB is the same three files six
times over. So the whole course is being put on one bootable disk:
TOOLS\ (the assembler, the editor, the listing tool), LESSONS\,
EXAMPLES\, GAMES\, and WORK\ — which is yours, and which nothing else
on the disk writes to. It boots into a catalogue, MENU.COM, written in
8086 like everything else here: it offers open it, build it, run it, and
every one of those prints the command before running it, because the point
is that you could have typed it yourself.
Nothing in that catalogue is hand-maintained. Each lesson, example and game
carries a small .INF file describing itself, and the same file feeds the
menu on the disk, the course page on the web and the packer that builds the
bundle — one description, three readers, so the list cannot disagree with
the disk. It stands at 26 entries and it is built and tested in DOS
already (TOOLS\RUNWB.BAT); the browser page for it is the next thing.
Multiplayer over IPX tunneled through WebSocket is live in OWL FLY II
(browser pilots meet through the relay; native DOSBoxes over ipxnet).
Still cooking: in-game chat riding the same wire, real callsigns, relay
bots keeping the skies alive, a NOW-PLAYING API — and, one day, the
emulator streamed to an ESP32 screen.
- OWLOSUI - the text-mode UI
toolkit, one core in Rust: the site's and the course page's windows,
menus, editors and DOS PC are its web library (a copy in
docs/owlosui/). - Kirin Commander - a
two-panel file manager in Rust on OWLOSUI, one program from DOS to the
browser: the DOS PC starts into it, and comes back to it after every game
and lesson (a copy in
TOOLS/KC/).
Game code MIT (see LICENSE). DOSBox / js-dos (GPL) are the runtime that plays the games, not part of their source.



