Hacker News

Favorites Setup
Comment by MichaelRo | original | Things That Turbo Pascal Is Smaller Than (2011)
[−]MichaelRo · 2026-11-15 Sun 18:24 UTC · link
Went the way of the dinosaurs. I learned about pointers and memory on Hi-Soft Pascal on a ZX Spectrum from this book: https://www.okazii.ro/limbajul-pascal-corina-corici-dorin-ma...

Here's a page from the book I was reading in 1993: https://imgur.com/a/7UWdGgS

For reference, ZX-Spectrum has 48Kb of RAM out of which 8Kb is video memory, so unusable.

Then you have to load the Pascal compiler into the remaining 40k of RAM. Allocate some RAM for stack and environment variables for the editor where you write your program, plus space for the actual program. Then compile your program into the same 40k of space. And run it, using heap and stack memory from which memory space? You guessed right, same 40k.

To recap, on 40k of RAM you had back then:

- The Pascal compiler

- The Pascal source code in text form

- The Pascal executable form in machine code

- The Pascal data/memory. Of which, recently in a "tech demo" of automated tests, one colleague said "unfortunately we only have a very limited amount of RAM to be able to do basically anything [that's why the product is a mess with no tests]. Only 32Gb per [virtual] machine".

One of my first programs was a Tetris clone, because ZX-Spectrum BASIC was slow as molasses. All on top of only having tape for storage so if I fucked up a pointer (I don't think Pascal had the concept of access violation back then but I sure discovered it on my own skin), it would take 5 minutes to load the Pascal compiler + some backup copy of my Tetris game, hopefully not from a month ago and hopefully I remember what I changed. Lots to discover and have "fun" with.

About a year later I did find a compiler for BASIC and it turned the unplayable BASIC code for Tetris I wrote in the 9th grade into a totally playable Tetris game, without the need to learn another language and paradigm (pointers!) but the damage was done. Ignoring a year of databases, in 12th grade of high school computer science class (elite class, found there basically all the Math olympics I was competing with in gymnasium), I got introduced to C and from then on, here I am, 30 years later, doing C++ in finance for an S&P 500 company.