The original MS-DOS operating-system simulator: a round-robin scheduler with
Banker's-style deadlock avoidance, drawn with Borland's BGI graphics through
the LIBREGRA widget library and driven by a mouse (int 33h) via RATON.
This folder builds and runs it under DOSBox with the original toolchain.
There's also a modern Linux/ncurses port of the same simulator that builds with GCC/Clang or Fil-C, no emulator needed. This README is for the period DOS build.
| File | Purpose |
|---|---|
simso.c |
The original program (build target) |
LIBREGRA.H / LIBREGRA.LIB |
BGI UI widgets (boxes, buttons, panels, 3D text, checkboxes, images) |
RATON.H / RATON.LIB |
Mouse driver wrappers (int 33h) |
LIBTEST.C |
Optional toolchain smoke test (build first to verify the pipeline) |
Disk01.img ... Disk05.img |
Turbo C++ 3.0 install floppies (720 KB each) |
install.conf |
DOSBox config to install the compiler from the floppy images |
dosbox-simso.conf |
DOSBox config to build & run |
BUILD.BAT |
Makes EGAVGA.OBJ, then compiles + links (run inside DOSBox) |
- Compiler: Turbo C++ 3.0 (disk 1 identifies itself as such; the
.LIBfiles were built with the sibling Borland C++ 3.1 core - same OMF, same BGI). Installs toC:\TC. - Memory model: MEDIUM (
-mm): far code, near data. The libraries use per-module code segments with all data inDGROUPand noFAR_DATA/AHINCR.simso.cmust be compiled-mmor the link fails with segment/fixup errors. - BGI driver is linked, not loaded:
LIBREGRAreferences_registerbgidriver/_EGAVGA_driver, so the final link needsEGAVGA.OBJ(made withBGIOBJ) plusGRAPHICS.LIB.BUILD.BATdoes theBGIOBJstep. - Install disks: five 720 KB floppies (
512,9,2,80),INSTALL.EXEon disk 1.
simso.c loads two saved BGI images while drawing the CPU box:
imagen("CPU.IMG", ...) and imagen("EJEMPLO.IMG", ...). Neither file is in
the repo. imagen() returns an error code rather than crashing, so the program
still runs - those two inset bitmaps just stay blank. Drop CPU.IMG and
EJEMPLO.IMG next to simso.c if you have the originals.
- DOSBox (or DOSBox-X).
- The Turbo C++ 3.0 floppy images (already in this folder).
Launch DOSBox from this folder so the relative paths in the config resolve:
cd /path/to/simso-dos
dosbox -conf install.confAt A:\>:
- Type
INSTALL. - Source drive A:, install to
C:\TC, accept the default components. - On each "insert next disk" prompt, press Ctrl+F4 to swap the mounted floppy image to the next one, then continue. Repeat through disk 5.
- When it finishes:
D:thenBUILD(you can build in the same session).
The compiler lands in extras/TC on the host (mounted as C:\TC). One-time only.
cd /path/to/simso-dos
dosbox -conf dosbox-simso.confAt D:\>:
BUILD rem makes EGAVGA.OBJ once, then compiles simso.c (-mm) + links
SIMSO rem run it
To sanity-check the toolchain before the real build, set MAIN=LIBTEST.C at the
top of BUILD.BAT, run BUILD, then LIBTEST - a titled box + text that closes
on a mouse click means compiler + BGI + libs + mouse all work.
cd C:\TC\BGI
BGIOBJ EGAVGA
copy EGAVGA.OBJ D:\
d:
BCC -mm -IC:\TC\INCLUDE -LC:\TC\LIB simso.c LIBREGRA.LIB RATON.LIB EGAVGA.OBJ GRAPHICS.LIB
From the IDE (TC): make a project with simso.c, LIBREGRA.LIB, RATON.LIB,
EGAVGA.OBJ, GRAPHICS.LIB, and set
Options -> Compiler -> Code generation -> Model = Medium.
- Segment / "pointer types" / fixup errors -> wrong model; confirm
-mm. BGI Error: Graphics not initialized/ blank screen ->EGAVGA.OBJnot linked; re-run theBGIOBJ EGAVGAstep.Unable to open 'GRAPHICS.LIB'-> add-LC:\TC\LIB.imgmountcomplains about the image -> geometry is-size 512,9,2,80(already set); make sure the filenames/paths match.- Mouse does nothing -> give the DOSBox window focus; no host driver needed.
- CPU box images blank -> add
CPU.IMG/EJEMPLO.IMG(see Runtime assets).
Original DOS / Turbo C++ 3.0 project and the LIBREGRA / RATON libraries by
Eduard Garcia and Lloren Llado. LIBTEST.C is a new test harness, not part
of the original.