Live data from Hacker News

Internals of a Turbo Pascal Compiler

turbopascal.org

21–30 of 106 posts

Re: Internals of a Turbo Pascal Compiler

#21
post #8

Earlier quoted context omitted.

Interestingly I just Googled Borland to see what they do these days: http://www.borland.com/Products Seems like they made quite a major pivot?

I used Borland C++ Builder and their version of it in the XP - Windows 7 days, when they released Codegear 7. As far as I knew many of the developers left after they renamed themselves Inprise ("integrating the enterprise" whatever that means), decided to produce odd products that targeted an entirely different audience and after they ditched all the development work on C++ Studio (I think that was what it was called…

After that PHP editor I vowed to never by another product from them, it was truly awful.

Re: Internals of a Turbo Pascal Compiler

#22
post #17

> Anders Hejlsberg developed Blue Label Pascal... This compiler was later licensed by a software company Borland which added user interface and editor, changed the name to Turbo Pascal and offered it for a competitive price. Nooo... Another account of TP origins was that it was written by Philippe Kahn (the founder of Borland), back when he was just a one-man operation running from a small office on top of a Jaguar c…

http://blogs.embarcadero.com/davidi/2008/11/02/38933

The implementation size breakdown for the 12k compiler was: Compiler - 5.5k, On-Screen editor - 1.5k, Runtime library - 4.5k, and Control program 0.5k.

Re: Internals of a Turbo Pascal Compiler

#23
post #18

Earlier quoted context omitted.

Turbo Pascal was also available on CP/M (so 8080/Z80 8-bit). It was the most powerful language on Amstrad CPC 6128, the only 8-bit low cost computer to offer CP/M compatibility.

> the only 8-bit low cost computer to offer CP/M compatibility. The Commodore 128 also offered CP/M compatibility (through a second CPU...), though rarely used.

You're right, in Europe the Amstrad was less expensive than the Commodore and hence far more popular. The CPC 6128 was probably at this time the less expensive computer to run Turbo Pascal.

The Apple II has an optional Z80 card, but the total price was not for everyone, at least in Europe.

Re: Internals of a Turbo Pascal Compiler

#24
I was working at a software store during the mid-late 80's (Babbages if anyone knows it) and had a customer come in asking for a small, lightweight editor... You know like "turbo pascal but w/o the compiler part". First time I ever heard of it and, tbh, had no idea what he was talking about. I later used it to do some work for in my CS class (highschool was teaching programming via Pascal). It's a good language to learn after basic and before C/C++.

IIRC correctly, TP used a yellow font (well ascii) on a black background (default)? Didn't it also have some quick key combinations (I recall a ctrl+k for some reason but I'm sure it's just memory...)

Re: Internals of a Turbo Pascal Compiler

#25
post #8

Earlier quoted context omitted.

Interestingly I just Googled Borland to see what they do these days: http://www.borland.com/Products Seems like they made quite a major pivot?

Yes, quite some time back they split the languages and compilers part out and the rump of Borland became an application lifecycle management company, or something like that. The bit you're probably looking for is at http://www.embarcadero.com/ now. Some of the old people like David Intersimone are still there. I worked with Delphi for a long time, through versions 3, 5 and 7 (the odd numbers were always better). When…

I've been working with Delphi for the last 18 months; previously Java and .Net many years before that, but Delphi in the distant, distant past.

In my opinion, Delphi needs to just die, and the people/companies that have code bases built on it need to rewrite. There are lots of choices for software development these days, I don't think Delphi stands out for any particular use case in the modern world. But hey, maybe I'm just bitter after RAD Studio crashed on me one too many times...

Re: Internals of a Turbo Pascal Compiler

#26
post #7

I loved Turbo Pascal. When I got to learn C, already had Turbo Pascal 3, 4, 5.5 and 6.0 on my toolbox. Compared with Turbo Pascal, the only thing C had going for it was being available in other systems. Everything else was meh. No memory safe handling, no bounds checking, no units (modules), no namespacing, no proper strings, no OOP support, arrays decaying into pointers, no type safe enumerations, no sets, no generi…

I loved playing with the OO "Turbo Vision" framework back then and getting to learn about OO. Only programming Qt in C++ was equally enjoyable. The modern web is difficult to stand in comparison (though Anders is involved in Typescript).

And that big fat stack of manuals you got with Borland Pascal (which I recall buying used for perhaps equiv of $60 in 1993 - same price as the used 2400 bps modem).

Re: Internals of a Turbo Pascal Compiler

#27
post #12

Turbo Pascal was my first contact with compiled languages in school, after starting off with Commodore Basic as a kid and graduating to Amos and some other Amiga stuff later. TP was my first contact with real PCs, too. After school I moved to Delphi, which was basically a thin wrapper around the Win32 API with Object Pascal syntax and the nicest IDE I had ever used (and probably will ever use). Delphi really paid my…

I think a lot of people would have claimed that the Amiga was the more powerful Personal Computer. In many ways, it was more interesting than the Mac or Windows computers. It simply didn't have the software support from Microsoft, for example.

The Amiga did make its own dent in the universe: http://www.geek.com/games/cgi-first-introduced-to-tv-in-baby...

Re: Internals of a Turbo Pascal Compiler

#28
post #18

Earlier quoted context omitted.

Turbo Pascal was also available on CP/M (so 8080/Z80 8-bit). It was the most powerful language on Amstrad CPC 6128, the only 8-bit low cost computer to offer CP/M compatibility.

> the only 8-bit low cost computer to offer CP/M compatibility. The Commodore 128 also offered CP/M compatibility (through a second CPU...), though rarely used.

All MSX could run CP/M, but this was somehow not much known.

Re: Internals of a Turbo Pascal Compiler

#29
post #19

Earlier quoted context omitted.

Pascal was off time. A lot of these traits are really worthy, but it wasn't attractive at the time .. was it as 'performant' as C too or was it a very nice environment to craft sound code productively whereas C code could allow you to tap into hardware more aggressively no matter how much headaches that would give you ?

Pascal and C compilers produced similar code quality back then. Everyone praises C compiler quality nowadays. On those home computers, C, Pascal and Modula-2 were good enough for general purpose applications, if one wanted real speed, Assembly was the only way to go. Turbo Pascal, as well as any other Pascal dialects, had the same capabilities to access hardware as C offered. Also the MS-DOS game development scene an…

Oh right, I remember inline asm in TP now. I smile at how easy this thing was, I didn't even know how many thing happened under the cover, I just typed so glyphs (I didn't know the language) and hit F5 IIRC. Only recently I heard how they designed the compiler to be so fast you didn't see the build step.

Re: Internals of a Turbo Pascal Compiler

#30
post #19

Earlier quoted context omitted.

Pascal was off time. A lot of these traits are really worthy, but it wasn't attractive at the time .. was it as 'performant' as C too or was it a very nice environment to craft sound code productively whereas C code could allow you to tap into hardware more aggressively no matter how much headaches that would give you ?

Pascal and C compilers produced similar code quality back then. Everyone praises C compiler quality nowadays. On those home computers, C, Pascal and Modula-2 were good enough for general purpose applications, if one wanted real speed, Assembly was the only way to go. Turbo Pascal, as well as any other Pascal dialects, had the same capabilities to access hardware as C offered. Also the MS-DOS game development scene an…

I think people who were using computers in the 1980s have their baseline for speed as Assembly and anyone from the 1990s on have C as their baseline of speed.

Man I hated reading or figuring out other's Assembly code and Turbo Pascal was a dream in comparison (And Fortran also)

Post reply on HN