DOS Roots Lab

Shapes R Us, Rebuilt from 1995

A menu-driven Pascal program that mixed geometry calculations with ASCII shape output. This remake preserves the original command-style structure.

Run DOS Remake

Menu and letter commands are mapped to the original DOS flow.

Commands: 1-4 menu options, C/R/S/T shape keys, numeric dimensions, RESET to restart.

P2CBF.EXE - Shapes R Us (1995)
 
S:\>

Original Program Intent

P2CBF.PAS combines multiple procedures behind one numeric menu: area calculations, perimeter/circumference calculations, and text-rendered shapes.

It demonstrates early procedural decomposition and menu-loop control flow.

Original Pascal Logic

From P2CBF.PAS (Turbo Pascal, 1995)

1) Main Menu Loop

writeln ('1. Figure Areas of Shapes. ');
writeln ('2. See what shapes look like. ');
writeln ('3. Figure Circumference.  ');
writeln ('4. Quit Program.   ');
readln (Choice);

2) Geometry Branch

if Answer='C' then
begin
  Area := Radius * Radius * PI;
  writeln ('The area of the circle is ',Area:2:2);
end;

3) ASCII Shape Rendering

writeln ('   _________   ');
writeln ('  |         |  ');
writeln ('  |         |  ');
writeln ('   ---------   ');
View longer 1995 source excerpt
repeat
  writeln ('1. Figure Areas of Shapes. ');
  writeln ('2. See what shapes look like. ');
  writeln ('3. Figure Circumference.  ');
  writeln ('4. Quit Program.   ');
  readln (Choice);

  if Choice='1' then
    FigureArea
  else if Choice='2' then
    ShowShapes
  else if Choice='3' then
    FigureCircumference;
until Choice='4';

Developer Notes

What Stayed True

  • Same menu-first interaction pattern from the Pascal version.
  • Same branch families: area, shapes, and perimeter/circumference.
  • ASCII output remains part of the experience.

What Changed for Web

  • Browser terminal wraps the workflow in one accessible panel.
  • Numeric validation gives immediate inline DOS-style error feedback.
  • RESET restarts the boot and menu loop without a page reload.