There are a lot of retro-computers with BASIC as an integral part of the operating system. The IBM 5100 was one of the first computers with a separate memory space for BASIC, followed by the Commodore PET, Apple II and TRS-80.

But why was BASIC built into their operating systems, using memory? From this memory map, the Commodore 64 had memory completely reserved for BASIC. There were computers, like the Altair 8800, that provided BASIC as software that could be loaded into memory when necessary, and these computers both worked and sold well.

So why was BASIC built into so many computers' operating systems?

  • 12
    I don't know the answer to your question, but I thought it useful to point out that in many 8-bit systems (at least, those with 64KB of RAM), the BASIC ROM can be disabled. Thus on the C64, bits 0 and 1 of the byte at address 1 in memory need to be set to 1 for the BASIC ROM to be visible, otherwise RAM is available in the BASIC area (A000-BFFF). 8-bit Ataris have a similar mechanism. – Stephen Kitt May 11 '16 at 20:32
  • 6
    @StephenKitt Now that is clever. I suppose there isn't as much downside to having it on there if you can disable it like that, so it's more of a case of "why not?". – wizzwizz4 May 11 '16 at 20:37
  • 5
    Exactly — but why was BASIC expected to be provided on computers then? That's an interesting question too... (The expectation lasted quite a long time, even early IBM PCs had BASIC in ROM, and of course MS-DOS provided GW-BASIC and later QBASIC.) – Stephen Kitt May 11 '16 at 20:43
  • 10
    in many cases, BASIC was the operating system... – Radovan Garabík May 13 '16 at 8:31
  • 9
    If basic was not provided, what did you expect people to do to get software? Buy it? From whom? People that programmed huge commercial machines? No, it had to be possible to make your own programs, right away. – doug65536 May 17 '16 at 10:10

18 Answers 18

up vote 62 down vote accepted

Having a programming language built-in gave you a multi-purpose tool into your hands at the flick of a switch (power on).

As to the choice of BASIC vs. other programming languages, microcomputer BASIC dialects are - despite some of their shortcomings - quite accessible to novice programmers. They are a bit like using English in an imperative style ("PRINT this", "DO that"), so not hard to learn. There was a lot of BASIC literature around at that time and sufficiently general example programs could be ported to different systems without too much work. Many other languages are more cryptic to someone not used to it.

As they were usually included on the ROM chips, they didn't take away any RAM if you chose not to use BASIC.

  • 13
    Keep in mind that these computers didn't have an OS (like today's). You turned it on, and wanted to do stuff, but there was no "command interpreter" by default. What you had was a cursor. If you wanted to run something like a batch file you needed an interpreter. BASIC served that function. Think of it less as a language and more like a set of built in commands. – coteyr May 12 '16 at 19:20
  • 3
    Yeah I agree with that. I would rather write a few statements in BASIC then FORTH or ASM or just about anything else available at that time. – coteyr May 12 '16 at 21:11
  • 2
    @crosiKa, you have it all wrong, You take disk access for granted. This things didn't have any kind of perminate disk. ROM and a floppy was common. Man man was that floppy floppy. – coteyr May 14 '16 at 2:33
  • 4
    @coteyr "Think of it less as a language and more like a set of built in commands" Exactly! That's the role Bash for example fills for a lot of *nix systems nowadays. I think most systems that didn't use BASIC had some kind of alternative. – Kevin May 15 '16 at 8:01
  • 3
    @coteyr of course, many of them didn't even have floppies, just tapes. Tapes that you played using an ordinary audio casette deck, complete with screechy noises as the data stream came out through the speakers. – Nathaniel May 15 '16 at 11:15

Having BASIC available for the machine was a selling point so early adopters wouldn't have to wait for software to become available--they could write what they need themselves, and they wouldn't need to learn machine language to do it.

[Bill] Gates believed that, by providing a BASIC interpreter for the new [MITS Altair] computer, they could make it more attractive to hobbyists.

  • 4
    I can remember in the late 70s that owning a computer at all was a big deal (much like 3d Printers in 2016), and that initially all you wanted one for was programming yourself. It was a few years later that the software available for that particular computer really mattered. – Matthew Lock May 16 '16 at 7:04
  • 1
    @MatthewLock And "coincidentaly", Microsoft was one of the first companies that made consumers buy software - with the exception of specialized software, the standard was "the software comes with the computer". Want a better software suite? Buy a better computer! – Luaan May 16 '16 at 15:33
  • 2
    It wasn't just a selling point to the users, it was a selling point to the people providing the funding: as a child of the '80s you wanted your Spectrum or Commodore to play games, but because it started up in a serious programming environment, that meant it was educational and would definitely lead to a high-paying career. This is what we told our parents. – Tommy Oct 24 '17 at 16:05

Nobody so far has said the magic words, which is Microsoft BASIC. First developed for the Altair 8800 (the first commercially successful personal computer!), Microsoft spent a lot of energy making sure their BASIC would work on every personal computer in the 1970s and licensing it widely. It ran on CP/M, it ran on the TRS-80, and -- of course -- the IBM PC. Apple's AppleSoft BASIC, Commodore BASIC and Amiga BASIC were all originally licensed from Microsoft. This meant that if you were manufacturing a personal computer in the 1970s, the first question any customer would ask was whether their existing Microsoft BASIC programs would work on it -- essentially, the first standardized programming language/execution platform!

  • 1
    "Standardized" might be taking a bit far, given the degree of customization on different platforms. OTOH, stackoverflow.com/questions/31877835 – fadden May 12 '16 at 16:44
  • 4
    Also, and perhaps more important, the original Dartmouth BASIC was fairly early made available to the world for "free". – user2338816 May 13 '16 at 0:08
  • 1
    ZX81 and BBC B where the most common computers in the UK at the time, and they did not have Microsoft Basic. – Ian Ringrose May 16 '16 at 11:06
  • 1
    @IanRingrose - The CPC464 outsold the BBC B by some margin, but also didn't have Microsoft BASIC (despite its OS being based on CP/M IIRC, which would have made Microsoft BASIC the natural choice). – Jules May 16 '16 at 16:49
  • 1
    @Guarav: It was/is a helluva lot better than the 6000 BASICs that appeared in the late 1970s and early 80s. Even the MS BASIC clones were only "sort of" compatible at best. – Ira Baxter Aug 24 '17 at 1:05

Thraka is right that BASIC served the role of operating system on many 8-bit micros. Some OS was needed, that was beyond doubt. But at the time dedicated operating systems were either very limited (say, Atari DOS), overly complex, big and expensive for the tiny computers (Unix), or - for the middle ground, that was "just right" - in their infancy (CP/M).

BASIC, on the other hand, was touted THE beginner's programming language.

At the time - 8-bit micros were primarily aimed at the kids and teens market. They were "home computers", where the dad could write and print letters, mom could design crosstitch images, but 90% of the time kids would be playing games. But if the computer was to be more than a glorified gaming console with hardly-used extra functions, it needed a marketing point that would set it apart from the consoles: "It Teaches Your Kids Programming" was the critical sales point. And so it needed a kid-friendly programming language.

BASIC had only one serious competitor for that position at the time: Logo, and while Logo was generally considered a much better learning tool* but it hardly yielded towards "general use" - you could do some quite fancy stuff easily (drawing a Koch Snowflake was less than a screen long program; not a packed screen too) but didn't yield well towards "common use", and was considerably slower. Other languages than the two either employed concepts too advanced for kids, or were too complex to implement on 8-bit micros (leaving enough memory for actual software too!).

...also - Microsoft Basic was an important language for "professional environment". Learning its simpler variants was considered (usually by clueless parents) an important building block towards building a career of using it professionally. Nobody ever wrote serious business software in Logo. Therefore the marketing appeal of Basic - despite its factual shortcomings - overshadowed Logo as THE language for learning.

On top of that, implementing OS procedures as BASIC commands was simple, natural and took little effort, little memory and allowed to integrate or script them as BASIC programs easily. Logo didn't yield itself to that purpose nearly as well.

And so, BASIC being simultaneously a comfortable OS environment, a scripting tool, a teaching tool, and - above all - an important marketing point - became the language of choice.

* (e.g. providing recursion, which was between very difficult and impossible in Basic, lacking local variables, parametric function calls and rarely implementing easy to access arrays which could serve as a crutch for these). Also, the Turtle Graphics, which was excellent for teaching the concept of "giving commands", and building a library of procedures, but made utilizing the gfx as "pixel canvas" difficult.

  • 2
    Note that Logo was explicitly designed to empower students and be a great learning tool. Basic was intended for computer users, not students - most people just did something like LOAD followed by RUN and that's it (similar to how most people only used CD in MS-DOS :D). Logo was for fun and learning, not for people training to be programmers specifically. – Luaan May 16 '16 at 15:37
  • 1
    @Luaan: theoretically one could do the same in Logo. You won't convince me any professional with two bits of technical knowledge would consider Atari or Spectrum BASIC for any serious application - but it was the buzzword of the time; Microsoft BASIC was used in serious applications and the usual customers for home computers wouldn't know the difference. "What will my son know if he learns Logo? It's a toy for children! Nobody uses Logo for anything serious! But BASIC! There's business software written in BASIC! BASIC programmers earn big money!" – SF. May 19 '16 at 17:50
  • Of course you could - but why? There's no need for the extra complexity and the extra memory required etc. - BASIC did the job, and was exceedingly simple for the computer. One of the big reasons LISP machines "failed" was that they were simply too expensive, and I assume that the LISP-derived Logo had the same problem. Now, LISP was great for development, but Basic was very good for application development - applications could be made quickly and cheaply and got the job done, and that's what the users cared about. This was further cemented in MSVB, of course – Luaan May 20 '16 at 6:10
  • 1
    @Luaan: I'm not sure how "big" the Basic implementations were, but I know Logo was fairly small, so the concerns fo "extra complexity and memory" don't really apply to anything with more than 16KB of RAM. And it was a real challenge to run out of RAM unintentionally (other than memory leak like 10 GOSUB 10) in either of these on 64k machines. – SF. Dec 8 '16 at 16:50
  • 1
    Serious computer professionals in the 1970s built highly capable BASIC systems. (I built a PASCAL like version of BASIC with real subroutines/functions, 24x80 screen device-independent screen management and complete access to all OS-provided services back then; this was compiled to what amounted to a PCODE. With tools like that you could write quite serious applications. And people did. – Ira Baxter Aug 23 '17 at 21:42

As far as I know it was included because it was essentially the operating system interface. When you installed MS-DOS on a PC it provided you with commands and allowed you to run programs that executed machine code on the machine.

BASIC back then was similar. It provided you with a command prompt, operating system-level commands like reading/writing data to disk, a printer, tape, do simple things like print to the screen, and read in user input.

This way you had a general set of commands with an interpreter that could be ported to other CPUs and memory configurations with minimal changes. You just needed to setup which commands were available and what machine specific code was run for those command.

Essentially a portable, programmable, operating system.

  • 2
    I think it's a misnomer to say that you "installed" MS-DOS on an early PC. MS-DOS 5.00 was the first version that was sold outside of OEM channels, and at least up through MS-DOS 3.x, it was common for machine-specific changes to be made to the operating system core which meant that you couldn't take a MS-DOS intended for an Amstrad, run it on a Compaq, and expect it to work. For the Amstrad you might need Amstrad DOS, and for the Compaq you might need Compaq DOS, which were both MS-DOS with minor changes (same commands, etc.) and could run all (well-behaved) MS-DOS/PC-DOS compatible software. – a CVn May 12 '16 at 16:35
  • 5
    Additionally, until hard disks became a common PC accessory, you didn't really "install" any software on the computer... you swapped floppy disks. Which were usually floppy back in those days. (5¼" floppies.) – a CVn May 12 '16 at 16:35
  • Yeah but what about installing CP/M on the machine? And the part of "when you" could easily refer to a manufacturer. Businesses easily ran PCs with hard drives while consumers generally didn't until they became more affordable. I was using it as a general example :) Further, if it's installing to memory (boot disk startup) versus a hard drive (perm install), it's the same principle. – Thraka May 12 '16 at 17:20
  • 2
    On the BBC Micro, other ROMS made use of the "library" routines that were available on the BASIC ROM, e.g. for printing strings or numbers. So that was a secondary benefit from its presence. – joeytwiddle May 13 '16 at 8:13
  • @joeytwiddle I've heard of machine code programs running from ram doing that but it seems unlikely that other roms would. The BBC micro's memory map is such that calling an arbitary routine in another rom is awkward to say the least.. – Peter Green May 13 '16 at 20:10

As it says in Wikipedia BASIC:

The introduction of the first microcomputers in the mid-1970s was the start of explosive growth for BASIC. It had the advantage that it was fairly well known to the young designers and computer hobbyists who took an interest in microcomputers.
... BASIC was one of the few languages that was both high-level enough to be usable by those without training and small enough to fit into the microcomputers of the day, making it the de facto standard programming language on early microcomputers.

In other words, it was easy to learn even for those with no programming experience, and the interpreter memory footprint was small, which was important due to the cost of memory.
(I don't exactly recall, but back in the 80s an 8k bit RAM chip in C64 cost several dollars.)

The use of an interpreter was also important from an ease of use point. While other existing languages were similar and not so difficult to learn (for example FORTRAN), they had to be compiled.

This means that instead of getting instant results (or errors), you had to write the code, compile it (hopefully no errors otherwise you had to change the code again and compile again), and then run it. If any errors, back to square one you go.

  • 2
    "the interpreter memory footprint was small, which was important due to the cost of memory" -- and available address space. Most of the computers that came with BASIC on their ROMs did so using 16KB ROM in a 64KB address space, leaving only 48KB usable RAM even before the screen buffer was taken out. Bank switching made machines more expensive, so the first few generations of machines (up to the ZX Spectrum, Commodore 16, etc) avoided it. Switching to a 32KB ROM would have left little space for RAM, so 16KB was about as much as you could realistically hope for. – Jules May 16 '16 at 17:02

A lot of great information has been given.

One more thing to consider is what the machines were like. Most had no decent non-volatile storage - no hard drives, many didn't have diskette drives either.

Even the original IBM-PC came with a cassette tape interface - they used a standard audio cassette recorder/player. Even when they had a diskette drive, the drive was often painfully slow. (Looking at you, Commodore 64.)

Having a programming language built in meant that you only needed to save/load the very small program, and it meant that every instance of a given computer (ie, C64, TRS-80 Model III, TI/99, etc) had the exact same language available on it.

This had value because computer magazines actually had programs printed in them, and the readers would laboriously type them in, debug the typos, and run them.

  • 2
    The factor which crippled the I/O speed of personal computers other than the Apple ][ was that they were designed to be connected to television sets. The FCC rules when the Atari 800 and VIC-20 were introduced required devices that connected to television sets to have emissions levels far below what would be allowable today. The Apple ][ wasn't designed for such connection, and thus was able to use parallel interfaces in ways its competitors could not. – supercat May 12 '16 at 21:41
  • This is the real answer. There wasn't enough room to build in applications, and many consumers might spend $500 for a computer, but would balk at spending an additional $200 for a disk drive. So you had to give them something that would make the machine reasonably usable yet keep the price low, and also provide support for commercial software. BASIC was it. – TMN May 13 '16 at 12:56
  • @supercat apple ][ was also designed to connect to tv, everything was until EGA – Jasen May 14 '16 at 19:48
  • 3
    @Jasen: Apple ][ was designed to connect to composite-video monitors. While it would have been possible to use either a standalone RF modulator or a VCR to convert the composite video signal into an RF signal that could be displayed on a common television, I don't remember ever having seen one exhibited that way in a computer store, nor have I seen computer stores selling television connection kits. – supercat May 14 '16 at 19:55
  • 1
    Young people probably can't imagine a computer with no storage device. I used my VIC-20 for a year or so before getting a tape drive, which was unbelievably slow. Tired of the program you wrote? Turn it off and on again! – doug65536 May 17 '16 at 18:44

Looking at other sources, it seems the BASIC for the C64 was burned into a D2364 ROM chip (8192 bytes). This 8k was mapped into the memory address region at 0xA000-0xBFFF.

This was typical of machines at the time: processors like the 6502 and Z80 could only address a 64k range (addresses 0 to 0xFFFF), and within that memory map, some would be RAM, some ROM, some would be empty space, and perhaps some would refer to I/O ports on chips mapped into the memory space.

In many cases the supplied RAM would be much less than 64k anyway (although this seems inconceivably small by modern standards), so if 8k of the mapped space was taken up a ROM, then this wouldn't necessarily cause any problem to the owner.

As to why BASIC was supplied with a lot of machines: firstly we should say BASICs, since the implementations were wildly incompatible in machines from different vendors, but they all shared some common characteristics that gave some familiarity: GOTO, GOSUB, IF, PRINT, INPUT and so on.

At the time machines had limited memory space, and a language was needed that could fit in a small ROM, and that had a low overhead in RAM when executing programs. It needed to be an interpreter (rather than a compiler) due to limited RAM and typically no secondary storage (hard disk, floppy disk etc) that provided a file system. Also, it needed to be a simple language so that people could succeed in some basic programming tasks. There weren't anything like as many languages to choose from back then, and BASIC emerged as a soft-of standard that became a selling-point and perhaps even a requirement.

  • 1
    BASIC on the C64 also occupied something over 1K of ROM at 0xE003. Routines in the C64 ROM at 0xA000-0xBFFD are 8192 bytes below the corresponding routines in the VIC-20 ROM from 0xC000-0xDFFD, but routines in the C64 ROM starting at 0xE003 are three bytes higher than those in the VIC-20 ROM starting at 0xE000, since 0xDFFD is a 3-byte "JMP" instruction. – supercat May 12 '16 at 21:36
  • 1
    This is more an answer to "how" rather than "why". – TMN May 13 '16 at 12:52

Short answer: so you could actually DO something useful with the machine out of the box.

Considering when these machines arrived in the mid-to-late 1970's, they were not only expensive "hobby toys" but software was hard to come by and peripherals were costly. If you compare this to the Altair 8800, you paid a lot of money for a machine that when you plugged it in it really did nothing.

Though Microsoft BASIC had been popular because it was easier to use than machine language, I've read things over the years that suggested that people wanted to use BASIC because the learning curve was smaller and could fit in the small memory of these machines; MS wasn't quite creating the trend, but going along with it. Yes, they did port it to 808x/6502/etc. chips at the time, but note that the original Apple I and II shipped with Integer BASIC which was written by Woz, not Microsoft (and based on HP basic, not Dartmouth). Given the relative ease of BASIC, you could write your simple recipe or checking account balance program while the world waited for VisiCalc to appear in 1979.

  • 2
    No. Microsoft created the trend. The first Microsoft Basic was targeted at the MITS Altair which predates the Apple 1. Paul Allen and Bill Gates didn't look at the Apple 1 and say "hey let's make a BASIC interpreter", it was more like the other way around (Steve Wozniak decided he needed a BASIC interpreter after looking at the Altair). – JeremyP Mar 7 '17 at 11:54

During the late 1970s and early 1980s, ROM was cheaper than RAM. The amount of useful work that can be accomplished with a BASIC program that occupies a certain amount of RAM will be often greater than the amount that could be accomplished with the same quantity of machine code, so a computer with 16K of ROM and 8K of RAM could be more useful than one with 2K of ROM and 16K of RAM, even though the latter computer would cost more.

Further, editing a BASIC program "in place" is much more efficient than trying to do likewise with a machine-language program. In-place editing of machine code is possible, but for the most part generating efficient machine code requires creating a text file and passing it through an assembler. This in turn generally entails a long slow process every time one wants to modify the code and test it again. By contrast, in-place editing of a BASIC program is easy, and for many kinds of programs cutting the edit-build-test cycle from five minutes to five seconds is a huge benefit which vastly outweighs the difference in execution speed.

The need for BASIC largely disappeared when RAM got cheap enough that platforms like Turbo Pascal could allow the editor, compiler, source code, executable, and data to all be kept in memory simultaneously. Basic's primary benefit was the ability to keep everything in RAM, and once such ability became available in a compiled language there was no longer a reason to tolerate the slowness or semantic limitations of interpreted BASIC.

Because at the time a personal computer without BASIC was a total non-starter. A personal computer without BASIC would seem as silly then as a computer without a web browser would seem today.

We considered BASIC interpreters essential in the 1970's and early 1980's because the modern concept of the personal computer as a machine on which one runs ready-made application programs was only beginning to emerge. BASIC was invented in 1964. Microsoft BASIC was released in 1975. Wordstar was released in 1978, Visicalc in 1979, Wordperfect in 1979, Microsoft Word in 1983, Lotus 123 in 1983. If you were a user then, you might have heard of some of these programs, you might be able to get a copy of one of them, and it might run on your computer (but probably would not).

Making practical use of a computer without programming was still very much a new idea. BASIC was seen as a language which end users would use to solve problems. I learned it from the 1975 book "Making BASIC Work For You". It is all about how to solve business accounting and record-keeping problems. The examples are things which today would be done using spreadsheets and other office applications.

The computer buyer was also different. The average person did not think that he ever would or ever could operate a computer and so had no desire to own a home computer. They were bought by hobbyists who valiantly tried to show their friends that the machines had some practical value (which was hard since most tasks took two or three times as long on a computer) and by parents who realized that microcomputers, even if useless now, were the wave of the future and wanted their children to "learn programming". In both cases it was essential that the computer be programmable.

  • 1
    The original 1981 VisiCalc for the IBM PC is available for download from the official web site of the original author, Dan Bricklin. It won't run on 64-bit Windows because 64-bit Windows does not support 16-bit applications, but it will run on MS-DOS and any 16-bit or 32-bit Windows, or you can run it through an emulator like DOSBox or in a virtual machine running an older OS, or you might be able to run it in a web browser courtesy of the Internet Archive. – a CVn May 12 '16 at 16:43
  • 8
    parents who realized that computers, even if useless now, were the wave of the future and wanted their children to "learn programming". In 1982, I was 14 years old, and my great-aunt bought me a CMD-VIC-20 for exactly this reason. And that's why I sit at a PC writing C# code all day today. My first "Hello, World" program in Commodore Basic completely changed my life! – Terry Lewis May 12 '16 at 21:41

In addition to the answers above, something to keep in mind is that there wasn't a ton of commercial software available at the time compared to today and computers were not yet things that everyone needed or even found useful for their jobs. It's not like today where you could buy a computer, load it with Office and other software, use it to do your job, maybe even run your business and turn it into a multimillion dollar operation, and never touch a line of code.

Meanwhile when I went to college in 1995 I had fellow freshmen who could barely get their PC turned on but they knew how to program in Pascal because the American school system at the time taught programming because they didn't know what else to do with these computer things everyone is buying, but they knew that it was going to be a "thing" in the future.

So one of the reasons a lot of these old toy computers came with BASIC built in was because, compared to today, they didn't do much else. And they also tended to not run the software from the previous generation or any other computers (if you think about it, Apple's never completely shaken this mindset - they have few qualms about breaking backwards compatibility for machines more than a few years old and they sell a computer that can't run the software from the competition's platforms). Notice how it wasn't until the DOS/Windows cycle started happening that backwards compatibility became a big thing and then sales of computer took off. There were other factors too, like price, but it inspired a lot of consumer confidence when you could be reasonably certain your stuff could come along for the ride.

  • 4
    Also consider there wasn't anything to be backwards compatible with. – Thorbjørn Ravn Andersen May 12 '16 at 16:14
  • Well, there was the IBM 5100... why anyone would ever even want to be backwards compatible with that one, though, I have no idea. – a CVn May 12 '16 at 16:49
  • That is only interesting if you have software for it you want to run. – Thorbjørn Ravn Andersen May 12 '16 at 17:52

In short, it was because computers in the early age such as Apple ][ didn't come with OS and the BASIC was the INTERFACE you control your computer. You could access (read/write) files in the cassette tape via BASIC command such as load/save. Later OSs were introduced with Floppy disk drive.

The CPU companies had contracts with the designers of BASIC (Bill Gates). For people designing computers it made sense to use the language they had already paid the license fee for (BASIC). BASIC was good because it was small and predictable, exactly the thing for a ROM chip of the day. Every computer needs start instructions, originally stored in ROM, at the lowest bootstrap addresses. Since peripheral storage was VERY expensive, and ROM was cheap, it made good sense to use BASIC, for basic programs. Also BASIC contained "load" and "save" commands, which could be used interactively by the user and the users permanent storage medium (tapes or drives). This meant BASIC machines were very flexible, especially before WIMP technology became affordable. Why was it memory addressed? Because that was the cheapest way to do it. Even simple chips cost a fortune, and were very sensitive to timing and current/heat issues. The less chips, the far less difficulty getting a working computer off the production line. Since early PC's and home computers were going for office desk and home desk market cost was a massive concern.

"Why was BASIC built into so many operating systems?"

Because it was the popular choice. It's not like the systems that didn't include BASIC didn't have a BASIC-alternative. Every operating system has functionality that is hard-coded into it (like the boot process) and parts that can be programmed by the user (like startup scripts and scheduled tasks). To execute code that isn't known at OS-compile-time you need some kind of system to parse and execute commands. When creating an OS you define a set of commands that the user can give, BASIC is nothing more that a pre-defined set of commands. It was so popular because it was easy to learn, functioned well in many different environments and catered to the needs of most computer users at the time (and still).

Think of Bash (or sh, it's predecessor), it basically fills the same role that BASIC did for a lot of systems. You wouldn't wonder why so many *nix systems include Bash into the OS, it's an integral part of it.

BASIC was first used at Dartmouth College in 1964. It was the first readily available programming language on time-share systems (the predecessor of cloud computing). In 1975 Microsoft released a version of Basic for the first consumer level microcomputer, the MITS Altair 8800. Apple, Commodore, Tandy and then IBM PC (in 1981) followed suit with their microcomputers. By the time IBM released the PC, Apple had already acquired considerable marketshare in schools and thus acquired lots of young budding programmers who mostly only knew BASIC.

In its day, BASIC was as indispensable as a web browser is today.

  • This, while a good answer, is for the wrong question. It does not explain why BASIC was built in; in the Altair 8800, for example, Micro-Soft's BASIC was software that you could load separately to the operating system. – wizzwizz4 May 12 '16 at 16:10
  • @wizzwizz4 To the extent that the Altair 8800 could even be said to have an operating system... – a CVn May 12 '16 at 16:50
  • @MichaelKjörling Good point. You could call it a kernel though! – wizzwizz4 May 12 '16 at 17:46
  • 1
    @wizzwizz4|: ROM was cheaper than RAM. Loading a BASIC interpreter into RAM made the RAM it occupied unusable for other purposes. Adding a 4K or 8K ROM chip with BASIC in it could allow BASIC programs to have an extra 4K or 8K of RAM to play with, but was much cheaper than adding 4K or 8K of RAM. – supercat Oct 6 '16 at 14:51
  • 1
    @wizzwizz4: To justify building in BASIC, one would have had to establish two facts: BASIC is was important, and building it in is was the best way to make it available. Discussions of the history of BASIC help to establish its importance; while that would not in and of itself mandate that it be built in, it's an essentail prerequisite. As for the Altair not having it built in, I think that's probably because Altair wanted to let people start using its BASIC while it was still in development, and replacing a tape (punched paper or audio cassette) was cheaper than a replacing a ROM. – supercat Oct 6 '16 at 16:10

Because early hobbyists were a bit more technical about their computers, and did not just want to run applications on them. Most were tinkerers. BASIC on those machines literally was the operating system. The user interfaced by issuing immediate-mode BASIC statements.

Plus, back then you could get books of programs to type in. Even sophisticated programs could be "poked" into memory from the BASIC interpreter, and then executed by using a BASIC SYS command referencing the starting address.

Once upon a time, 16 kilobytes of DRAM was expensive. The original 8080 Altair came with up to 4 kbytes of memory on a single memory board.

The only programming languages (higher than ASM) that could fit in that small a memory were Tiny BASIC (Palo Alto Tiny BASIC, Altair BASIC (Gates and Allen) and Woz's Integer BASIC, et.al.) and Forth. The only alternatives were hand coding assembly language, or cross-compiling on a larger minicomputer. Basic was more well known and far more commercially viable than entering programs in binary via front panel switches. Later personal computers continued with what the market was familiar with (from the books and magazine articles at that time), and came with BASIC loaded into ROM.

So the answer is:

BASIC (with a very simple OS for I/O) came in ROM on many early personal computers because mass-produced masked ROM was cheaper than RAM, on a per byte basis. 64k address space was considered huge at the time, so dedicating a portion of it to ROM was not considered wasteful. And BASIC in ROM allowed the computer to be usable on power-up, instead of after loading software via paper-tape, cassette tape, or some other media.

  • ... and when the Jupiter ACE tried using Forth instead of BASIC, it flopped hard. So even once you're within the realm of things that fit in small ROMs, BASIC is the smart market choice. Though that machine was probably also too late to market: it offered character-only graphics visually similar to a ZX80 or ZX81 and just 1kb memory for £20 more than a ZX81, but this was 1982 so by then for another £35 you could have the faster colour bitmapped ZX Spectrum with 16kb. So it fell between two stools, being neither a smart value choice nor looking particularly future-proof. – Tommy Oct 24 '17 at 16:22

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.