Skip to main content
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 ...
Psychonaut's user avatar
  • 7,691
82 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 ...
Mick's user avatar
  • 2,839
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 ...
Kevin Duggan's user avatar
74 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. ...
Raffzahn's user avatar
  • 232k
65 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-...
mcleod_ideafix's user avatar
64 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 ...
Zac67's user avatar
  • 3,974
62 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 ...
Greg Hewgill's user avatar
  • 7,019
55 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. ...
Raffzahn's user avatar
  • 232k
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 ...
TeaRex's user avatar
  • 1,225
51 votes
Accepted

Which BASIC-like language has "ENDIF", "DIM ... OF" to declare arrays, and a double slash for comments?

My guess is that this is COMAL, which was available on the IBM PC. Notably: COMAL was developed in Denmark. COMAL was based on BASIC (and possibly Pascal). COMAL uses the DIM variable OF x format, ...
Jerry Stratton's user avatar
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 ...
Tommy's user avatar
  • 38k
48 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 ...
Davislor's user avatar
  • 8,923
48 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 ...
user3840170's user avatar
  • 23.4k
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 ...
Stephen Kitt's user avatar
46 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 ...
Raffzahn's user avatar
  • 232k
46 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. ...
Brian H's user avatar
  • 61.2k
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 ...
cjs's user avatar
  • 27.2k
46 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 ...
Raffzahn's user avatar
  • 232k
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 ...
jeffB's user avatar
  • 2,856
42 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 ...
user3840170's user avatar
  • 23.4k
40 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 ...
George Phillips's user avatar
39 votes
Accepted

C64 BASIC: How to suppress the '?' sign when using the INPUT command?

Use the INPUT# command. The INPUT# command is meant for non-interactive I/O on files or devices, i.e. reading from a file on disk, serial port, whatever. Because it is non-interactive, it will not ...
followed Monica to Codidact's user avatar
39 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 ...
pndc's user avatar
  • 11.6k
39 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 ...
pndc's user avatar
  • 11.6k
39 votes

How can I play QBasic Nibbles on a modern machine?

DOSBox, with the default CPU speed of 3000 cycles on this Linux box, runs nibbles.bas without problems.
scruss's user avatar
  • 21.9k
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$ ...
Raffzahn's user avatar
  • 232k
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 ...
knol's user avatar
  • 12.7k
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 ...
UncleBod's user avatar
  • 1,775
35 votes
Accepted

Was the first ARM "processor" a BBC BASIC program?

Per Sophie Wilson: To prove that [Steve had] designed the microarchitecture correctly, he wrote, in BBC BASIC, a model of the microarchitecture. To prove that I'd designed the architecture ...
Tommy's user avatar
  • 38k
35 votes
Accepted

C64: Why is POS(π) faster than POS(0)?

That interpreter apparently parses the source text, or at least the numerical literal values, at every execution. π is a single-byte magic token, therefore, as soon as it is recognized, it is ...
Leo B.'s user avatar
  • 20.6k

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