Skip to main content
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 ...
Robert Cartaino's user avatar
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 ...
Maury Markowitz's user avatar
31 votes

Do any FAT8 filesystem images survive?

I think I've actually found a FAT8 disk image: Toshiba T100 Personal Computer T-DISK BASIC (Version 1.0) (1982) Why I think it is FAT8: Starting near offset 0xc530, there are repeated occurrences of ...
Simon Kissane's user avatar
28 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 ...
Raffzahn's user avatar
  • 225k
28 votes
Accepted

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 ...
cjs's user avatar
  • 26.7k
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, ...
mcleod_ideafix's user avatar
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 ...
Raffzahn's user avatar
  • 225k
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 ...
fadden's user avatar
  • 9,060
18 votes

Do any FAT8 filesystem images survive?

There were several pretty common 8 bit machines with MS-BASIC 5.x including for example the TA Alphatronic PC which featured a Microsoft Extended BASIC 5.11 in ROM. Disk Routines were to be loaded ...
Raffzahn's user avatar
  • 225k
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 ...
Anonymous's user avatar
  • 1,286
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 ...
Raffzahn's user avatar
  • 225k
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 ...
Tim Locke's user avatar
  • 4,820
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 ...
Stephen Kitt's user avatar
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 ...
George Phillips's user avatar
13 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
Raffzahn's user avatar
  • 225k
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 ...
Leo B.'s user avatar
  • 19.4k
12 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 ...
Tim Locke's user avatar
  • 4,820
12 votes
Accepted

What does it mean to "publish machine code"?

What does it mean to publish the machine code? Machine Code in the sense used is what otherwise would be called a HEX-Listing or HEX-Dump. The most compact form a program could be published and ...
Raffzahn's user avatar
  • 225k
11 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 ...
cjs's user avatar
  • 26.7k
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 ...
Raffzahn's user avatar
  • 225k
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 ...
Raffzahn's user avatar
  • 225k
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 ...
George Phillips's user avatar
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 =...
Laurence Gonsalves's 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),...
Maury Markowitz's user avatar
9 votes
Accepted

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 ...
Randall Huddleston's 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: ...
supercat's user avatar
  • 37k
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 ...
hotpaw2's user avatar
  • 8,277
8 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 ...
Will Hartung's user avatar
  • 12.3k
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-...
scruss's user avatar
  • 21.7k

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