Compiling and Running Turbo Pascal in the Browser

When a friend of [Lawrence Kesteloot] found a stack of 3.5″ floppy disks, they found that it contained Turbo Pascal code which the two of them had worked on back in the Summer of 1989. Amidst reminiscing about the High School days and watching movies on VHS, [Lawrence] sought a way to bring these graphical applications once more back to life. Not finding an easy way to compile Turbo Pascal code on Mac even back in 2013 when he started the project, he ended up writing a Turbo Pascal compiler in JavaScript, as any reasonable person would do in this situation.

<img decoding="async" data-attachment-id="674191" data-permalink="" data-orig-file="" data-orig-size="639,350" data-comments-opened="1" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}" data-image-title="spider" data-image-description data-image-caption="

SPIDER.PAS in its full glory. (Credit: Lawrence Kesteloot)

” data-medium-file=”″ data-large-file=”″ class=”size-medium wp-image-674191″ src=”″ alt=”SPIDER.PAS in its full glory. (Credit: Lawrence Kesteloot)” width=”400″ height=”219″ srcset=” 639w,,137 250w,,219 400w” sizes=”(max-width: 400px) 100vw, 400px”>

SPIDER.PAS in its full glory. (Credit: Lawrence Kesteloot)

As noted by [Lawrence], the compiler doesn’t implement the full Turbo Pascal 5.5 language, but only the subset that was required to compile and run these applications which they had found on the floppy disks. These include ROSE.PAS and SPIDER.PAS along with three others, and can also be found in the GitHub repository. As can be seen in the online version of the compiler, it captures the feel of programming Pascal in 1989 on the command line.

Naturally, the software situation has changed somewhat over the last decade. We’ve recently seen some promising multi-platform Pascal compilers, and of course you could even run Turbo Pascal in DOSBox or similar. That might make this project seem irrelevant, but being able to write and run Pascal applications in more ways and on more platforms is never a bad thing.

This post was originally published on this site