Bill Gates’ Personal Easter Eggs in 8 Bit BASIC

If you type “WAIT6502,1″ into a Commodore PET with BASIC V2 (1979), it will show the string “MICROSOFT!” at the top left corner of the screen. Legend has it Bill Gates himself inserted this easter egg “after he had had an argument with Commodore founder Jack Tramiel”, “just in case Commodore ever tried to claim that the code wasn’t from Microsoft”.

In this episode of “Computer Archeology“, we will not only examine this story, but also track down the history of Microsoft BASIC on various computers, and see see how Microsoft added a second easter egg to the TSR-80 Color Computer – because they had forgotten about the first one.

Stolen From Apple?

This whole story sounds similar to Apple embedding a “Stolen From Apple” icon into the Macintosh firmware in 1983, so that in case a cloner copies the ROM, in court, Steve Jobs could hit a few keys on the clone, revealing the icon and proving that not just a “functional mechanism” was copied but instead the whole software was copied verbatim.

Altair BASIC

Let’s dig into the history of Microsoft’s BASIC interpreters. In 1975, Microsoft (back then still spelled “Micro-soft”) released Altair BASIC, a 4 KB BASIC interpreter for the Intel 8080-based MITS Altair 8800, which, despite all its other limitations, included a 32 bit floating point library.

An extended version (BASIC-80) that consisted of 8 KB of code contained extra instructions and functions, and, most importantly, support for strings.

Microsoft BASIC for the 6502

In 1976, MOS Technology launched the KIM-1, an evaluation board based around the new 6502 CPU from the same company. Microsoft converted their BASIC for the Intel 8080 to run on the 6502, keeping both the architecture of the interpreter and its data structures the same, and created two versions: an 8 KB version with a 32 bit floating point library (6 digits), and a 9 KB system with 40 bit floating point support (9 digits).

Some sources claim that, while BASIC for the 8080 was 8 KB in size, Microsoft just couldn’t fit BASIC 6502 into 8 KB, while other sources claim there was an 8KB version for the 6502. The truth is somewhere in the middle. The BASIC ROMs of the Ohio Scientific Model 500/600 (KIM-like microcomputer kits from 1977/1978) and the Compukit UK101 were indeed 8 KB in size, but unlike the 8080 version, it didn’t leave enough room for the machine-specific I/O code that had to be added by the OEM, so these machines required an extra ROM chip containing this I/O code.

In 1977, Microsoft changed the 6 digit floating point code to support 9 digits and included actual error stings instead of two-character codes, while leaving everything else unchanged. A 6502 machine with BASIC in ROM needed more than 8 KB anyway, why not make it a little bigger to add extra features. The 6 digit math code was still an assembly time option; the 1981 Atari Microsoft BASIC used that code.

In 1977, Ohio Scientific introduced the “Model 500″, which was the first machine to contain (6 digit) Microsoft BASIC 1.0 in ROM. Upon startup, it printed:


In the same year, MOS started selling a tape version of 9 digit Microsoft BASIC 1.1 for the KIM-1. Its start message was:


Woz Integer BASIC

The 1976 Apple I was the first system besides the KIM to use the MOS 6502 CPU, but Steve Wozniak wrote his own 4KB BASIC interpreter instead of licensing Microsoft’s. An enhanced version of Woz’ “Integer BASIC” came in the ROM of the Apple II in 1977; Microsoft BASIC (called “AppleSoft”) was available as an option on tape. On the Apple II Plus (1978), AppleSoft II replaced Integer BASIC.

Commodore PET

Commodore had bought MOS in October 1976 and worked on converting the KIM platform into a complete computer system. They licensed Microsoft BASIC for 6502 (also October 1976), renamed it to Commodore BASIC, replaced the “OK” prompt with “READY.”, stripped out the copyright string and shipped it in the ROMs of the first Commodore PET in 1977.

The Easter Egg

In 1979, Commodore started shipping update ROMs with a version 2 of Commodore BASIC for existing PETs. Apart from updates in array handling, it also contained the WAIT 6502 easter egg.

This is what the easter egg code looks like:

.,D710 20 C6 D6  JSR $D6C6      fetch address and value
.,D713 86 46     STX $46        save second parameter
.,D715 A2 00     LDX #$00       default for third parameter
.,D717 20 76 00  JSR $76        CHRGOT get last character
.,D71A F0 29     BEQ $D745      no third parameter
.,D71C 20 CC D6  JSR $D6CC      check for comma and fetch parameter
.,D71F 86 47     STX $47        save 3rd parameter
.,D721 A0 00     LDY #$00
.,D723 B1 11     LDA ($11),Y    read from WAIT address
.,D725 45 47     EOR $47        second parameter
.,D727 25 46     AND $46        first parameter
.,D729 F0 F8     BEQ $D723      keep waiting
.,D72B 60        RTS            back to interpreter loop

On pre-V2 BASIC, the branch at $D71A just skipped the next line: If there is no third parameter, don’t fetch it. On V2, the line is subtly changed to make the two-parameter case branch to a small patch routine:

.,D745 A5 11     LDA $11        low byte of address
.,D747 C9 66     CMP #$66       = low of $1966 (=6502)
.,D749 D0 D4     BNE $D71F      no, back to original code
.,D74B A5 12     LDA $12        high byte of address
.,D74D E9 19     SBC #$19       = high of $1966 (=6502)
.,D74F D0 CE     BNE $D71F      no, back to original code
.,D751 85 11     STA $11        low byte of screen buffer = 0
.,D753 A8        TAY            index = 0
.,D754 A9 80     LDA #$80       high byte of screen buffer
.,D756 85 12     STA $12        screen buffer := $8000
.,D758 A2 0A     LDX #$0A       10 characters
.,D75A BD 81 E0  LDA $E081,X    read character
.,D75D 29 3F     AND #$3F       throw away upper bits
.,D75F 91 11     STA ($11),Y    store into screen RAM
.,D761 C8        INY
.,D762 D0 02     BNE $D766      no carry
.,D764 E6 12     INC $12        increment screen buffer high address
.,D766 CA        DEX
.,D767 D0 F1     BNE $D75A      next character
.,D769 C6 46     DEC $46
.,D76B D0 EB     BNE $D758      repeat n times
.,D76D 60        RTS            back to interpreter loop

The text “MICROSOFT!” is stored in 10 consecutive bytes at $E082, cleverly hidden after a table of coefficients that is used for the SIN() function:

.;E063 05                        6 coefficients for SIN()
.;E064 84 E6 1A 2D 1B            -((2*PI)**11)/11! = -14.3813907
.;E069 86 28 07 FB F8             ((2*PI)**9)/9!   =  42.0077971
.;E06E 87 99 68 89 01            -((2*PI)**7)/7!   = -76.7041703
.;E073 87 23 35 DF E1             ((2*PI)**5)/5!   =  81.6052237
.;E078 86 A5 5D E7 28            -((2*PI)**3)/3!   = -41.3147021
.;E07D 83 49 0F DA A2               2*PI           =  6.28318531
.;E082 A1 54 46 8F 13            "SOFT!" | backwards and with
.;E087 8F 52 43 89 CD            "MICRO" | random upper bits

If we reverse the bytes, we get

CD 89 43 52 8F 13 8F 46 54 A1

The easter egg code clears the upper 2 bits, resulting in

0D 09 03 12 0F 13 0F 06 14 21

The easter egg code does not print the characters through library routines, but instead writes the values directly into screen RAM. While BASIC used the ASCII character encoding, the Commodore character set had its own encoding, with “A” starting at $01, but leaving digits and special characters at the same positions as in ASCII. Thus, the 10 hidden and obfuscated bytes decode into:


Microsoft’s Code?

Commodore engineers are known for putting easter eggs into ROM, but there would be no reason for them to encode the string “MICROSOFT!” and hide it so well. The “WAIT 6502″ easter egg did not show up in Commodore BASIC until version 2, which is in contrast to almost all sources claiming Commodore licensed Microsoft BASIC for a flat fee and never returned to Microsoft for updates, but continued improving BASIC internally.

Commodore had indeed updated its source with Microsoft’s changes since V1. 6502 guru Jim Butterfield states:

Commodore paid Microsoft an additional fee to write a revision to the original BASIC that they had bought. Among other things, spaces-in-keywords were changed, zero page shifted around, and (unknown to Commodore) the WAIT 6502,x joke was inserted.

Targeting Commodore?

While all of Microsoft BASIC only depends on the CPU, makes no other assumptions on the hardware it runs on (be it Commodore, Apple, Atari, …), and does all its input and output by calling into ROM functions external to BASIC, the easter egg writes directly to screen RAM at a fixed address of $8000, and uses the PET character encoding for it: The easter egg has clearly been written specifically for the PET.

We can only speculate on the reasons why Microsoft and possibly Bill Gates himself added the easter egg. A possible reason is that Microsoft wanted to make sure Commodore cannot take credit for “Commodore BASIC” – similar to the “Stolen From Apple” case.

Or it was only about showing the world who really wrote it. Jim Butterfield: As an afterthought, Microsoft would have liked to see their name come up on the screen. But it wasn’t in the contract.

Commodore’s Reaction

The easter egg only exists in BASIC version 2 on the PET. All later Commodore computers didn’t contain it: The branch was restored and the extra code as well as the 10 bytes hidden after the SIN() coefficients were removed.

Jim Butterfield: Shortly after that implementation, I show this to Len Tramiel [of Commodore engineering] at the Commodore booth of a CES show. He was enraged: “We have a machine that’s short of memory space, and the #$#!* [Gates] put that kind of stuff in!!”

Commodore employee Andy Finkel states that the “Gates” (!) easter egg had to be removed for space reasons. It had occupied 51 extra bytes.

Interestingly, starting with the BASIC V7 on the C128 six years later, Commodore started crediting Microsoft, like this:

                (C)1977 MICROSOFT CORP.
                  ALL RIGHTS RESERVED

According to Jim Butterfield, this is probably due to negotiations concerning Microsoft BASIC for the Amiga.

The Easter Egg before the PET

But Microsoft did not encode its company name specifically for Commodore: The 9 digit BASIC 6502 version 1.1 for the KIM-1 contained the 10 hidden bytes:

.;3FAA 05                        6 coefficients for SIN()
.;3FAB 84 E6 1A 2D 1B            -((2*PI)^11)/11! = -14.3813907
.;3FB0 86 28 07 FB F8             ((2*PI)^9)/9!   =  42.0077971
.;3FB5 87 99 68 89 01            -((2*PI)^7)/7!   = -76.7041703
.;3FBA 87 23 35 DF E1             ((2*PI)^5)/5!   =  81.6052237
.;3FBF 86 A5 5D E7 28            -((2*PI)^3)/3!   = -41.3147021
.;3FC4 83 49 0F DA A2               2*PI           =  6.28318531
.;3FC9 A6 D3 C1 C8 D4            "!TFOS"
.;3FCE C8 D5 C4 CE CA            "ORCIM"

The extra bytes here are:

A6 D3 C1 C8 D4 C8 D5 C4 CE CA

If we XOR every byte with 0×87, we get:

21 54 46 4f 53 4f 52 43 49 4d

which, again, is “MICROSOFT!” backwards, but this time in the ASCII encoding. (Note that no XOR or add/sub can be found for the 10 bytes in Commodore BASIC that would convert them into ASCII instead of PETSCII. Also, thanks to Tom for his help here.)

The version of Microsoft BASIC for the 6502-based Apple II, called “AppleSoft“, contains the same 10 bytes after the coefficients in all tape and ROM versions. On AppleSoft II, for example, they are located at address $F075.

KIM-1 BASIC was released in 1977, AppleSoft II in spring 1978, and the V2 ROM of the PET in spring 1979. So Microsoft didn’t “target” Commodore with this at first, but probably put the data in for all their customers – possibly right after they had shipped the easteregg free V1 to Commodore. And when Commodore came back to them, they changed their codebase to encode string differently and added the easter egg code to show the string.

The Easter Egg after the PET

After the second source drop to Commodore, they removed the “WAIT6502″ code again, but kept the 10 encoded bytes in their master codebase: Every non-Commodore post-1978 6502 Microsoft BASIC with the 40 bit floating point library contains the 10 encoded bytes after the SIN() coefficients – still in PET encoding:

  • Tangerine Microtan 65
  • Tangerine Oric-1 and Oric-Atmos
  • Pravetz 8D

This is a snippet from microtan/tanex_h2.rom:

0000fd8: 0f da a2 a1 54 46 8f 13  ....TF..
0000fe0: 8f 52 43 89 cd a5 d5 48  .RC....H

The ROM of the Ohio Scientific Superboard II (and its clone, the Compukit UK101) as well as the Atari Microsoft BASIC tape are based on the 32 bit floating point version and don’t contain the easter egg data.

“MICROSOFT!” on the 6800 and the 6809

It doesn’t stop there: Even the BASIC versions on the TRS-80 Color Computer and the TRS-80 MC-10, which were versions for the 6809 and 6800 CPU architectures, respectively (BASIC-69 and BASIC-68), had the encoded “MICROSOFT!” string after the SIN() coefficients. Here is a snippet of Spectral Associates’ disassembly of the CoCo ROM in his book “Color Basic Unravelled II

BFC7 05                LBFC7   FCB   6-1                   SIX COEFFICIENTS
BFC8 84 E6 1A 2D 1B    LBFC8   FCB   $84,$E6,$1A,$2D,$1B   * -((2*PI)**11)/11!
BFCD 86 28 07 FB F8    LBFC8   FCB   $86,$28,$07,$FB,$F8   *  ((2*PI)**9)/9!
BFD2 87 99 68 89 01    LBFD2   FCB   $87,$99,$68,$89,$01   * -((2*PI)**7)/7!
BFD7 87 23 35 DF E1    LBFD7   FCB   $87,$23,$35,$DF,$E1   *  ((2*PI)**5)/5!
BFDC 86 A5 5D E7 28    LBFDC   FCB   $86,$A5,$5D,$E7,$28   * -((2*PI)**3)/3!
BFE1 83 49 0F DA A2    LBFE1   FCB   $83,$49,$0F,$DA,$A2   *    2*PI 

BFE6 A1 54 46 8F 13 8F LBFE6   FCB   $A1,$54,$46,$8F,$13   UNUSED GARBAGE BYTES
BFEC 52 43 89 CD               FCB   $8F,$52,$43,$89,$CD   UNUSED GARBAGE BYTES

You can tell that Microsoft didn’t reimplement BASIC for the remaining 8 bit architectures, but practically converted the 6502 code, copying all constants verbatim, even the ones they did not understand, since these are still the obfuscated bytes in PET-encoding.

A Second Easter Egg on the Color Computer

The TSR-80 Color Computer (1980) also has an easter egg in BASIC: If you type “CLS9″ (or any higher number), it will clear the screen and print “MICROSOFT”.

Let’s see how it is done:

                  * CLS
A910 BD 01 A0     CLS     JSR RVEC22     HOOK INTO RAM
A913 27 13                BEQ LA928      BRANCH IF NO ARGUMENT
A918 C1 08                CMPB #8        VALID ARGUMENT?
A91A 22 1B                BHI LA937      IF ARGUMENT >8, GO PRINT ‘MICROSOFT’
A937 8D EF        LA937   BSR LA928      CLEAR SCREEN
A939 8E A1 65             LDX #LA166-1   *
A93C 7E B9 9C             JMP LB99C      * PRINT ‘MICROSOFT’

The string to be printed is stored here:

A166 4D 49 43 52 4F 53 LA166 FCC 'MICROSOFT'
A16C 4F 46 54
A16F 0D 00             LA16F FCB CR,$00

That’s right, Microsoft added a different easter egg, and included the string “MICROSOFT” again, this time in cleartext. They seem to have forgotten about the obfuscated 10 bytes intended for the PET that had been copied from the 6502 version to the 6800 during conversion, and had still been present in the Color Computer ROM.

The same easter egg exists on the 6800-based TRS-80 MC-10 (also 1980), which also had the 10 PET bytes in ROM:

FBBF 27 13                BEQ $FBD4       ; branch if no argument
FBC1 BD EF 0D             JSR $EF0D       ; get argument
FBC4 C1 08                CMPB #$08       ; easter egg?
FBC6 22 1D                BHI $FBE5       ; yes
FBE5 8D ED                BSR $FBD4       ; clear screen
FBE7 CE F8 33             LDX #$F834-1
FBEA 7E E7 A8             JMP $E7A8       ; print "MICROSOFT"
F834 4D 49 43 52 4F       FCC "MICROSOFT"
F834 53 4F 46 54 0D       FCB $0D
F834 00                   FCB $00
F724 A1 54 46 8F 13       FCB $A1,$54,$46,$8F,$13 ; "!TFOS"
F729 8F 52 43 89 CD       FCB $8F,$52,$43,$89,$CD ; "ORCIM"

Microsoft BASIC 6502 Timeline

  • Version 1.0 (in the 6 digit version) is used on the Ohio Scientific, and contains a major bug in the garbage collection code.
  • Version 1.0 (in the 9 digit version) is also used in the first Commodore PET as Commodore BASIC V1. It is the oldest known Microsoft BASIC to support 9 digit floating point.
  • Version 1.1, which contained bug fixes, is used on the KIM-1. It is the oldest version to contain the “MICROSOFT!” string (in ASCII).
  • AppleSoft BASIC I is forked from Microsoft BASIC 1.1. It contains the ASCII string.
  • Microsoft BASIC version 2 changes the ASCII string to PET screencode, adds the easter egg code, and is given to Commodore.
  • The code is removed again after the source drop to Commodore. The Tangerine Microtan is based on this.
  • Apple, Commodore and Tangerine continue development of their respective forks without the involvement of Microsoft.
  • The BASIC V2 used on the VIC-20 and the C64 is actually a stripped-down version of PET BASIC 4.0 and not a ported version of PET BASIC V2.

So did Bill Gates write it himself?

Altair BASIC was written by Bill Gates, Paul Allen (the founders of Microsoft) and Monte Davidoff (a contractor), as comments in the original source printout show:


Bill Gates wrote “the runtime stuff” (which probably means the implementation of the instructions), as opposed to “the non-runtime stuff” (probably meaning tokenization, memory management) and “the math package”. Consequently, the implementation of the WAIT command would have been his work – on the 8080, at least.

Now who wrote the 6502 version? The KIM-1 BASIC manual credits Gates, Allen and Davidoff, the original authors of the 8080 version, but it might only be left over from the manual for the 8080 version. Davidoff, who worked for Microsoft in the summers of 1975 and 1977, had not been there when BASIC 6502 was written in the summer of 1976, but he probably changed the 6 digit floating point code into the 9 digit version that is first found in BASIC 6502 1.1 (KIM-1, 1977).

The ROM of the 1977/1978 Ohio Superboard II Model 500/600 (6 digit BASIC 1.0) credits RICHARD W. WEILAND, and the 1977 9 digit KIM-1 BASIC 1.1 as well as the 1981 Atari Microsoft BASIC 2.7 credit “WEILAND & GATES”. Ric Weiland was the second Microsoft employee. These credits, again, were easter eggs: While they were clearly visible when looking at the ROM dump, they were only printed when the user entered “A” when BASIC asked for the memory size.

According to, Marc McDonald (employee number 1) wrote the 6502 version, but it is more likely that McDonald wrote the 6800 simulator and Weiland ported 8080 BASIC to the 6800 and then McDonald adapted the 6800 simulator to the 6502 and Weiland wrote the 6502 BASIC.

This and the hidden credits in version 1.0 of 6502 BASIC suggest that Weiland was the main author of 6502 BASIC. Gates is added to the hidden credits in the 1.1 version, so Gates probably contributed to the 1.1 update..

So it is very possible that Gates wrote the easter egg code himself, given that he was responsible for the implementation of WAIT on the 8080, he is credited in BASIC 6502 1.1+, Finkel and Butterfield refer to WAIT6502 as “Gates’” easter egg – and after all, he can write code.

Open Questions

  • What was Atari’s version based on? What versions were there? Atari Microsoft BASIC images are very hard to find.
  • Why did Atari use the 6 digit version, if they extended it with lots of commands (so size couldn’t have been an issue)?

Annotated Disassembly of Different Versions

pixelstats trackingpixel

85 Responses to “Bill Gates’ Personal Easter Eggs in 8 Bit BASIC”

  1. [...] [upmod] [downmod] » Blog Archive » Bill Gates’ Personal Easter Eggs in 8 Bit BASIC ( 2 points posted 7 months, 2 weeks ago by jeethu tags basic microsoft [...]

  2. MC Coder says:

    There is another name hidden in the TRS-80 MC-10 ROM. At $FFD2 the ASCII text ‘Chamberlin’ appears in reverse order.

  3. Kenny Milalr says:

    There’s another side to this story.
    Microsoft also wrote the Basic interpreter for the ill fated Mattel Aquarius.
    I dumped the rom and did a dis-assembly of it back in 2000, which you can find here:

  4. Rhys says:

    I know what you are part of and all of your fake fucking names,. my COMMODORE

  5. Scott Houdek says:

    i got the 1.0 version, but………….., it’s nice attempt, YOU SHOULD HAVE ON LINE MANUAL for those don’t know how to use this application!.

  6. Where did you get all of those stuffs? I remember about the BASIC. that time I still a child. I remember when my dad bring home one of that. Also, when I was in elementary, I took computer lesson and they teach me about it. Now, I forgot how to do it.

  7. John says:

    Just proving that anything M$uX is bloated and sux. Lol

  8. tenox says:

    you missed Microsoft BASIC for XENIX, MS own Unix

  9. bill gates says:

    This history is SURPRISINGLY accurate.

    Rick Weiland and I (Bill Gates) wrote the 6502 BASIC.

    I put the WAIT command in.

    Mark Chamberlin and I wrote the 6800 BASIC.

    When it says Paul Allen wrote the non-runtime stuff that means the development environment which was an amazing piece of work he did on the PDP10 that made development work very productive including simulation and symbolic debugging.

    There were a lot of interesting versions of BASIC done for Japanese machines this article misses and then of course we did the IBM PC ROM BASIC (Neil Konzen and a few other people did most of the conversion work).

  10. ManikMike says:

    I “unravelled” the TRS-80 Color Basic ROM using the following program:

    10 CLS
    30 J=PEEK(I)
    40 J=J-INT(J/64)*64
    50 IF I>&HBFE6 THEN A$=A$+CHR$(J+64) ELSE A$=A$+CHR$(J)
    60 NEXT I
    70 PRINT A$

    Looks like those “UNUSED GARBAGE BYTES” are indeed the


    Easter Egg

  11. Sven Schubert says:

    Hmm, it’d be interesting to see if any of those easter eggs persist in the “RBASIC” interpreter for an East German machine called robotron A5105.

    It was manufactured by GDR’s company “robotron” and featured a Z80A clone (U880D), a “GW BASIC compatible” BASIC interpreter in ROM and a CP/M 2.2 clone also in ROM (“SCPX5105″). Interestingly, the OS booted depended on the existance of an empty file on the first floppy drive named “SCPXA5105.SYS” – if it was there, CP/M loaded, otherwise RBASIC.

    Robotron was known for its “creativity” when it came to “adapting” existing western hard- and software for their own socialist product line (CP/MSCP, dBASEIIREDABAS, SuperCalcKP, MS-DOSDCP etc pp).

    Robotron as a hard- and software manufacturer didn’t survive the fall of the Iron curtain and what little is left of it is still very paranoid about discussing this aspect of their creative process ;-)

    Well I guess I’ll see if I can find a ROM image somewhere or fire up one of the old machines even :-)

  12. iss says:

    Confirmed for Tangerine Oric-1 and Oric-Atmos and Bulgarian clone Pravetz 8D.
    Here is the code for above ROMs (Thanks to ManikMike for idea and source :)) :

    1 ‘***********************
    2 ‘ MICROSOFT! Easter Egg
    3 ‘***********************
    4 B=#E435 : E=B+8
    5 FOR I=E TO B STEP -1
    6 J=PEEK(I) : J=J-INT(J/64)*64
    7 IF I>B THEN A$=A$+CHR$(J+64) ELSE A$=A$+CHR$(J)
    8 NEXT I
    9 PRINT A$

  13. [...] Gates certainly trounced his competitors with this approach – he just shipped a variant of Basic to anyone quickly, with flags set all over the source code to make the hacks work. He got to market [...]

  14. Petr Antos says:

    Nice to hear BillG here :) Those japanese portables are here:, and I am pleased to have working Olivetti-M10 as precious thing, as by linked interview, its the last machine where Gates designed the 32kB(!) ROM a lot. In today context of phones and slates, they are beautifulll :-) On 4 AA cells for 20 hours of typing on regular keyboard :-). Thanks for all…..

  15. Ed says:

    Given the ubiquity of 9-digit 6502 MS-BASICs, my surmise is that
    this came first – the 6-digit version being a derivative (replete with
    conversion bugs) made upon request for customers like OSI.

    From my notes on the string garbage collector bug in OSI ROM BASIC :

    > There were two distinct bugs in the garbage collector.
    > 1. Bad traversing of the arrays area due to wrong string
    > step size. OSI Disk and other 6502 Basics use a step
    > size of 3. Rom Basic also used 3 but actually needed 4.
    > 2. Temporary strings were not collected.
    > Bug 1 was quite serious and often led to crashes if string
    > arrays were used. It only occurs in OSI/UK101 Rom Basic.
    > (I’m unaware of any 4-byte 6502 MS Basic other than OSI).
    > Bug 2 would result in corrupted strings but not crash the
    > computer. The incidence of the bug hitting was fairly low.
    > It occurs in early 6502 MS Basics (OSI/UK101 Rom Basic,
    > OSI Disk Basic, PET 2001 etc).

    The “step size of 3″ occurs in 5-byte 6502 MS-BASICs. That it
    also appears in 4-byte OSI ROM BASIC and was the source of a bug
    that occured exclusively in that machine is suggestive that
    OSI ROM BASIC was derived from a 5-byte 6502 MS-BASIC.

  16. [...] pero es el más famoso y nos vuelve a mostrar una faceta no tan rígida de Bill y compa?ía.Vía: PageTable /**/ Tweet MenéameTuentidel.icio.usGoogle Buzz Dirección para [...]

  17. [...] shell of the C64 was Commodore BASIC, a derivative of Microsoft BASIC for 6502. So you would load BASIC programs from disk with the “LOAD” command, you [...]

  18. Phil says:

    On the Laser 128EX (Apple IIe clone) computer, if you do CALL -151 to enter the monitor, then F094L, you?ll see the 10 bytes at addresses F094-F09D contain the ASCII text “ANITA&PHIL”.

  19. überRegenbogen says:

    Phil said
    | On the Laser 128EX [...] F094-F09D
    | contain[s] the ASCII text ?ANITA&PHIL?.

    Nice tidbit! (I’d still like to score one of those.)

    FWIW, that decodes (per the obfuscated “MICROSOFT!” encoding) to “KNOW!FSNIF”.

    0300: A0 09 LDY #$09
    0302: B9 94 F0 LDA $F094,Y
    0305: 49 07 EOR #$07 ; $87 yields inverse/flash
    0307: 20 ED FD JSR $FDED ; on an A2
    030A: 88 DEY
    030B: 10 F5 BPL $0302
    030D: 60 RTS

  20. Jason Harmon says:

    I might be able to answer the questions about the Atari version. The Atari OS uses 6 byte floating point in the OS by default. The OS ROM (outside of BASIC) has a set of floating point functions that work against these 6 byte structures. I suspect that MS continued to use the 6 byte format so it could use the OS’s FP functions or for compatibility.

    I have original working copies of both the Atari MS Basic v1 (disk based) and v2 (16KB ROM cart with disk based extensions), and could provide an image of these for review.

  21. Dear Bill, thank you! At last all this seems a lot easier. And if anything has come of al this I feel the confidence in responding in a semi-knowledgable way. Microsoft is amazing just keep rockin’ n’ rollin’.

  22. Boisy Pitre says:

    Great write-up. I’m writing a book on the history of the TRS-80 Color Computer and am actively searching for Mark Chamberlin (Chamberlain?) who wrote the 6809 BASIC interpreter code for the CoCo. There’s confusion on the spelling of his last name; I’ve seen both spellings. If anyone knows his whereabouts, please email me at

  23. Andy Finkel says:

    Those bytes were important; Bob Russell and I had to really dig to free up bytes by the 1s and 2s to put in bug-fix patches back in those days. We were even reduced to using my my .byt 1c and 2c tricks to skip instructions. Those 51 bytes were a gift from heaven :-)


  24. Realms of Quest says:

    When I was making a retro RPG in 2009 for the VIC 20, instead of reinventing the wheel to perform math functions, I simply made function calls to the BASIC ROM. A lot of it was documented, but I couldn’t find anything on how Microsoft BASIC floating point numbers handled operations so I had to test it in various ways until I figured it out.

    I document this here:

  25. Realms of Quest says:

    The operations I am referring to in my comment above are greater than, equal, and lesser than.

  26. Dan Schwartz says:

    Very interesting.

    Since the OSI (Ohio Scientific) ROM Basic with the buggy garbage collector was the first version of Microsoft’s 6502 Basic, there was no earlier version with 9-digit (5-byte) floating point that the wrong step size could have been copied from. But perhaps one was originally planned, but the plans were changed before it was finished. You do have to wonder why it was REV 3.2 if it was the first version released.

    BTW, I checked OSI’s later 9-digit version of Basic, and it does include the obfuscated MICROSOFT! (not the Commodore-ized version).

    As for Atari Microsoft Basic, it surely didn’t use Atari’s ROM-based floating-point package, since that stored numbers in decimal (BCD) form. I think the Atari Microsoft Basic (which I never used) had both single- and double-precision numbers, much like GWBASIC and its predecessor, MBASIC for CP/M. So single-precision would have been the 6-digit (4-byte or 32-bit) floating point. The Basics that used the 9-digit (5-byte or 40-bit) format did not include double-precision.

  27. Dan Schwartz says:

    Well, another article on this site (Create your own Version of Microsoft BASIC for 6502) says that PET Basic version 1 was the first 6502 Microsoft Basic, so it is a little confusing. I was going to follow up the comment I made above by saying I didn’t think the OSI ROM Basic could have been the first version, because OSI actually had a disk-based version of their 6-digit Basic (shipped only with their earliest systems) that had to precede the ROM version. I’m pretty sure it signed on with the same VERSION 1.0 REV 3.2 message as the ROM version, and my understanding was that it didn’t have the deadly garbage-collector bug that the ROM version did, only the less-serious bug, but I never got the chance to verify that. Anyway, I think the sequence may have been the OSI 6-digit disk Basic first, then their ROM version, then PET Basic version 1, then OSI’s 9-digit disk Basic (which they extensively modified themselves in several different ways for their OS-65D 3.x and OS-65U operating systems).

    BTW, Mike Cohen (who I worked with in 1982-83 writing software for OSI machines) was definitely mistaken when he claimed in a comment left here in 2008 that the message ?Written by Bill Gates? ever appeared in OSI Basic; it was always, as the image above shows, “WRITTEN BY RICHARD W. WEILAND.” The message was supposed to be preceded by a form-feed, ASCII character 12, but outputting character 12 on the OSI ROM-based computers produced a graphic that was intended to be half of the starship Enterprise, and that is what you can see in photo. Mr. Weiland passed away in 2006.

  28. [...] 1975. The PET and Apple II both came out in 1977, both using Microsoft BASIC. Relevant articles: Bill Gates' Personal Easter Eggs in 8 Bit BASIC Create your own Version of Microsoft BASIC for 6502 __________________ Read my blog! The [...]

  29. hhm says:

    A story of how a child found this “secret” on a TRS80 CoCo he was using…

  30. David Mercer says:

    I can’t vouch for Apple ][ ot ][+ machines, but the ][e had BOTH Woz's Integer BASIC and AppleSoft BASIC in it. You booted it while holding down (IIRC) Left-Shift and you got Integer BASIC. Which was sometimes what you wanted because you had more RAM, could do differnet things with graphics, etc. Mostly only people also fooling with asm code dropped into it.

  31. nike blazer chaussure…

    Jonathan writes: A single display that was in no way talked about inside the prior Wasteland posts has become AND Yet again. It was humorous and wise with lots of beneficial characters and genuine emotion. One time and it was carried out, never ever to…

  32. shoes nike pas cher…

    Fencing is a different more often than not ignored safety function in baseball. Any fencing that’s pulling absent in the help submit needs to be fixed swiftly and appropriately to help prevent damage. Care will need to also be taken if you can find an…

  33. nike fee says:

    nike fee…

    The Starting Of A new BusinessMichael Signifies launched the business from humble beginnings. Born in Slonim, Russia in 1859, he emigrated being a young man to Leeds, exactly where he joined a enterprise that employed refugees. He was taken on from the…

  34. sac louis vuitton speedy 30…

    Papeterie est une autre une autre cruciale n?cessit? que vous exiger acheter . Books , la fois chaque exercice et texte livres n?cessaire , m?me si coll?ges offre ceux-ci ? leurs biblioth?ques , c’est recommand? que le enfant a afin que ils peuvent em…

Leave a Reply

To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word