Questions tagged [microsoft-basic]

Microsoft’s Altair BASIC interpreter, its later ports, expansions and dialects (like PC BASIC, Commodore BASIC). Use [applesoft-basic] for the Applesoft dialect specifically.

Filter by
Sorted by
Tagged with
5 votes
2 answers
4k views

What does it mean to "publish machine code"?

The Wikipedia article on “An Open Letter to Hobbysts” says that Bill Gates complained about hobbyists pirating his software, and due to piracy he refused to publish the machine code of his Altair ...
robertspierre's user avatar
39 votes
2 answers
4k views

Do any FAT8 filesystem images survive?

According to Wikipedia, the original FAT8 filesystem was developed by Marc McDonald in 1977 or 1978, as part of "NCR BASIC +6", a port of Microsoft BASIC to an 8080-based NCR data entry ...
Simon Kissane's user avatar
5 votes
3 answers
460 views

Examples of floating-point numbers that don’t round-trip losslessly through text conversion in Microsoft BASIC

For a long time I thought it was kind of crazy that 8-bit Microsoft BASIC stores numeric constants in ASCII and has to parse them into its 32- or 40-bit floating point format at runtime. Why not parse ...
Willis Blackburn's user avatar
2 votes
1 answer
288 views

Is NEC's PC-88VA compatible with N88-BASIC(86)

First, N88-BASIC runs on all PC-88. It's a japanese Z80 computer, but PC-88VA are 16-bit, like the PC-98 and wonderswan. Instead, PC-98 runs N88-BASIC(86), which is different. I think only the PC-98DO ...
Ciel Ruby's user avatar
  • 545
17 votes
1 answer
3k views

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

It's quite clear that the 6502 version of Microsoft BASIC at all levels uses substantially the same structure and technique as the earlier 8080 and 6800 versions. As has been pointed out in various ...
cjs's user avatar
  • 24.6k
3 votes
0 answers
159 views

Why did the byte before TXTTAB have to be zero in MS-BASIC?

As mentioned in this answer about how the C64 stores BASIC program text, MS-BASIC uses a pointer called TXTTAB that points to the start of the program text, which is typically at address 1 in a page. ...
cjs's user avatar
  • 24.6k
4 votes
0 answers
281 views

Oddity in MS BASIC line lookup code on the 6502 [duplicate]

Does anyone know for sure why MS BASICs on the 6502 compared only the page number when deciding where to look for line numbers on branches? IIRC, it would only "start looking from here" if ...
Maury Markowitz's user avatar
14 votes
1 answer
757 views

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

Applesoft BASIC programs start at location $0801 in memory (usually). If you put a nonzero value at address $0800, though, you get an error when you try to run the program: ?SYNTAX ERROR IN 65124 ...
fadden's user avatar
  • 8,775
3 votes
2 answers
225 views

How did early MS BASIC handle "local" variables in DEF FNX(A)?

I'm not conversant enough in Intel assembler to understand what's going on in the early MS interpreters, so maybe someone can help... Generally in MS-derived BASIC an expression would only be semi-&...
Maury Markowitz's user avatar
4 votes
1 answer
545 views

Clear description of MS BASIC number → string conversions?

I'm failing to find a concise document that describes the formatting used by (6502) MS BASIC when converting internal floating-point numbers to text for display in PRINT, STR$, etc. I know it has a ...
Maury Markowitz's user avatar
11 votes
3 answers
1k views

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

I implemented a differential equation solver on my Dragon 32 (which uses Microsoft Extended Color BASIC) but the results I get quickly diverge from those I expect, which are the same as those I get ...
Graham Lee's user avatar
12 votes
1 answer
2k views

How to quit MBASIC and return to CP/M?

I've tried everything I can think of. EXIT QUIT END STOP BYE Q…
Jacob Krall's user avatar
  • 2,230
15 votes
2 answers
763 views

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

This question is based on a comment by Neil on another question regarding integer-multiplication: Do you have any citations for your claim that most MS-BASIC integer multiplication was done by ...
Raffzahn's user avatar
  • 213k
27 votes
5 answers
7k views

Why was IBM BASIC so Huge?

The early versions of Microsoft BASIC required 4KB of ROM, and many versions existed in the 8KB and 16KB size. But Microsoft's IBM BASIC (known as "Cassette BASIC") for the original IBM PC (Model 5150)...
Brian H's user avatar
  • 60.1k
2 votes
3 answers
189 views

Semis and spaces in MS-alike BASIC PRINT commands

With the exception of DEF FN and the handful of direct-mode commands (CONT, LIST, etc), my interpreter is running most programs, but layout remains an issue. Here are three lines from the BASIC ...
Maury Markowitz's user avatar
2 votes
2 answers
269 views

INPUT with comma vs. semi

I certainly don't recall this at the time, but I'll ask to be sure. According to the GW-BASIC documentation, a semicolon between the INPUT prompt and the variable suppresses the question-mark prompt. ...
Maury Markowitz's user avatar
8 votes
4 answers
710 views

MS BASIC, access a DIMed variable with no index?

I'm working my way through my retrobasic interpreter, feeding it an expanding diet of 101 BASIC Games. Here's an odd one... 40 DIM F(6,6),H(6,6),A(4),B(4),C(6),L(3) ... 90 A=INT(6*RND(1)+1) This ...
Maury Markowitz's user avatar
4 votes
1 answer
574 views

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

I was always under the impression that MS BASIC implemented NEXT by pushing the address of the FOR on the stack. So convinced that when I read the source code I assumed CURLIN had to be referring to ...
Maury Markowitz's user avatar
14 votes
1 answer
1k views

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

As described by The Register in 2001, around 1987 journalists and others started asking Bill Gates for a copy of the source code for the original version of Altair (eventually Micro-Soft) BASIC, ...
cjs's user avatar
  • 24.6k
2 votes
1 answer
367 views

Long variable names in MS BASIC

From the Wiki: The final major release of BASIC-80 was version 5.x, which appeared in 1981 and added support for 40-character variable names, WHILE...WEND loops, dynamic string allocation, and ...
Maury Markowitz's user avatar
7 votes
4 answers
4k views

Library of MS BASIC programs in text format?

I am wondering if anyone has a pointer to a good source of "classic" BASIC programs, in text format. One would think this would be easy to find, but unfortunately VB so pollutes the results as to ...
Maury Markowitz's user avatar
2 votes
1 answer
275 views

Integer overflows in MS BASIC

I only recently learned that the early MS BASICs had integer variables and do not have a machine that runs it. So perhaps someone with a PET or C64 could answer these questions? For one, were there ...
Maury Markowitz's user avatar
2 votes
2 answers
268 views

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

Well, I've downloaded an old non-English textual adventure, which of course, "for the sake of professionalism" have list disabled. Even after entering pokes for enabling "run-stop/restore" and for ...
perpetuum's user avatar
9 votes
4 answers
995 views

Early BASIC memory management

Can anyone verify or correct my memory here? Long ago, I had access to a Commodore PET which I think had 8kB of memory. Also slightly less long ago, I had a Commodore 64 with its "elephatine" 64kB. ...
badjohn's user avatar
  • 2,014
11 votes
1 answer
625 views

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

Microsoft GW-BASIC on IBM compatibles allowed flags to the SAVE command, to indicate the manner in which a file should be written out. As I recall, it allowed for no flag to write a standard ...
user's user avatar
  • 5,246
5 votes
1 answer
412 views

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

In 1980's ROM (Apple IIe, Commodore 64, VIC-20, ...) which algorithm is used to compute exp(x), and where do the coefficients below come from? (Chebyshev, Remez, Pade, ...) .byte $71,$34,$58,$3E,$...
jpcohet's user avatar
  • 51
7 votes
1 answer
761 views

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

Various histories state that there were at least three versions of Altair BASIC, 4k, 8k and Extended - plus modifications like Disk. I've found some listings of the 4k, but does anyone have a short ...
Maury Markowitz's user avatar
8 votes
5 answers
761 views

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

Of the features that were not copied from BASIC-PLUS to MS BASIC only one seems to be a good idea, and I'm not sure it really is. I'd like to hear from people that have opened the guts of MS BASIC to ...
Maury Markowitz's user avatar
8 votes
2 answers
1k views

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

I was reading over a thread on BASIC speeds on various home computers and noticed an interesting point that was not explained. Apparently, in MS BASICs, a loop using FOR I= ... NEXT will run faster ...
Maury Markowitz's user avatar
10 votes
2 answers
3k views

Did Microsoft BASIC ever use Z80 only instructions?

Did Microsoft BASIC (or any of the OEM versions) ever use Z80 only instructions? For the purposes of this question I'm ignoring the equivalent of BIOS I/O layers which OEMs would have provided.
PeterI's user avatar
  • 5,277
11 votes
4 answers
2k views

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

I'm wondering if anyone has a document that describes the history of the BASIC interpreters used in the various Commodore 8-bit machines? Ultimately I'm trying to track down how it is that the A% ...
Maury Markowitz's user avatar
22 votes
4 answers
2k views

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

Looking through the source code of the 6502 MS-BASIC, certain parts of it seem more reminiscent of how things would be done on the 8080, then on how they should be done on the 6502. Code to find a ...
supercat's user avatar
  • 34.7k
35 votes
6 answers
3k views

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

I know the LET statement was available in AppleSoft and other Microsoft 8-bit BASICs back in the day, but I can't think of a time where I actually used it. Frankly, I get the impression that it was ...
bjb's user avatar
  • 15.8k