Hacker News new | past | comments | ask | show | jobs | submit login
The Power C Compiler (mixsoftware.com)
129 points by pseale on June 4, 2022 | hide | past | favorite | 75 comments



The first C compiler I used! I found a bug where if you allocated arrays larger than 64K (using far pointers of course) accesses would wrap around at 64K. I guess they didn't implement far pointers correctly. Anyway I sent them a bug report with a reproducer as a typed letter -- from the UK to the US -- including an international reply coupon[1], and they were kind enough to send me an update to the newer version on a 5.25" floppy. It fixed the problem.

[1] https://en.wikipedia.org/wiki/International_reply_coupon


Maybe the compiler didn't implement the HUGE memory model, only the LARGE memory model? https://devblogs.microsoft.com/oldnewthing/20200728-00/?p=10... has an overview that appears to match what I remember from those times.


Glad they fixed your issue, but I wonder if they also had a stack of "closed: wontfix" postcards.


That sounds to me like the far pointer was used to set the segment number, and the pointer offset isn't added back to the segment number as that'd be slow. Sounds like a sensible implementation to me though of course it's unexpected


I love these types of stories. I can definitely relate as I’ve traded games etc on floppies, but by the time I started developing software professionally, there was internet, ftp etc. Someone ought to create a film about the Apollo launch or some other pre-internet achievement and focus on these bits of the problem


This is like opening a time capsule and examining all the little details. Almost more interesting than the barebones, locked-in-time product page for a paid C compiler, is the locked-in-time cgi-bin-powered shopping cart page at http://www.safepay.net/cgi-bin/shop/cart.cgi?db=products.dat... (note it's an http link).

There's a whole host of old-school relics here--it is truly a blast from the past: paying separately for a debugger, paying for specific libraries, videos available on DVD.

It's really hard to express how deeply internet access has changed the landscape of ... well, everything, but in this particular case, the programming ecosystem. gcc probably existed back when I bought this compiler, and probably so did Borland's excellent pre-internet-era IDE, but I didn't know that. And so I bought this one.


Discovering DJGPP (DJ's GNU Programming Platform) on a CD from a computer magazine literally changed my life.

I can't remember the year, but I had a Pentium 100MHz at home (with CD, which back then was optional).

You are absolutely right. There were tools, but knowing about them was a different story!


Having to pay for a compiler sounds a little funny through the lens of 2022; I wonder if the majority of people buying these software/packages at the time found the idea strange, too.


It was just the way things were back then. Compilers were expensive too. In the late 80s I saved up my allowance money for months to buy a Modula-2 compiler for my Atari ST. I still remember reading the manual on my way home from the city, floppies in hand.

In the 80s there was a vibrant shareware & public domain scene, but 'open source' wasn't nearly what it is today, and shareware & PD things were mostly utilities, etc. That really took off in the early 90s with the advent of Linux, the Internet, FTP sites. Some of the GNU stuff existed in the late 80s but was mainly only of use to academics until Linux came on the scene.

The upside of the way things were is that lots of people seemed to make somewhat reasonable livings as individual businesses selling software they'd made. People who would be sinking their time into open source projects now were often sinking their time into software that they sold by mail order or through user groups, etc.


The other thing I remember about 80's compilers is a lot of the vendors wanted to drink your milkshake too. They had licensing fees for every unit you shipped. Basically meaning they wanted a cut of your gross revenue.


To be fair, this particular compiler was relatively cheap. The number £30 springs to mind (which included the book), but I'm not sure if that was the price or just my faulty memory. The internet wasn't a thing for home users in 1989.

Only a couple of years later I had access to the internet and was downloading DJGPP. Fun fact is I now work with DJ.


Yeah, I noticed that, too. $20 for a compiler seems ridiculously cheap, even for 30-40 years ago prices. I would have thought it would be more like $200.


> Fun fact is I now work with DJ.

Would you mind to tell us what you do? I can only imagine legacy or a mix of legacy and highly specialized niches using DJGPP nowadays.


DJ is a well-known compiler developer at Red Hat who is also working on Arm and RISC-V support (https://www.delorie.com/users/dj/). I work at Red Hat on Arm & RISC-V (amongst a few other things).


Ah... right... you work with DJ, the person!

I thought you used DJGPP on your work.


Not at all. At the time, only people at universities and major tech companies had access to the net and what little free software existed.

The Borland and Microsoft compilers costs hundreds. Power C was a godsend to impoverished students, and as noted by others, the book alone was worth the price they were charging for the whole package. It was just outstanding.

While I did have access to the net, it was only over a 1200 bps dialup modem. Downloading something like gcc over that took...a while. The alternative was to bring a stack of floppy disks to school, and laboriously split anything big into chunks that would fit on a floppy.

I still remember when a friend of mine who worked for the university computer labs took the trouble of downloading all the floppies (> 20, IIRC) that let you work your way up to having a running version of this weird Finnish thing called "Linux" (the term "distro" didn't exist then). I got him to make me a set, and never looked back.

Even if you did have gcc, at that time it didn't support a lot of the stuff you needed to make professional-level MS-DOS software -- none of the graphics functions to build what passed for a decent UI at the time, no memory models (which sucked, big-time, but you needed to use and understand them), etc.

I still count Power C to be among the wisest purchases I ever made, along with a copy of K&R 1st edition. Between those two, you were golden.

This concludes this edition of crochety grandfather talking about "In my day". :-)


I bought it at the time, somewhere in the 1990's. No internet and no cell phones at that time. Buying a box with floppies or cd was normal, even for an OS or basic tooling. Open source was out of reach, I didn't even know about the existence of the concept.

It came with a thick book, the reference manual for all C functions. That book alone was worth paying for.

Mix C was not that great, it miscompiled stuff on a regular base. I debugged a problem for a day before finding out the compiler sometimes flat out ignored basic constructions like i++

One day I found out about djgpp, and even it cost me as much as Mix C in phone costs, I never looked back. Quality was so much better. Still used that reference book a long time, though.


I owned it also, and agree, the book was worth twice the asking price, must have kept that book for 10 years at least.


> Having to pay for a compiler sounds a little funny through the lens of 2022; I wonder if the majority of people buying these software/packages at the time found the idea strange, too.

Nope. I have, right here on my desk somewhere[1], the CDROM for the Watcom C/C++ compiler that came with an IDE and the watcom assembler wasm. IIRC correctly, the IDE had a Vi mode and it came with a make that was much better than the nmake from Microsoft.

I remember buying it for a relatively large sum back in 1996 or so. I did not think it strange to pay money for a C and C++ compiler + assembler that allowed me to produce Windowed applications, device drivers and netware modules, that came with an IDE (with Vi-compatible bindings), as well as make.

There was tons and tons of documentation as well (Windows help files), more than I'd ever seen before in my life. It had enough documentation on that disk to take you from "Never used C++ before" to "expert C++ developer". It assumed that google and stackoverlflow did not exist, and so it answered any question you could possibly have had.

It also had samples for all the major things, so you could easily start a device driver project (for example) just by copying the samples.

Honestly, it seemed like great value for money to someone who had no internet.


> I wonder if the majority of people buying these software/packages at the time found the idea strange, too.

Not at all. Pretty much all software at the time was commercial or, at most, shareware. Pre-web, selling binaries to people to run on their computers was just how one made money as a software developer.

That professional tools in particular were fairly expensive software packages (CodeWarrior, a few years later, was several hundred dollars. Power C was dirt cheap at $20) seemed completely normal. A carpenter isn’t handed a full workshop worth of saws and chisels gratis, after all. If I wanted to be paid to make software, just as obviously the professionals who made the compiler did, too.

(it’s really difficult to convey how incredibly good all of the documentation and examples that came with some of these products were, too. Think C (back when symantec sold compilers and wasn’t a fourth-rate antivirus vendor) came with thousands of pages of physical manuals teaching you everything from the fundamentals of programming to exhaustively documenting their libraries, with wall charts of class hierarchies etc. Pre-internet this stuff was worth it’s weight in gold)


Paying for compilers was very normal. In the early 80's I paid for the Realia COBOL compiler for MSDOS and paid for a screen library, ScreenIO, that generated full-screen (80 chars x 25 lines) applications. I had already written a film scheduling app for a client on a minicomputer and they were getting charged for time on the mini. Buying the PC and paying me $5K + annual maintenance was going to be cheaper than paying for minicomputer access.

I had to buy a dev PC: a PC-AT 286 with a toggle switch on the back that allowed it to run a 6MHz or 8MHz; a 60MB Priam hard drive - one of the fastest available; and I think it had 2MB of RAM, though of course you could only use 640K with the rest usable as a RAM disk or disk cache. I think it was around $2500. For reference, IBM's PC-AT system at the time (1984) was $4K-6K with a 20MB drive:

https://en.wikipedia.org/wiki/IBM_Personal_Computer/AT

The Realia compiler was something like $1200 and the screen library was around $450 I think. They're apparently still selling ScreenIO, though now for Windows:

http://www.screenio.com/purchase.htm

Computer Associates bought the Realia company, abandoned the product, and focused on porting mainframe COBOL applications to the PC.

I didn't make much on the initial deal, but charged $500/year for maintenance and they ran the thing for over 15 years. My main goal was to get a fast PC: I had been reading Byte and PC Magazine for a few months and this was a way to get one without me plunking down a lot of cash.

I think it's kinda cool that a small company like Realia (out of Chicago) could create something like this and have a functioning company for many years with paid employees. Yeah, open source is great in some areas, but in some ways it is not so great. A few geniuses could not have a sustainable compiler business these days, no matter how great the software.


Turbo Pascal was a bargain at $49 when it was introduced, and remained a bargain as the delay loops were removed from the compiler (according to rumor), and features were added. Delphi at $200 was still a good deal... then the price shot through the roof.

Oh, and it had a REALLY good manual and online help.


> Delphi at $200 was still a good deal... then the price shot through the roof.

The cheapest non-upgrade version of Delphi was at $100 (you can find it on archive.org) and was that until Delphi 5 or so i think. Later they made that version to be for personal use only and (i think) upped the price for the next bracket and after that they made the personal version free - but only of Delphi 7. After that everything went crazy expensive, until Turbo Delphi, which IIRC had two versions, one free that allowed commercial use but didn't allow installing custom components and a "cheap" (compared to the other versions) $500 version that allowed it, but it was based on the most unstable version of Delphi ever and CodeGear killed it anyway. In recent times they have the "Starter"/"Community" free edition but the license requires that you only have something like $5k / year income, otherwise you must buy at least the next bracket that is around $1700 or so.

Funny how when the entire programming tools industry was going towards more accessible tools, Borland/CodeGear/Embarcadero went the complete opposite direction.


That is what reduced it to its current niche, and made many of us suck it up and move to the less capable Microsoft tooling (MFC vs OWL/VCL, really?).

They decided to go after the enterprise market with enterprise prices, and with it killed the indie devs that were loyal to Borland and their great tooling.

It was also a key point that finally triggered Anders to accept the calls from ex-Borland colleagues working at Microsoft.

https://behindthetech.libsynpro.com/001-anders-hejlsberg-a-c...


Just yesterday I commented to a clerk at a used bookstore that hers was probably the only one in the U.S. with 3 Turbo Pascal books.


I don't think so. What I remember is that compilers and other developer tools were expensive and that was normal. Real "professional" tools but also beginner stuff like Visual Basic. Though as a teenager I remember pirating them.

Free software and open source did a lot to change that. GCC for example. Linux becoming popular also helped. Then as interpreted languages became popular, with perl, python, etc., all free and under permissive licenses. Java was free for personal use then with commercial licenses IIRC? Even Microsoft started having "express" editions or compiler-only without IDE. I'd say by the 2000s decade compilers were no longer a cash cow.


I remember reading a blog post years ago (don't remember where or by whom, unfortunately) that claimed the compiler market was also eroded from the other end - many small-ish companies building compilers were acqui-hired by large companies trying to improve the performance of their RDBMS, so the compilers those companies produced often ended up as roadkill, or if lucky, were open-sourced (think OpenWatcom).

But maybe it just turned out the real money is in the tools - you can get all of Microsoft's compilers for free, but they still charge you big $$$ for Visual Studio, and lots of developers apparently are happy to pay that price. Intel still charge big bucks for their compiler, but I have no idea how widely used it actually is or what Intel's thinking is.


I seem to recall that the free compilers from MS have (or used to have) limitations in the license about commercial use. If you use it for a popular product they may want money from you.


I was around in that era and having to pay for assemblers, compilers, etc... didn't sound strange at all. What was also a reality was the difficulty of actually getting them if you were far away from the US (Spain in my case). The world was way bigger back then in so many ways.


Maybe not for the compiler, but you pay though your nose for almost everything else!

Look at how Microsoft is pushing everyone to the Cloud, including desktops. All their developer products are wholly focused on pushing your workloads to Azure.


Because the only way to make money selling software to devs in 2022 seems to go back into timesharing days, with phosphor terminals and X terms now replaced by the browser and cloud shells.

Any old timer can map those cloud prices to the oldie mainframes workloads accounting.


You get what you pay for, for example an actual printed book explaining the product in detail. What will one get with an $0.99 mobile app today?


A while ago I watched a video on YouTube about a guy reviving an old rs6000 workstation from ibm, running aix, with the ultimate goal of running doom.

When it talks about compilers, the c/c++ compiler suite was price at like 4 k$… although supposed/allegedly (that is, according to ibm marketing) it won over 4x over gcc (in the performance of the generated code i guess).


They still do, many HPC systems make use of XL compilers.

https://hpc.llnl.gov/software/development-environment-softwa...


This was very common. I remember asking my parents to buy me a C compiler for Christmas, back in the early 90's. (Lattice C on the Amiga. It later became SAS/C!)

I think it was at least half a dozen floppies. It also came with a huge set of documentation.


Around the mid 90's I bought the Dice C compiler for the Amiga. I think it came with a book(?) I was really happy with the price. It was on a special markdown price. I counted it as one of the best purchases I ever made. I was doing a PhD in Applied Mathematics at the time, nearly all in Fortran. But I was interested in C. It turned out that me learning C was a great decision as it led to me being a professional programmer.

I think the Amiga collapse not too long after I bought the compiler. Maybe the declining sales of the Amiga is what the authors decide to sell the compiler relatively cheaply. Matt Dillon wrote the compiler, and subsequently went on to create DragonFly BSD.


Yes, I remember Dice! I believe there was also a free version, with limited features?

I still look upon my "Amiga years" fondly. I moved to Linux in late 1994...


It was not strange. Working with niche compilers was normal and high prices were expected. Even as a student I shelled out what would have been pretty significant money at the time for Borland C++.


Back in 1992 I bought Turbo Pascal for Windows 1.5, followed by Turbo C++ for Windows 3.1, for around what would be 100 euros in today's money, by making use of their student prices, also available to highschool students.

I hat to get the money from different kinds of gigs while at high school.

Still, it is goes with your point, as the minimum wage would be around 300 euros when converted to today's money, if I get the proportions right.

However that is because I wanted to have the real deal, boxes, manuals and so forth, on a street bazaar those floppies would have been more accessible, as it was still the days when piracy reigned, and there wasn't any government agency checking on software licences compliance.


It was a major motivation for me to get into Linux when it started.

Until then I couldn't afford Lattice C for the Amiga or whatever was available for MS-DOS. (as a poor student)


Ironically it was Sun that triggered the GCC adoption, by splitting Solaris into user and developer editions, quickly followed by other UNIX vendors.

Until then, very few cared GCC existed in first place.


I worked in automotive for a couple of years. They still spend a lot of money for certified C/C++ compilers.


This raises a host of other questions. Does Mix Software still exist? Their product catalog does not appear to be updated in the last ~20 years (owing to a Y2K compliance statement prominent on the front page), so unless they have a side business not listed on their website, it seems unlikely they’re still in business. Surely nobody’s still buying their compilers or training materials on VHS.

If they’re gone, who’s still paying the bill for hosting, and why? Just for fun to preserve a time capsule? Did they prepay for hosting for 30 years, and the site will disappear one day?


Checking Texas's CPA system, it seems like the company is (formally) active. The domain is registered at GoDaddy and it points to an IP in DigitalOcean's space.

If I had to assume, they probably still have some limited sales, support and consulting (ex. schools with teachers used to old software? companies with unusual development environments?).

While looking for Mix Software, Inc., though, I found their official(?) YouTube channel with the introductions for their C [0] and C++ [1] courses uploaded 8 years ago. They definitely have that old 90's VHS feeling to them, complete with music, early 3D animations and everything.

It would seem that the MIX C compiler for CP/M 80 got preserved at some point, too! [2] I'd need to look into it, but this looks promising.

[0] https://youtu.be/ikTh2JQbkls

[1] https://youtu.be/wAm3CKoJW3o

[2] http://www.cpm8680.com/mix/index.htm


I just ran across my 3.5" disks for this along with some of the support tools! Finding this book in the mall bookstore and seeing the ad in the back was a revelation for me. Best $20 I ever spent.

I wanted to learn how to make .exe files but at the time had no resources or contacts on how to even start. This book and compiler was what launched my entire career.

It allowed you to do inline assembly as well which was a lot of fun on an old DOS machine. I'm pretty sure my brother and I hit every possible way to lock up the computer or have it spontaneously reboot since we didn't really understand memory management. Lots of fun trying to make video games and putting the vga card into Mode13 or ModeX as well. Good times.


The goodness was actually the book. The writing was simple and clear, the examples were self-contained and practical. It was a perfect textbook. Many years ago I gave my tattered copy to a second-cousin when he was about 15 and it totally changed his life; he became a coder and never looked back.


>The goodness was actually the book. The writing was simple and clear, the examples were self-contained and practical. It was a perfect textbook.

Very True.

All documentation that came with the then OSes, Toolchains etc. were top-notch. Far better then many of the textbooks being published today. I still have a volume of early C++ papers (some authored by Stroustrup himself) which came with the SCO Unix C++ toolchain. That was the first place i learnt about "C++ Internals" i.e. vtables etc.


I remember learning C from this when I was a teen. The advice at the time was buy the package, throw away the compiler and use Turbo C, and then learn from the Power C book which was the best resource available.


> binary coded decimal floating point routines and financial functions for calculating the time value of money, depreciation, etc

Wow what was the utility of BCD for these applications? My only experience with BCD is with RTCs. I always assumed that the RTCs had been designed for driving a simple display like 7-segment lcd. But doing floating point in BCD? I guess the 8087 wasn't common yet but maybe soft float using twos complement wasn't common either?


Financial calculations need to be done with fixed-point, not floating-point, arithmetic. Floating-point can't store the exact value of most fractional numbers, and especially over many transactions for many customers the floating-point errors will accumulate.

You need basic addition and subtraction to always be exact (e.g. $15.27 + $91.31 needs to come out as $106.58, not $106.5799999999999999999998), and for operations that may have remainders beyond your desired number of digit precision, you need deterministic rounding or other rules to handle it.

If you're ever writing any code that handles money, DO NOT use just naively use float and double types in your code!


Why would you ever want monetary amounts as fractions or any kind? Why would you want to separate dollars from cents? Just represent them in cents or other smallest units ($15.27 would be 1527), and only make the distinction between dollars and cents for human-readable output. Problem solved. I don't understand what BCD would solve here vs plain binary integers.


> Why would you ever want monetary amounts as fractions or any kind?

If you can exchange arbitrary currency (and other commodity) in specified whole units with no other restrictions, then if you need to track prices, the prices need to be tracked as arbitrary rational numbers.

BCD is, of course, inadequate for that, but it's the most general reason for why monetary amounts may need fractions, IMO.

BCD does mean that when the requirements change from “we need to track to the cent” to “we need to track to the mil”, you change one constant as to the minimum allowed precision, and no other code or existing data. Whereas “use integer multiples of the minimum unit” makes that messier. Also, if you have different minimum units in different parts of an enterprise, using BCD makes sharing between them easier.


When currencies are represented as integers you have trouble doing transactions in multiple currencies.

Floating point is out of the question, so division, multiplication, etc was more accurate in BCD than in integers when different currencies were involved.


as soon as interest or taxes are involved, you'll end up with fractions of cents. Or if you want to split an uneven amount between people.


Actually it's worse than that; they're talking about decimal floating point, which appears to work in obvious tests - $15.270 + $91.310 is $106.58. But (assuming 5 mantissa digits for example, but it works with any number), you can do the following:

  balance   91.31 [+291310]
         +1000.00 [+410000] temporary credit
  balance 1091.30 [+410913] ULP lost
         -1000.00 [-410000] temporary credit deducted
  balance   91.30 [+291300] successfully stole 1 cent
  repeat on each account/transaction/etc
Real examples are obviously less blatant than this, but you get the idea.

Decimal floating point should never be supported for anything in any capacity, and use of any floating point in financial software should be considered material proof of either gross incompentence or negligence, or intent to commit fraud.


“Financial functions for calculating the time value of money, depreciation etc” isn’t “handling money” and is perfectly fine to do in floating point. Essentially everyone out there does it in Excel or Python.


Can you recommend some good comprehensive books on fixed-point, big num Maths with code examples in C/C++ ? If it has practical applications showing usage that would be even better. I am interested in knowing how you get precision in Computers both by using floating-point and by substituting it with equivalent fixed-point representations.


Soft float was only available if your application was compiled with it, and dog slow in any case.

Fixed point was still common: Take an int and pretend the first X bits are after the point. You have to choose X wisely, so you have enough bits available both before and after the dot. This at a time when 16 bits was the common int size.


> Wow what was the utility of BCD for these applications?

In financial spaces I used BCD extensively. Especially on embedded. IIRC, most of the older banking messages used BCD as well (card acquirer -> card issuer messages).


I used to teach C Programming using the Power C compiler at a local community college. It was a nice enough compiler that the students then owned so that they could continue to experiment and learn.

I found a couple of things to not ring true in what I'd read about the compiler, though. There were issues around a lack of error messages when students would send incorrect parameters to a function. If I remember correctly, I think that one could transpose the arguments in a call to fprintf() so that the FILE * reference was not the first parameter. A few of my students put a format string at the front, a few parameters, and then the FILE *. I believe that the version of Power C that we were using did not flag this as invalid. I question the ANSI compliance claim because of this and a couple other odd issues.

The other thing that didn't really ring true was the often-quoted line about loving the book and throwing away the compiler. Really, the book wasn't that great, in my opinion.

I do believe that one received more than their $20 worth of value from the offering, though. It was a nice enough compiler with a decent book.


What a blast from the past!

I loved Power C. The paper manual was quite amazing - imagine all the man pages, but informative with examples and superbly written. I kept using that manual for years until it quite literally fell apart, purely because it was so good.


This was the compiler I learned to code on - $20 was great for a student budget. If you click through the pages you can also find their database toolchest which is a great introduction to btrees and managing storage.


I bought and used their Database Toolkit back in the day. Far more than adequate for the job at hand. I've looked, and it's actually hard to find just a simple B+Tree library out on the internets today.


The little ISP I started back in '93 used the Mix DB for our accounting system. We wrote a Perl lib for it (that was turned it into a client/server type architecture.) It was GREAT.


I cringe when I look at this. Everything was sooooo primitive back then! We've become spoiled with programming languages like Rust, C# and Python, almost all of which are free to use.

Except for the fact that I was 30 odd years younger and had a beautiful girlfriend, I don't long back for those times.


I may very well have used this in college some 30 years ago on a 286 DOS machine.

IIRC I managed to blow the stack with a recursive function 6 calls deep. Shortly after, I got a 486 and installed Linux (gcc worked much better)


> The manuals (if any) that accompany our competitor's products are terse at best.

So they didn't compete with Borland?


Never heard of it.

Back in the late 80's Portugal it was either Borland or Microsoft for MS-DOS, eventually we also became aware of Watcom, Metaware and Symantec.


That looks like the Go logo. Did the Go creators reuse one of the C logos? (Yes yes, Unix lineage)


Nope, first they started with Gopher that was based on Glenda.

https://9p.io/plan9/glenda.html

Then because it wasn't deemed professional enough, a marketing campaign was created for the current logo.

https://go.dev/blog/go-brand


The Gopher is the mascot, not the logo, always has been. The original Go logo was this: https://go.dev/blog/gopher/logo.png


> The circular shape of the letters hints at the eyes of the Go gopher, creating a familiar shape and allowing the mark and the mascot to pair well together.


I think I used Microsoft, Borland and Wacom compilers under DOS/Windows 3.x.


I'd love to see the VHS tapes with lessons that teach you C


Isn't there a decent chance that they're somewhere on YouTube?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: