48 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 ...
38 votes
Accepted

Why was IBM BASIC so Huge?

The early versions of Microsoft BASIC required 4KB of ROM The 4k versions lacked a number of major features, including string variables. These were added in the 8k versions. The equivalent 6502 ...
28 votes

Why was the 6502 version of Microsoft BASIC coded like the 8080 and 6800 versions even though this was rather inefficient?

The main reason was no doubt reliability and speed of development. Back in the late '70s comprehensive automated testing suites for microcomputer software were uncommon, at best, and Microsoft ...
  • 23k
27 votes

Who wrote the MS BASIC on the PET/C64/etc?

It is well established that Microsoft's 6502 BASIC (and Commodore BASIC is just a manufacturer specific adaption) is a port of the original 8080 BASIC done for the Altair -- alas, not a direct one, as ...
  • 195k
22 votes

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

I can only answer to the first question: the LET statement was actually used in 48K Sinclair BASIC, in which due to the way commands are entered, a keyword is needed before an identifier can be typed, ...
20 votes

Is integer arithmetic really slower than float with (early) MS-BASIC?

Do you have any citations for your claim that most MS-BASIC integer multiplication was done by turning into floats? Beside having lived thru it, or noting that the source of MS-BASIC doesn't contain ...
  • 195k
19 votes
Accepted

Why does Applesoft BASIC get confused by a nonzero value at $0800?

The Applesoft RUN command ($d912) begins by calling SETPTRS ($d665), which calls STXTPT ($d697) to initialize TXTPTR ($b8-b9) to the value in TXTTAB ($67-68) minus one. In simple terms, parsing of ...
  • 8,240
17 votes
Accepted

Did Microsoft BASIC ever use Z80 only instructions?

If you mean if Microsoft BASIC's core ever used Z80 instructions at all, then I would say no - the code of BASIC is designed using 8080 compatible instructions, and all "drivers" are created as ...
  • 1,248
15 votes

Why was IBM BASIC so Huge?

[Maury Markowitz' answer already nails it, so this is just to add some numbers for comparison] The Cassette BASIC 1.0/1.1 in the IBM PC ROM is a Microsoft BASIC V5.x (*1). It's usually marketed as ...
  • 195k
14 votes

Was the design of MS-BASIC for 6502 based on MS-BASIC for 8080?

I've seen a number of articles, such as this one which states it was based on 8080 BASIC, and this one which states that 8080 BASIC was first ported to the 6800, which was translated to the 6502. It ...
  • 4,553
13 votes

How were Microsoft GW-BASIC "protected" files encoded?

The files are encoded as follows: the first byte is 0xFE to indicate that it’s a protected tokenized file (0xFF for a regular tokenized file); the remainder of the file is encoded using exclusive-ors ...
13 votes

Did Microsoft BASIC ever use Z80 only instructions?

Yes, Z-80 instructions were used in Microsoft's Z-80 BASIC. For example, look at the TRS-80 Model I or Model III ROM BASIC and you'll find a relative jump JR NZ,0x871 at location 0x88E. The 8080 ...
12 votes
Accepted

In MS BASIC, why is NEXT faster than NEXT I?

The two statement forms are slightly different in meaning. The meaning of NEXT is, roughly, "increment the loop variable for the most nested loop and go to the next iteration of the loop". The ...
  • 17.7k
12 votes
Accepted

How to quit MBASIC and return to CP/M?

How to quit MBASIC and return to CP/M? SYSTEM See Section D integration to CP/M, page D-4 of the MBASIC Manual
  • 195k
11 votes
Accepted

Early BASIC memory management

My memory is that the O/S (for want of a better name) occupied the lowest memory followed by the code of your Basic program. Variables were allocated at the highest available address. So, as you wrote ...
  • 195k
11 votes

Who wrote the MS BASIC on the PET/C64/etc?

The following article details some of the early history of Commodore BASIC (including other Microsoft BASIC 6502 versions), particularly v1 and v2. Create your own Version of Microsoft BASIC for 6502 ...
  • 4,553
11 votes
Accepted

How can I understand numerical precision of values in Microsoft BASIC (on the Dragon 32)?

Microsoft Extended BASIC, as used by the Dragon, uses a 40 bit (5 byte) float format(*1): Field Size (Bits) Exponent Sign 1 Exponent 7 Mantissa Sign 1 Mantissa ...
  • 195k
10 votes
Accepted

Was the design of MS-BASIC for 6502 based on MS-BASIC for 8080?

Yes, Microsoft 6502 BASIC was clearly a port of their 8080 BASIC. Unfortunately the original 8080 source code for Microsoft BASIC isn't easily available, so we can't compare it directly to that ...
  • 23k
10 votes
Accepted

Why did MS BASIC use the line number for FOR loops?

Your initial interpretation was correct -- Microsoft Basic is storing the address of the first statement of the FOR/NEXT loop. But it is also storing the line number of the first statement. See the ...
9 votes

Can't enable list even with “enable run-stop” poke

Those programs aren't BASIC*. Detokeninzing them with petcat produces: $ petcat bez\ milosti-inst.prg ;bez milosti-inst.prg ==0801== 1991 sys2065 tmc $ petcat bez\ milosti.prg ;bez milosti.prg =...
9 votes
Accepted

Differences between 4k, 8k and Extended Altair BASIC?

And I found the answer only moments later when I came across the original manual. The difference is that the 4k version (mainly) did not have strings (!!), lacked a number of math functions (ATN, etc),...
9 votes

Is integer arithmetic really slower than float with (early) MS-BASIC?

As noted, MS-BASIC implementations such as those found in the Commodore used floating-point math for everything, and the performance implications of this were severe. Consider the following program: ...
  • 32.3k
8 votes

Was the design of MS-BASIC for 6502 based on MS-BASIC for 8080?

Bill Gates and/or Paul Allen likely did not write the 6502 version of Basic. Marc McDonald, one of the very first Microsoft employees, is reported (on the Wikipedia page for Applesoft BASIC, for ...
  • 7,924
8 votes

Why is the original Altair BASIC (for the 8080 CPU) source code not available on-line?

The original code was sold to MITS before it was even completed and teams from MITS and Micro-Soft both worked on it simultaneously. Bill and Paul both moved to Albuquerque to continue work. It was ...
7 votes

1980's ROM used which exp(n) algorithm?

Monte Davidoff's floating point routines for early Microsoft BASIC used Chebyshev Modified Taylor series for EXP(x). There's a very helpful disassembly of the TRS-80 MC-10 ROM here: http://www.roust-...
  • 18.9k
6 votes
Accepted

BASIC-PLUS inline operators, do they actually make sense?

I honestly don't remember these structures when I ran BASIC-PLUS on RSTS/E, so I never used them. I did, however, use them pretty heavily when I moved to BASIC-PLUS on the VAX. I loved BASIC-PLUS on ...
  • 11.5k
6 votes

Early BASIC memory management

What protection there was depended on whose BASIC interpreter you were running. Applesoft BASIC had a check surrounding most things that pushed the limits of what had been allocated and would trigger ...
  • 643
6 votes

Why was IBM BASIC so Huge?

Even Cassette Basic offered many features not present in the 6502 dialects, including the ability to use long variable names, support for both single and double-precision floating point, support for ...
  • 32.3k
5 votes

Library of MS BASIC programs in text format?

Rosetta code has a category dedicated to programs written in Basic: http://rosettacode.org/wiki/Category:BASIC

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