DOS Roots Lab

Celsius Conversion, Rebuilt from 1995

One of my earliest Pascal programs: prompt for a Celsius value, run the conversion formula, and display the Fahrenheit result.

Run DOS Remake

Command-line interaction, adapted for keyboard-first browser play.

Commands: ENTER to advance, numeric value to convert, Y/N to continue, RESET to restart.

P1CBF.EXE - CelsiusConversion (1995)
 
C:\>

Original Program Intent

P1CBF.PAS is a focused beginner utility. It introduces typed numeric input, arithmetic, and formatted output in a DOS console flow.

The core behavior is simple but foundational: read a number, apply a formula, and print a clear human-readable result.

Original Pascal Logic

From P1CBF.PAS (Turbo Pascal, 1995)

1) Input Prompt

write ('Please enter a Celcius temperature --> ');
readln (Celcius);

2) Conversion Formula

Faren := (Celcius * (9/5)) + 32;

3) Result Output

writeln (Celcius:1:1,' Celcius equals ',Faren:1:1,' Farenheight.');
View longer 1995 source excerpt
program CelciusConversion(input,output);
var
   Celcius:real;
   Faren:real;
begin
   writeln;
   writeln ('This program Converts Celcius temperatures');
   writeln ('to Farenheight temperatures & will then');
   writeln ('display both on the screen.');
   write ('Please enter a Celcius temperature --> ');
   readln (Celcius);
   Faren := (Celcius * (9/5)) + 32;
   writeln (Celcius:1:1,' Celcius equals ',Faren:1:1,' Farenheight.');
end.

Developer Notes

What Stayed True

  • Single-purpose formula workflow from typed input.
  • Immediate output after one conversion step.
  • Simple prompt-response console tone.

What Changed for Web

  • Session runs in a browser-based DOS terminal shell.
  • Invalid numeric input is handled with inline DOS-style errors.
  • RESET replays the startup flow without reloading the page.