Easy-Flow His manufacturing simulator, which grew out of his summer job at General Motors, 1990–92
- A faithful recreation, 2026, from Andrew’s 1991–92 source
- 1990–92
- Turbo Pascal 5
- 27,541 lines of his Pascal across two versions: 12,507 in the 1990 build, 10,947 in the 1992 build
You lay out a factory on screen: hoppers that hold parts, machines that make parts from parts, conveyors with baskets, and arrows for how parts flow. Then you run it and read his charts to see where parts pile up or run out. Machines break down at random, turn out bad parts, keep a weekly schedule, and can work just-in-time. The screen opens on a short tour of his screens, starting with his hourly bar chart.
Watch a 37-second recording instead: the bar chart, the plant, his menus and forms, his file browser and charts, and his colour tuner
Pick a screen
Built by hand
In 1991 there was no interface library for Borland’s graphics screens, so he wrote every element himself from Borland’s basic line, box and text calls. That includes buttons that look raised, selected and pressed, drop-down button menus, pop-up windows and forms, typed fields, a scrolling file browser, error boxes, scroll bars, a cross-hair cursor, and the small images they use. Each picture below is drawn by a port of his routine, pixel for pixel, at whole-number scale.
- 4,085 lines of his 1992 build’s 10,947 are interface code:
- forms and the field editor behind them (
SIMINFO.PAS): 1,369 - the file browser and its save-as box (
GRAPHDIR.PAS): 1,169 - buttons, button rows, error boxes, the help bar, images, scroll bars, plant drawing and the cross-hair cursor (
GRAFAIDS.PAS): 857 - the push-button menus and main screen (
S.PAS): 385 - pop-up windows, typed fields and a yes/no switch (
GRAFTOOL.PAS): 305
- forms and the field editor behind them (
- Another 923 lines are the menu loop that drives them, with his colour tuner inside it.
- From TechnoJock’s Turbo Toolkit he used only the keyboard reader and string helpers. Nothing on these screens comes from a library.
DrawMainPushButtons, DrawPushButtons (S.PAS).DrawButton and UnderlineIt (GRAFAIDS.PAS), 26 lines.DrawPopUpWindowInGraphics (GRAFTOOL.PAS), ChooseButtons (GRAFAIDS.PAS).ErrorBox (GRAFAIDS.PAS).GetCyclingInfoInGraphics and his field editor (SIMINFO.PAS).GetScheduleInfoInGraphics (SIMINFO.PAS). The typo in his hour header (…0213) is his.GetFileInGraphics (GRAPHDIR.PAS). The names, sizes and dates are the files’ own, from his July 1992 floppy.GetImage and PutImage. They are the mouse pointer (DefineHash), the box that follows the cursor while you place a machine (DefineBox), and the moving part in its fifteen colours (DefineAstericks).UpdateCursorBars, HelpBar (GRAFAIDS.PAS), PlaceMemoryBlock (GRAFTOOL.PAS).Procedure DrawButton(x,y,w,h:integer;pressed,underline:boolean);
Begin
if pressed then
Begin
SetFillStyle(solidfill,LoButton);
SetColor(darkgray); Bar(x,y,x+w,y+h);
SetColor(black); line(x,y,x+w,y);
SetColor(LoButton); line(x,y+1,x,y-1+h);
SetColor(white); line(x,y+h,x+w,y+h);
SetColor(darkgray); line(x+w,y+1,x+w,y-1+h);
End Else
Begin
SetFillStyle(solidfill,HiButton);
SetColor(darkgray); Bar(x,y,x+w,y+h);
SetColor(white); line(x,y,x+w,y);
SetColor(LoButton); line(x,y+1,x,y-1+h);
SetColor(black); line(x,y+h,x+w,y+h);
SetColor(darkgray); line(x+w,y+1,x+w,y-1+h);
End;
if underline then UnderlineIt(x,y,w,pressed);
End;
GRAFAIDS.PAS): a filled box and four lines, with the light edge on top when raised and at the bottom when pressed.Why a recreation: both copies of the program on his floppies, SIMULATE.EXE (1990) and S.EXE (1992), survive only as files full of zeros. The disk copy kept their names and sizes but not their contents. His source survives, so this was rebuilt from it in JavaScript. The simulation engine is a line-by-line port of SIMULATR.PAS. The screens are drawn from S.PAS, GRAFAIDS.PAS and SIMRXTRA.PAS: the same coordinates, words and colours, including his own palette changes. The cover is from his 1990 version, SIMCOVER.PAS. The plants are his own files.
How close it is: his disk also holds a log his program wrote while running JIT1. Over the first simulated hour, the three machines that never break down make exactly the numbers in his log: 58, 57 and 59 parts. The two that break down at random differ, as random runs do. His run kept one machine down far longer than the plant file’s settings allow, so that run probably used different breakdown settings. The port also keeps his quirks: every breakdown stops the run until a key is pressed, and a conveyor that finds its hopper full jams for good. For unattended viewing, the page can answer those pauses after a second. Untick the box to wait the way it did.
What is his and what is 2026: every screen is drawn from his code, with his coordinates, words and colours. That covers the flow chart and colour key, the hourly bar chart (PutHourInfoBarsDown), the two Review charts (SIMREVU.PAS), the menus with their pressed buttons, his file browser (GRAPHDIR.PAS), the Review set-up form and the Add Info forms (SIMINFO.PAS), and his colour tuner. The Review charts plot JIT1.SIM, the log his own program wrote in 1992. The tour is a 2026 script that presses his keys for you. The 2026 layer over the flow chart can be switched off. With it on, parts glide along every arrow that carried a part in that step, where his program hopped one asterisk over five points of the arrow. A strip under each machine shows its state in the colours of his own key, a yellow gauge shows how full each supply or in-between hopper is, and conveyor baskets are his one-pixel dots made larger. The states and counts all come from his simulation. His program has no 3-D or isometric view: every Bar3D call in both versions has depth 0. The raised look comes from the bevelled edges he drew on his boxes and buttons.
Not recreated: building and editing a plant (Build, and changing values in the forms, which here only display his numbers), saving, the simulation set-up dialog, the machine input and output forms, his browser’s trips into other folders and drives, and his help screen (F1). The folder name in the browser, C:\TP\SIM, is a guess. The Add Info cross-hair cursor is replaced by arrow keys that step from machine to machine. His mouse code is there, but this build switches the mouse off (MouseOK:=false), so here too it is keys only. The “Free Mem” box is drawn without numbers, since they would have to be invented. His lettering font, Borland’s Triplex, is approximated with the Hershey stroke font it was drawn from.
Lines counted from his source with comments and blank lines. The 1990 build is SIMULATE.PAS and 11 units (12,507 lines, plus 599 lines of unused scraps). The 1992 build is S.PAS and 10 units (10,947 lines, plus 3,488 lines of alternate versions). Not counted: a common public mouse unit and TechnoJock’s Turbo Toolkit. Text uses the IBM EGA 8×8 font from the Ultimate Oldschool PC Font Pack by VileR (int10h.org), CC BY-SA 4.0. Headings use the Hershey “Roman Triplex” strokes (A. V. Hershey, 1967; data from the Hershey-Fonts package, MIT).