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
29 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 ...
user avatar
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 ...
user avatar
  • 173k
27 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 ...
user avatar
  • 21.9k
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 ...
user avatar
  • 173k
19 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, ...
user avatar
18 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 ...
user avatar
  • 7,591
16 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 ...
user avatar
  • 1,228
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 ...
user avatar
  • 4,396
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 ...
user avatar
  • 96.6k
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 ...
user avatar
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 ...
user avatar
  • 16.4k
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
user avatar
  • 173k
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 ...
user avatar
  • 173k
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 ...
user avatar
  • 4,396
11 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 ...
user avatar
  • 173k
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 ...
user avatar
  • 173k
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 ...
user avatar
  • 21.9k
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 ...
user avatar
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),...
user avatar
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: ...
user avatar
  • 28.1k
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 ...
user avatar
  • 7,814
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-...
user avatar
  • 17.2k
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 ...
user avatar
  • 10.9k
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 ...
user avatar
  • 633
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
user avatar
5 votes
Accepted

Integer overflows in MS BASIC

GW-BASIC 3.23 gave an error, "Overflow":
user avatar
  • 1,270
5 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 =...
user avatar
5 votes

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

As far as I can see, any Microsoft BASIC at that time should have used Microsoft Binary Format for floating-point numbers. Since you found out that numbers are occupying five bytes, that should mean ...
user avatar
  • 3,946

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