Hacker News new | ask | show | jobs
by BearOso 1411 days ago
Worse, QBasic was limited to one segment of 64k, or what Borland called the "small memory model." If the code and inline data was larger it couldn't run.

Many programs would inline machine code and jump to it to get around limitations like that.

1 comments

I thought it might be, but I wasn't sure...

Mind you, in my first job, we had a full professional system, written in GWBASIC.

It was 300-400kB of code, in modules of under 64kB each. There was one big module that set up all the variables, then it loaded the other ones in on top of itself. Variables stayed in memory, so there was no need to explicitly pass values between modules.

All very modular, with a big block of REM statements detailing what would be found in memory, under what names, etc.

It was fast, on a PC-XT class machine with a hard disk. It ran on anything, even with no memory management. The runtime was included with DOS, so the company didn't need to include anything extra.

When my employers started out, they were very small and a copy of QuickBASIC would have cost too much.

This app cost many hundreds of pounds in the mid-1980s. By the end it was £200-£300, bespoke customised for every client.

My boss wrote it and really wanted to modernize it. His boss wouldn't let him. In the end, he quit and started his own company.

I quit that job and went to work for my former boss, who rewrote it in QB4, removing all the line numbers and making it one big monolithic structured app, compiled.

But TBH that didn't add any functionality, made on-the-fly patching much harder, and meant it was up against full-fledged professional apps.

(The niche was that I lived on the Isle of Man, which has unique tax laws. British payroll apps are no use; American ones, worse. But expensive pro-grade apps were very customisable and could be made to fit.)

CP/M only handled 64kB of RAM and that needed to fit the OS too. Lots of business software ran in that space.

TL;DR: you can (or could) write useful professional apps in an interpreter with a 64 kB code+data size limit. Big ones, if you're rigorous about modularity.