Live data from Hacker News

Turbo Pascal: A Great Choice for Programming Under CP/M (2013)

techtinkering.com

51–60 of 118 posts

Re: Turbo Pascal: A Great Choice for Programming Under CP/M (2013)

#51
post #8

Hmm, I started reading the Wikipedia article on the Pascal programming language. I was reading about the pointer types and saw a 'with' statement... Where did I see something like that before?... Yes, JavaScript! Where it is highly discouraged to use. How is it like in Pascal?

C++ class scopes have the with problem. class foo { // int x; int y; int bar(); }; // in another file int x; foo::bar() // "with whole friggin class scope ..." { return x + y; // global ::x plus class member y } Now uncomment the x in the class declaration, and the x + y now adds two class members.

Which is why C++ has a global scope operator.

Re: Turbo Pascal: A Great Choice for Programming Under CP/M (2013)

#52

The first software "product" that I sold was created using Turbo Pascal running on DOS. I was in high school at the time. It was designed for an Orthodontist who wanted to input (using a tablet with a cross-hair "mouse") about 20 points from an X-ray of a patient's head, then perform some calculations on the geometry to predict how the jaw bones and teeth were going to develop as the patient gets older. To this day I…

I used to feel this way, and I wanted to rekindle the fire I felt when I was younger and absolutely in love, mesmerized with writing software. After a few years of that, I went into the professional world, and can relate to how you and others in this thread feel, about the dullness and lack of satisfaction. I remembered those times, though, and I kept looking for something to do. I realized what the difference was: B…

Yeah, back in the days I was in the demoscene, coding for fun. 25 years later, I started coding demos, on Apple 2 (yep, that old machine I had when I was kind). You can call it nostalgia, but hey, that's coding for fun, pushing the machine to the limit, taking time to optimize for speed or memory instead of customer's satisfaction. Plus you get to meet other passionnated people, like before.

So yeah, it's somewhat "going back", but at least, I can express creativity in some unbounded ways. Plus, I code my dream, not the dream of the company which is paying me :-)

Re: Turbo Pascal: A Great Choice for Programming Under CP/M (2013)

#53

Turbo Pascal is great and I love the fact that it uses the Wordstar key combinations. I wish that there was a version for 8080 but I understand why they went with the Z80. Borland went on to create Turbo Modula-2 for CP/M which was very similar to TP but with lots of language enhancements and faster execution time of the resulting binaries. However, it was released quite late in 1986 and quickly withdrawn.

It's been a long long long time since I heard anyone opining one way or the other on the classic 1970s dilemma of whether to stay compatible to the 8080 or use all those cool new Z80 instructions considering that the Z80 was kicking Intel's butt in the 8 bit CPU market!

It's mainly that I just prefer programming in assembler on the 8080/8085 - it's easier to fit the instruction set neatly in my head. The 8085 is also much easier to emulate and I like the ease of interfacing it with hardware. This preference tends to colour everything I do on CP/M.

Re: Turbo Pascal: A Great Choice for Programming Under CP/M (2013)

#54

Earlier quoted context omitted.

It's been a long long long time since I heard anyone opining one way or the other on the classic 1970s dilemma of whether to stay compatible to the 8080 or use all those cool new Z80 instructions considering that the Z80 was kicking Intel's butt in the 8 bit CPU market!

It's mainly that I just prefer programming in assembler on the 8080/8085 - it's easier to fit the instruction set neatly in my head. The 8085 is also much easier to emulate and I like the ease of interfacing it with hardware. This preference tends to colour everything I do on CP/M.

I understand. So many years ago I built a fast CP/M emulator using a novel scheme. How did it go now, I remember; lodsb mov ah,al jmp ax. So just three instructions none of which affected the flags. So no need for lahf/sahf. The downside was that I needed 64K to sparsely store my opcode emulations. Opcode 0x00 at 0x0000. 0x01 at 0x0101. 0x02 at 0x0202 etc. In each case the code would just be the direct emulation of the 8080 opcode followed by lodsb mov ah,al jmp ax. Opcode 0xff was a manageable problem. But yes, I just did the 8080 instructions, and I remember now that most CP/M software was fine with that, the Turbo Pascal software was an exception.

Re: Turbo Pascal: A Great Choice for Programming Under CP/M (2013)

#55
post #52

Earlier quoted context omitted.

I used to feel this way, and I wanted to rekindle the fire I felt when I was younger and absolutely in love, mesmerized with writing software. After a few years of that, I went into the professional world, and can relate to how you and others in this thread feel, about the dullness and lack of satisfaction. I remembered those times, though, and I kept looking for something to do. I realized what the difference was: B…

Yeah, back in the days I was in the demoscene, coding for fun. 25 years later, I started coding demos, on Apple 2 (yep, that old machine I had when I was kind). You can call it nostalgia, but hey, that's coding for fun, pushing the machine to the limit, taking time to optimize for speed or memory instead of customer's satisfaction. Plus you get to meet other passionnated people, like before. So yeah, it's somewhat "g…

Nice! I decided to go back to the old Web days and write something which really does work in ANY browser.

So far, I've reached back to Netscape 2.x and Mosaic :)

Re: Turbo Pascal: A Great Choice for Programming Under CP/M (2013)

#56

Turbo Pascal is great and I love the fact that it uses the Wordstar key combinations. I wish that there was a version for 8080 but I understand why they went with the Z80. Borland went on to create Turbo Modula-2 for CP/M which was very similar to TP but with lots of language enhancements and faster execution time of the resulting binaries. However, it was released quite late in 1986 and quickly withdrawn.

I was the co-author of Turbo Modula-2 for CP/M. It was quite a capable system to fit in less than 64K. Great memories.

At the time Borland intended to develop their own version of Modula-2 for IBM PC, so they bought ours as a complement for the CP/M versions they were still covering. But the in-house version got delayed a lot. It was eventually released as Topspeed Modula-2 several years later, from a spinoff. If Borland had let us also do the IBM-PC version in around 1984, maybe history would have changed and Modula-2 would have become more popular.

Re: Turbo Pascal: A Great Choice for Programming Under CP/M (2013)

#58

My first computer was an old PC XT, ancient even by the undemanding standards of 1995, but cost under 100 USD - which counted a lot in early post-Communist Central Europe with average wage in the 250 USD territory. I did a lot of Turbo Pascaling on that one, but it was frustrating watching the compiler go so slooowly while I already noticed a misprint or a missing ; on the screen. The last thing I did on Turbo Pascal…

> but the differences between individual VGA cards were too big.

Buyed the programming manual for the ET4000 GPU (>100DM for this manual alone, a lot for a student from the eastern part of Germany at this time), opcodes and all. I liked the possibility to easily mix Assembler with Pascal in Turbo Pascal. Machine code for graphics, FPU, interrupt programming, the higher language for anything else.

After that, I learned C from the Open Source Fractint. So, the transition wasn't that painful after TP's decline.

And anything was so snappy in Turbo Pascals text mode windowing system (as with Norton Commander too).

Re: Turbo Pascal: A Great Choice for Programming Under CP/M (2013)

#59

It seems like the "modern" way to write Pascal would be with FreePascal ( https://www.freepascal.org/ ) and the Lazarus IDE ( https://www.lazarus-ide.org/ ) both of which seem like stable, open and capable projects. That said, i'm afraid that modern Pascal isn't awfully popular, which hurts its practicality a bit (e.g. learning about it, finding tutorials and others' experience with it, getting help). However, it's a…

The most powerful and stable web framework is mORMot, it supports both FPC and Delphi. Here is its version 2 in development: https://github.com/synopse/mORMot2

I use Delphi all the time, IMHO, it's the best tool for Windows desktop app development - concise language, blazing fast compile time, easy UI design, flexible UI framework, all-in-one IDE, and so on. It's such a joy to me :)

And here is my new desktop software written in Delphi: https://docxmanager.com/

Re: Turbo Pascal: A Great Choice for Programming Under CP/M (2013)

#60
post #25
post #9

I really wonder how Pascal and the Pascal family of languages, including modula/oberon and ada, how they became niche and how java and c++ took over the world?

Easy answer, UNIX mass adoption. Long answer, UNIX spread like fire, because Bell Labs/AT&T initially weren't allowed to sell it. So the code was given to university, and while they needed to pay for a UNIX license to use it, the price was symbolic versus paying for something like VMS. Which naturally made UNIX the number one choice for the startups trying to get into the Workstation market during the 90's. So C star…

> Easy answer, UNIX mass adoption.

On Unix mass adoption...

My best friend (and still best friend to this day) in the early 90s had an SGI Indy at home (his stepfather happened to be the director of SGI Benelux) and so I got to play with one of the earliest SGI Indy. What a machine to have, for teenagers into computing, at home in the early nineties!

The shock, the world of difference between a beige box running MS-DOS / Windows 3.1 and stuff like (Turbo) Pascal compared to that amazing SGI workstation...

I saw the future, I saw "my" future when I got to play on that SGI Indy. And then when I discovered Linux (back when it was shipping on a CD attacked to a book/magazine) I got to transform my MS/Windows beige PC into a (modest) Un*x station and never looked back (I'm using Linux daily since that day).

I don't have bad memories of programming in Pascal but both Pascal and Delphi felt, to me, like deeply attached to the MS ecosystem and a bit toy'ish (making it easy to do easy things, but very hard to make anything a bit advanced).

As soon as I found a way out of the MS world I was out and so I was done with Pascal/Delphi.

Post reply on HN