Hot answers tagged

238 votes
Accepted

How did Commodore's anti-Microsoft Easter Egg work?

I'm the author of the TPUG article. The "BILL GATES SUCKS" message isn't really an Easter egg; that was just a conceit of mine to make the article a bit more interesting and to turn it into a bit of ...
user avatar
  • 5,364
79 votes
Accepted

What computer system is this from 1984 Doctor Who?

This is an example of BBC BASIC with inline (6502) assembler code. The computer in use would have been a BBC Microcomputer, manufactured by Acorn Computers Ltd. The display was probably a studio ...
user avatar
  • 2,769
78 votes
Accepted

Can a PET 2001 be physically damaged from BASIC?

POKE 59458,62 was a trick, sometimes called "Fast Print," used to increase screen refresh rates on older PETs. This page describes the trick succinctly: the system no longer waits for the video ...
user avatar
70 votes
Accepted

How did Woz write the Apple 1 BASIC before building the computer?

TL;DR: As explained on Steven Weyhrich's great and authoritative Apple II History Site, Wozniak simply sat down and wrote his Integer-BASIC (*1) on paper, while assembling it at the same time by hand. ...
user avatar
  • 166k
69 votes
Accepted

Why was BASIC built into so many operating systems?

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 ...
user avatar
63 votes
Accepted

Can a USR command damage a ZX Spectrum?

I am the author of that video. I wrote a little article about that years ago. I will copy that for you here: Original article here: http://www.zxprojects.com/index.php/the-fix-a-spectrum-blog/29-the-...
user avatar
63 votes

How did Commodore's anti-Microsoft Easter Egg work?

That's not a real easter egg. Someone just made an effort to find random seeds that produce the numbers to create the intended words. It would be an easter egg if the seed numbers were in some way ...
user avatar
  • 2,865
61 votes
Accepted

Strange math syntax in old basic listing

Your mention of TRS-80 provides a clue. In the TRS-80 character set, the space normally occupied by the ASCII [ character is instead a ↑ (up arrow) character. Old versions of BASIC (such as this one ...
user avatar
  • 5,509
53 votes
Accepted

Why was it common to reference memory locations using negative numbers on some BASICs?

The difference between Applesoft BASIC and the other Microsoft 6502 BASIC derivatives can be explained by the fact that Applesoft BASIC was not the first BASIC for the Apple II; the first was Apple II ...
user avatar
  • 1,055
52 votes

Why did 8-bit computers choose BASIC dialects as "de facto" command-line interface, instead of contemporary Shell/Lisp dialects?

People nowadays think of BASIC as something lesser and generally tied to puny microcomputers, but BASIC was the language of choice for many scientific, engineering and business computers in the 1970s. ...
user avatar
  • 166k
50 votes

Was self-modifying code possible using BASIC?

BBC BASIC, first shipped in 1981, includes the EVAL keyword, which means "ask the interpreter to evaluate this string as an expression". Since strings can be mutated, a program can mutate what will be ...
user avatar
  • 32.2k
47 votes
Accepted

How fast were BASIC interpreters in the 80s? (Is this optimization for speed really necessary?)

The speed of BASIC interpreters has been discussed elsewhere on this site, see How can you measure time using BASIC on Atari XL computers? for example. They were slow, in many cases very slow; bear in ...
user avatar
47 votes

How fast were BASIC interpreters in the 80s? (Is this optimization for speed really necessary?)

They were awfully slow. And not just because the CPUs they ran on were slow; the interpreters themselves tended to use some terribly inefficient implementation techniques that certainly wouldn’t pass ...
user avatar
  • 16.4k
46 votes

Why was BASIC built into so many operating systems?

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 ...
user avatar
46 votes
Accepted

How slow was the 6502 BASIC compared to Assembly

Yes, BASIC is much slower than assembly for many operations. For an easy example, try out this program on a Commodore 64 or emulator: for i = 1024 to 1984 : poke i,peek(i) or 128 : next You will see ...
user avatar
  • 20k
45 votes
Accepted

Why did Visual Basic use parentheses for both function call and array access?

In the early days, many machines running BASIC had limited character sets. For example, the stock TRS-80 Model I couldn't display the lowercase portion of ASCII, which omitted curly-braces, tilde, and ...
user avatar
  • 2,676
43 votes
Accepted

Why does this BASIC program declare variables for the numbers 0 to 4?

These tricks are usually done to increase speed or reduce space. For most (especially Microsoft) BASIC, constants are stored within a tokenized line as ASCII (as entered), and converted to a floating ...
user avatar
  • 166k
43 votes
Accepted

What type of interpreter were most 8-bit BASIC implementations?

[W]ere these interpreters implemented as tree-walker interpreters or bytecode interpreters? Neither, or both. They are kind of source code interpreters - much like (classic) shell scripts - except ...
user avatar
  • 166k
43 votes
Accepted

Why did 8-bit Basic use 40-bit floating point?

The floating-point routines for Microsoft BASIC were written by Monte Davidoff in 1975, originally for the Altair, which used an Intel 8080 CPU. The source code had been lost for years, until Bill ...
user avatar
  • 5,690
40 votes
Accepted

Did the LET statement actually do anything in 8-bit Microsoft BASICs?

Except for the very earliest versions of basic, LET was rarely used, but the LET keyword was not always optional. Early BASIC interpreters required it; however, for most versions that came out for the ...
user avatar
39 votes

Why was BASIC built into so many operating systems?

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 ...
user avatar
  • 493
39 votes
Accepted

What caused the demise of BASIC/BASICA in the late 1980's?

In my view, the brief popularity of BASIC in the 1980s is directly related to the popularity of Javascript today - Simply, it's the Runtime that is Everywhere. That is what BASIC was back then. ...
user avatar
  • 56k
39 votes

How can I play QBasic Nibbles on a modern machine?

The problem is simple. At initialisation, Nibbles measures the time it takes to perform 1000 empty iterations of a FOR loop with a DOUBLE counter in order to determine how many such iterations are ...
user avatar
  • 16.4k
39 votes

Why do variable names in BASIC need type suffixes?

TL;DR: Most straight answer: Because it's BASIC A trailing '$'-sign is the syntax BASIC defined when adding strings. Also, the suffix is not only a type marker, but part of the name. In BASIC A and A$ ...
user avatar
  • 166k
39 votes
Accepted

What exactly is/was threaded p-code?

You're in luck: Byte November 1987 introduces QuickBASIC 4.0 and has a feature on it, with a special box out specifically about threaded p-code which I've included below. 'p-code' is a letter P. I've ...
user avatar
  • 9,875
38 votes

BBC/Acorn BASIC, what made it so fast?

There are a number of optimisations which, in aggregate, will improve performance somewhat: There are multiple linked lists for the variables, one per first letter of the variable name. This makes ...
user avatar
  • 8,864
38 votes

Strange math syntax in old basic listing

In old computer books of cheaper sort, (Paperback or pocket books) it was quite common that they couldn't type set all special characters directly. Either they did as in this case, changed the ...
user avatar
  • 1,687
38 votes

How did Woz write the Apple 1 BASIC before building the computer?

One thing is certain: Steve Wozniak was very good at hand assembling 6502. Instead of writing assembler mnemonics he could simply type in the necessary hex code. I realize this isn't a proper answer ...
user avatar
36 votes
Accepted

ZX Spectrum tokenisation

Contrary to other answers, obliging the user to enter BASIC tokens directly doesn't really save meaningful amounts of RAM. Many of its contemporaries such as the BBC Micro had BASICs where you typed ...
user avatar
  • 8,864
35 votes
Accepted

Why were early versions of BASIC different?

There are multiple reasons. First, there was no standards body publishing an official definition of the BASIC language (initially the closest thing to a standard was the Dartmouth version for ...
user avatar
  • 11.3k

Only top scored, non community-wiki answers of a minimum length are eligible