I coded a Pascal compiler for transputer as a teen in 1993
14 comments
·February 5, 2025ikari_pl
Do you also feel like you did projects in your teen years that you wouldn't pull off today?
I coded assembly (Z80) in a disk editor, having no assembler, just a handwritten list of opcodes.
I wrote a chat client app (in Delphi) HAVING NO INTERNET at home, I went to a cafe, recorded a dump with Wireshark, printed it on a dot matrix printer, and used a marker pen to highlight the bytes I understand the meaning of.
I miss it so much.
smokel
Yup. I wrote a TSR program to extend Deluxe Paint II on PC with animation features. Never heard about APIs, and simply copied data from the VGA memory, overlaying my own user interface on top of DP.
The thought of doing this with contemporary systems just seems ... wrong :)
SmellTheGlove
Well back then we didn’t have all of that memory for those fancy abstraction layers. Sticking your finger in the framebuffer probably wasn’t the worst way to do that!
lukaslalinsky
When I was teen moving into adulthood, I couldn't understand why Pascal is being abandoned and people are moving into C and C++. I often think how would the software world look like if that did not happen. It's such a shame that we lost such a simple, yet productive language, in the commercial settings. And now we have Rust as the next winning choice, language even more complex than C++.
cjfd
Don't forget that, at least in the pascal that was used in my university programming course, all data structures have a fixed size. If you want variable size, you need to allocate them on the heap and free them manually, so it is not clear that this is going to be that much easier than C or C++ in practice. Actually attending the lecture about this I was a bit shocked that it was necessary to free memory manually and I thought to myself 'isn't this going to lead to a lot of trouble'. Turns out my 19-year-old self was right about that.
p0w3n3d
Why would you say that Pascal was (is?) a simple and productive? I wrote some software in Turbo Pascal and Delphi at that time, and was usually envying the C++ freedom. All the headers had to be translated to Pascal first. Pointer arithmetic was kludgy. I really wonder how could I do more complicated things, like large byte buffer with variant structures, parsing in Pascal.
willvarfar
Whereas if K&R had adopted Pascal (and tweaked the language to support whatever limitations they ran into when making the OS) instead of inventing C to make Unix, your experience would have been flipped; should C++ have come along, it would be the one with the header translation costs etc?
Wirth went on to create Modula2 and Oberon and make operating systems in them. It is fun to imagine a world where that was the way chosen forward instead of C to C++.
lukaslalinsky
I mostly meant the DOS era, when you accessed hardware directly, there were pretty much no libraries. Further on, if people did not start using C++, Pascal would have to evolve to allow writing the things that were previously done in assembly, and libraries would be done in that language as well. That did not happpen, so C++ won and writing Pascal code was even more complex because you had to brindge the C APIs.
begueradj
That was the era where we had to buy compilers to run C, Pascal ... code. That's why even SQL had (and maybe still has) its own C compiler.
lukeh
INMOS (morally) lives on as XMOS, with its funky dialect of C (XC), which incidentally I quite enjoy.
marstall
what a beautiful story. thanks for sharing, OP. shades of my own youth peeking into 6502land on my AppleIIe in the early 80s.
Also thanks for the Transputer deep dive, TIL!
Love the source code you posted on Github with its Spanish comments.
andrewstuart
The Byte Book of Pascal I think led to the creation of a lot of Pascal implementations.
pjbk
And us poor C folks had to be grateful for Ron Cain's small C compiler that was published in Dr Dobbs, along all its derivatives.
Jaw droppingly awesome :)
Brings up a strong nostalgia from me. Around that time computers were becoming mainstream and available where I was in the UK, and I grew up acquiring old cast-off computers and tinkering. For me there was an 'assembly language masterclass' book (I was a beginner and this was my first serious tech book and I had to sink or swim) that went into a lot of 32-bit programming for the 386 (which I never had) but got me far enough along. It was that and computer magazines which were really programming magazines, which were a thing and quite popular back then.
Remember fondly how transformative it was to move from Basic to a copy of Turbo Pascal 6 and it's asm keyword that I got passed on a floppy disk in the playground.
Ah that was the time when it was just obvious that you could entertain yourself on a computer by creating things, however small, instead of just consuming them.
By the time I got computer games, I was thinking about them as programs not games and I got my entertainment by getting into the modding scene.