dialer.com - a small BBS simulator, written in a custom Forth environment which includes an 8086 assembler and is capable of assembling itself.
 
 
 
Go to file
Jeremy Penner 17ae935409 Implement tandy 3-voice support
break swine meeper trying to make it faster :/
2024-04-05 22:19:00 -04:00
.gitignore Implement tandy 3-voice support 2024-04-05 22:19:00 -04:00
asm.jrt speed up embedding, download dialog 2023-10-15 21:05:54 -04:00
assemble.com Add instruction screen to Swine Meeper, create zipmin.com, fix input buffer bug with writeself 2023-10-15 21:33:10 -04:00
assemble.jrt speed up embedding, download dialog 2023-10-15 21:05:54 -04:00
beep.jrt Implement tandy 3-voice support 2024-04-05 22:19:00 -04:00
boot.jor massive refactoring; introduce "zipoff" 2023-09-12 23:27:46 -04:00
build.bat zipoff.com as a standalone Forth executable, with stub 2023-09-15 16:10:12 -04:00
common.jrt Implement tandy 3-voice support 2024-04-05 22:19:00 -04:00
coredefs.jrt small constants, keyboard input, interactive minesweeper 2023-09-23 22:44:30 -04:00
debug.jrt minesweeper, random number generator, debugging assembler 2023-09-22 20:38:58 -04:00
defs.jrt generators, start converting swine meeper to use iteration 2023-10-03 20:59:18 -04:00
dialer.com Implement tandy 3-voice support 2024-04-05 22:19:00 -04:00
dialer.jrt Implement tandy 3-voice support 2024-04-05 22:19:00 -04:00
dialtest.com Implement tandy 3-voice support 2024-04-05 22:19:00 -04:00
dirtrect.com Add instruction screen to Swine Meeper, create zipmin.com, fix input buffer bug with writeself 2023-10-15 21:33:10 -04:00
dirtrect.jrt Dirty Rectangles logo app 2023-09-18 22:10:50 -04:00
embed.jrt speed up embedding, download dialog 2023-10-15 21:05:54 -04:00
file.jrt speed up embedding, download dialog 2023-10-15 21:05:54 -04:00
game.jrt invert { and }, more immediate word helpers, box-drawing 2023-09-17 22:24:14 -04:00
iter.jrt refactor iterator definitions to define a "blank" iterator, which is then 2023-11-05 00:30:34 -04:00
jort.com speed up embedding, download dialog 2023-10-15 21:05:54 -04:00
keys.jrt improve statusbar 2023-10-12 23:00:42 -04:00
logic.jrt iteration, cooperative multitasking, touchtone noises 2023-10-01 21:54:58 -04:00
main.c First correctly-assembled code snippet (printed as hex to stdout) 2023-09-01 19:10:52 -04:00
minijort.c dictionary words, limited "target" compiler 2023-09-04 23:24:12 -04:00
minijort.exe dictionary words, limited "target" compiler 2023-09-04 23:24:12 -04:00
minijort.h dictionary words, limited "target" compiler 2023-09-04 23:24:12 -04:00
minijort.prj dictionary words, limited "target" compiler 2023-09-04 23:24:12 -04:00
random.jrt minesweeper, random number generator, debugging assembler 2023-09-22 20:38:58 -04:00
readme.txt PC speaker, timer reprogramming / ISR, fix IN and OUT instructions 2023-09-28 22:07:10 -04:00
reasm.bat small constants, keyboard input, interactive minesweeper 2023-09-23 22:44:30 -04:00
rebuild.bat massive refactoring; introduce "zipoff" 2023-09-12 23:27:46 -04:00
rick.jrt Add instruction screen to Swine Meeper, create zipmin.com, fix input buffer bug with writeself 2023-10-15 21:33:10 -04:00
rickclub.bin fill out rick's bbs, dialer ESC menu, silence modem 2023-10-14 22:22:50 -04:00
rickmenu.bin fill out rick's bbs, dialer ESC menu, silence modem 2023-10-14 22:22:50 -04:00
swine.com Implement tandy 3-voice support 2024-04-05 22:19:00 -04:00
swine.jrt Implement tandy 3-voice support 2024-04-05 22:19:00 -04:00
swine.txt Add instruction screen to Swine Meeper, create zipmin.com, fix input buffer bug with writeself 2023-10-15 21:33:10 -04:00
tandy.jrt Implement tandy 3-voice support 2024-04-05 22:19:00 -04:00
target.jrt massive refactoring; introduce "zipoff" 2023-09-12 23:27:46 -04:00
task.jrt iteration, cooperative multitasking, touchtone noises 2023-10-01 21:54:58 -04:00
testgame.com invert { and }, more immediate word helpers, box-drawing 2023-09-17 22:24:14 -04:00
text.jrt fill out rick's bbs, dialer ESC menu, silence modem 2023-10-14 22:22:50 -04:00
timer.jrt file area, speed up text display 2023-10-15 16:54:40 -04:00
tinyboot.jrt massive refactoring; introduce "zipoff" 2023-09-12 23:27:46 -04:00
tinyjort.com Add instruction screen to Swine Meeper, create zipmin.com, fix input buffer bug with writeself 2023-10-15 21:33:10 -04:00
tinyjort.jrt Add instruction screen to Swine Meeper, create zipmin.com, fix input buffer bug with writeself 2023-10-15 21:33:10 -04:00
zipmin.com Implement tandy 3-voice support 2024-04-05 22:19:00 -04:00
zipoff.com Implement tandy 3-voice support 2024-04-05 22:19:00 -04:00
zipoff.jrt refactor iterator definitions to define a "blank" iterator, which is then 2023-11-05 00:30:34 -04:00
zipstub.min Add instruction screen to Swine Meeper, create zipmin.com, fix input buffer bug with writeself 2023-10-15 21:33:10 -04:00
zipstub.seg Implement tandy 3-voice support 2024-04-05 22:19:00 -04:00

readme.txt

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

                          S W I N E   M E E P E R
                          =======================
Created for the DOS COM Game Jam 2023
https://itch.io/jam/dos-com-game-jam

Technical Details
-----------------
This source repository contains a full development toolchain for creating
DOS COM programs in Forth and assembly. This toolchain was written in a
custom Forth dialect originally built for Neut Tower[1]; through a fairly
involved bootstrapping process it is now completely capable of rebuilding 
itself. Every byte of every .COM file in this repository has been generated
from the included 8086 assembler, including the .COM file of the assembler.

We start with MINIJORT.EXE, compiled with Borland Turbo C++ from MINIJORT.C
and MAIN.C. This is a stripped-down version of the Jorth engine that Neut
Tower[1] was built with, and the only part of this project that existed in
any form before August 14, 2023. (I started early on the jam because I 
basically knew what I wanted to implement, and with the absurd plan I had in 
mind, I knew that getting _anything_ playable by the end of September was
going to be a long shot.) MINIJORT.EXE is a simple Forth interpreter that
loads BOOT.JOR and then reads the rest of its input from stdin.

We then use MiniJort to generate TINYJORT.COM. This is done by piping the
contents of TINYBOOT.JRT to MiniJort. TINYBOOT loads some common definitions
from DEFS.JRT and the assembler from TARGET.JRT and ASM.JRT, then executes
TINYJORT.JRT, which assembles a second Forth interpreter that understands
a substantially similar vocabulary as MiniJort, with some improvements.
TinyJort internally embeds the definitions from BOOT.JOR and is entirely
self-contained.

We could load TINYBOOT into TINYJORT.COM to rebuild itself, but one of the
big advantages of TinyJort over MiniJort is that TinyJort is trivially
capable of adding more definitions to itself and then writing out a new
.COM file with those definitions already loaded. So the next step is to use
TinyJort to build ASSEMBLE.COM, which is just TinyJort with the basic defs 
and assembler pre-loaded, ready to get to work as soon as you launch it,
saving precious seconds of build time. TINYJORT.JRT can be loaded directly
into ASSEMBLE.COM in order to produce a byte-exact copy of TINYJORT.COM.

REBUILD.BAT automates the process of bootstrapping TinyJort, and includes
a check to ensure that both Jorts produce the same .COM file. REASM.BAT
regenerates TINYJORT.COM and ASSEMBLE.COM using TINYJORT.COM and 
ASSEMBLE.COM and is much faster.

But that's not enough Forth interpreters yet! This tooling would allow us
to write assembly code _using_ Forth, and it would allow us to _extend_
TinyForth to produce another Forth interpreter, but it does not yet allow
us to generate .COM files, written in Forth, that do not include extraneous
data like the Forth dictionary and the assembler. Since the .COM format is
limited to 64kb, space is at a premium. The final custom Forth interpreter
is ZIPOFF.COM and ZIPSTUB.SEG.

Why ZipOff? Imagine a pair of Jorts - these are the Forth interpreter, 
assembler, and extended runtime. Now imagine extending these Jorts into 
full-on Jeans, by bringing in the definitions of the code that needs to 
actually be included in the final product. When the two pieces are together,
the host Jorts can take advantage of the immediate interactive development 
workflow of Forth, calling out to words defined in the final .COM, and
providing useful debugging tools not needed for the final product. But once 
the development cycle is complete, the legs of the Jeans can be jettisoned -
zipped off, if you will - and... worn on their own, I guess? The metaphor
breaks down a little bit here. The point is that the target .COM file is 
minimal and completely self-sufficient.

Yo dawg, I heard you liked Forth, so I wrote a Forth interpreter in Forth 
that I used to implement another Forth.

THIS, finally, is the tool we use to build games and demos with. Importing
SWINE.JRT into ZipOff produces SWINE.COM; importing DIRTRECT.JRT produces
DIRTRECT.COM, and so forth.

[1] https://spindleyq.itch.io/neut-tower/