Does it mention...
Gates' famous 'open letter' from 1976, complaining about people ripping off his basic for the 8080?
Microsoft has open-sourced the version of BASIC it created in 1976 for the MOS 6502 processor used in many early microcomputers. As the software colossus explained in a Wednesday post, Microsoft founders Bill Gates and Paul Allen wrote the company’s first product, BASIC for the Altair 8800 microcomputer and the Intel 8080 …
Do I disagree with it? Yes, at the time I did[0]. Almost everybody in the industry laughed at that letter. And promptly ignored it.
Remember, at that time virtually every program came with the source code. If it didn't, you could get it. The way the law was written (at least here in the US), binaries weren't copywriteable, so code had to ship with source. It wasn't until 1983 that Apple managed to change that (see Apple v. Franklin.), thus bringing the landsharks into the world of software.
Apple, Inc ... Stifling innovation, since 1983.
[0] I probably still do, but I haven't read it since '76 ... my view on the subject has undoubtedly changed since then, but probably not enough to make a difference.
At the time Germany had laws that said there is no copyright, but copying work for free that a competitor created at huge cost is “unfair competition” which is illegal. That wasnt just software, but also things like phonebooks, dictionaries and so on.
So it was explicitly _not_ fair to just copy. As long as you copied from a competitor.
If you have a copy of any software, you should have the freedom to make copies of it - it is ridiculous to restrict invocations of the cp command.
Although that is only one of the 4 essential freedoms; https://www.gnu.org/philosophy/free-sw.en.html#four-freedoms
If time and money was "put into" some software and profit is wanted, then clearly such company shouldn't provide a copy unless their wanted payment is made (although selling copies of software is mostly redundant now - as anyone with a computer can copy software - nowadays in 99% of cases, the money is in support or warranty).
Funny. I never got sources to the BBC MOS nor it's BASIC. What I got were two ROMs in a machine stuffed with chips (the Oric looked positively barren in comparison). Didn't get the sources to EDWORD2 either, or... You get the point. On this side of the often, in the home computer boom, source code was a little known thing. I'd wager that most people wouldn't know what to do with it, and many of the machines, as sold, wouldn't be able to build their own firmware. So we got ROMs and EPROMs and cassette tapes and stuff that just worked.
This post has been deleted by its author
So true. The number of times I plucked up courage to go into the newsagent for a copy of Sinclair User but lost my bottle at the last minute under the withering and judgemental stares of the staff and customers, having to scuttle out instead with a far more socially-acceptable copy of Goat Fetishist Weekly*...
(*the only top-shelf mag to have a regular Kid's Section, of course)
Yes, I'm sure we all remember the Readers' WivesPrograms sections in the magazines of the day - pages of BASIC and assembly code, most likely with a few bugs added for good measure. But you never got to see the source code for the commercial stuff distributed as binaries or in the firmware.
In Apple v Franklin the court found that according to existing principles of copyright, it was infringement to copy ROMs if the code they contain amounts to the expression of an idea rather than the idea itself, in particular being interested in whether the code contained is the only way to achieve an idea or whether it's one that was selected from a range of possibilities.
So, sticking with an example machine already raised, the composite colour ROM in an Oric — essentially a PCM sampling of the composite pattern that should be produced based on the TTL RGB colour — probably isn't copyrighted under that test. But the BASIC ROM is (modulo that it might itself be an unlicensed copy of Microsoft BASIC, though I'm not sure whether that's apocryphal).
I'm honestly unclear on what basis you think that decision was flawed, or really anything other than inevitable. If you don't like the concept of copyright then fair enough, agree to disagree, but it's an odd case to focus your ire on.
If someone's motivation were more anti-Apple then they should probably even celebrate it: between that ruling and the complete lack of any meaningful order or separation of concerns in Wozniak's coding it more or less strangled the Apple II clone industry in its cot and thereby cemented the IBM PC as the thing that grew into a commodity. IBM's lawyers were just as keen as Apple's but the PC BIOS has a clean and well-documented interface as far as it goes.
Unfortunately, the 6502 assembler I wrote many decades ago doesn't support macros or many of the storage directives in this particular assembler dialect.
The online 6502 assemblers I've tried so far choked on the "TITLE" directive on the first line.
So if during the course of your weekend you identify a compatible assembler, please let us know!
I was.
While I'm certain this is the first official MS release of the source into the public domain, this definitely isn't the first time the source has been put up on GitHub so I'm pretty sure there are ways to assemble it.
Pagetable.com and a few other sites have covered the earlier release quite extensively
There are a number of compilers outside of GCC.
- SDCC (Small Device C Compiler) is adding 6502 support,
- the cc65 project has a pretty mature compiler, assembler and linker.
- Most intriguing is the LLVM-MOS, is a fork of LLVM that includes support for a number of 6502 variants.
On the face of it, 6502 is not well suited for C code generation. The lack of registers and the difficulty of implementing a recursive stack for auto variables means that code density is low compared to more modern machines. This is generally true of 8-bit microprocessors. Z80 had more registers on chip and was a little more C-friendly. The 6809 was the first 8bit machine with decent addressing modes and stack awareness to make idiomatic C code possible. And of course, the 64K address space limits what can be done easily.
Microsoft's early BASICs were based around 8080, and they struggled with code density even when hand coding assembly. In terms of speed, there's not a ton of difference in the end products (all things being comparable), but You can squeeze more code into 8K using an 8080 compared to 6502.
Do check out the CC65 and LLVM-MOS projects if you are curious about compilers.
Spent a lot of time on 6502 assembler for embedded work, and the indirect via page zero addressng modes were very powerful, if you knew how to use them. Even shelled out on the Manx C compiler, but the code density was dire. No worse than Keil C for the 8051 series, which produced pages of code for just hello world. Only so much that can be done with an 8 bit architecture.
Page 0 was where all the real fun was to be had; it's where all the cool kids hung out. :)
For those that have no clue what this is all about, which is probably most people, the 6502 accessed memory in 256 byte pages. This was efficient enough except when accessing data over a page boundary at which point this added additional instruction cycles to the execution time and when timing was critical this could be really important to take into account.
Page 0 was a special case and was the first 256 bytes of RAM on the system and the CPU started at byte 0 in page 0 when booting. More usefully there were special instructions that only worked with page 0. These instructions were either faster than equivalent instructions elsewhere or required less bytes to store, and frequently both. It may not seem much but when an instructions takes, for example, 5 clock cycles elsewhere but 4 clock cycles in page 0 that's a significant speed increase.
Close, but not entirely correct.
First, the CPU does not begin execution at address $0000 at startup. The RESET circuitry places the hardware reset vector address $FFFC on to the address bus, loads PC (the program counter) with the 16-bit address stored in the two consecutive bytes there, and then starts executing instructions from that address.
Secondly, there are no special Zero Page instructions. The 6502 addressing mode choices include Zero Page, and a subset of the instruction set supports that mode. The 'special sauce' of ZP addressing is a hardware shortcut in the instruction decode logic which reads one instead of two bytes as the instruction address operand, sets the target address lo-byte to the operand value, and forces the address hi-byte to zero. This saves a clock cycle during instruction decode as the address hi-byte does not have to be fetched, thus making read/modify/write operations in page 0 quicker than anywhere else in memory - and variations of ZP mode which offer indirection make for very fast jump tables or array processing logic.
Apart from being a bit faster than absolute addressing (i.e. anywhere in the 64K memory map), the real special sauce of zero page on the original 6502 are the indirect indexed and indexed indirect modes, and later on the 65C02, the purely indirect modes. By which I mean instructions such as
LDA* (nn),Y: Read the contents of zero page nn and nn+1 as an address, add Y, and then read the contents of the 16 bit address thus created.
LDA (nn,X) : Read an address from (nn+X, nn+X+1) and then use that as a pointer to read from the 64K address space.
LDA (nn) - (65C02 only). Read the contents of zero page addresses (nn, nn+1) and use that as a pointer to read from the 64K address space.
* LDA as an example, but STA, ADC, SBC, ORA, EOR, AND, etc. too.
This zero page magic was necessary as the two index registers were only 8-bits, which on its own would be overly restrictive, but it emulated in the case of (nn),Y or (nn) potentially a lot more 16 bit index registers, or in the case of (nn,X) tables of indices. Essentially 6502 programmers would treat zero page, not just as standard memory, but as a register bank.
After some 50 years of this design, I want to put it on record that the (ZP),Y addressing mode was much more useful than (ZP,X). Also, so many design patterns require you to use the first mode for addressing data with fully dynamic pointers, and you tend to spend eternities setting Y to zero or 1 when moving 16-bit data around. Also the original instruction set could increment or decrement X, Y or a specified memory location +/- 1 but NOT THE ACCUMULATOR. Other things that we'd see as omissions today, like the lack of multiply instruction, are honest reflections of what could be done at low cost in that area of tech at the time.
Various later iterations fixed this by adding (ZP) addressing modes without Y, or adding INC A/DEC A opcodes. It's a clever device for the mid-70s, and it will be forever part of my career in IT, but those are reasons why the code density can't match 8080 or Z80 in the general case.
The 6809, a few years later, was so much nicer but for Motorola it was too little, too late and too costly, which was one reason they decided to leapfrog the 16-bit market and with the 68000 get a toe-hold on 32-bit computing.
Yes, almost always used (ZP),Y, hardly ever used (ZP,X).
A trick with (ZP),Y if you were using it to traverse chunks of memory was to set your indirect address at ZP, some address in zero page, to XX00 and keep the LS byte of the address in Y. Then at the end of an iteration you'd do an
INY
BNE skip
INC ZP+1
skip: - compare ZP+1, Y with your end condition.
because INY was 2 cycles, INC ZP was 5, and for your end condition CPY nn is always going to be faster than LDA ZP, CMP nn.
If you were lucky and knew in advance what the state of the carry flag was going to be from some previous comparison, shift or adc/sbc, ADC #0 (if you know C=1) or ADC #1 (if you know C=0) is only 1 byte longer than INCA would be in the 65C02, and takes the same number (2) cycles, similarly for SBC and DECA.
In my 8 bit days the 6502 was what I used most, along with a couple of projects on the 6809 and Z80. The 6809 was my favourite for programming.
I suspect having spent 7 years programming 6502s before I programmed a Z80, my Z80 code was horribly unoptimised for that CPU.
I'd suggest running a PDP-10 emulator. I use "PanelSim" on my Linux laptop. It includes Incompatible Timesharing System, TOPS-10, software for both, and a GUI front panel emulator which you can mouseclick-activate the buttons and knobs. (PanelSim uses SimH as a backend.)
Funny you should mention that. Because I wrote a 6502 assembler in Commodore BASIC. Back then, I was a broke teenager and couldn't afford the $35 for the macro assembler so I did the next thing and wrote it myself. The C-64 didn't have any kind of text editor so I wrote a simple EDLIN style one, also in BASIC.
The whole setup worked pretty well. Best $35 I didn't spend.
Don't laugh too loudly - about a decade ago I got a job because of a 6502 assembler listing on the companies 'history' wall; they were impressed when I started at the beginning and explained what the program was doing. Nice that it was for a system I remembered from my mis-spent youth :)
This post has been deleted by its author
Proof, please. And I wonder how many Unix code was actually copied, since most developers had the source, while Microsft didn't have the CP/M source.
This is also valid for the Java version Google uses in Android.
Otherwise you'r just a MS hater just because you had to pay for its software or use illegal copies.
You mean never rewrote any part of DOS from scratch? I disagree.
Microsoft rewrote the filing system interface and underlying implementation from scratch for DOS 2, modelling it on UNIX-style file streams in order opaquely to support directories, multiple users, network drives, and any other novel filing systems that might become relevant.
This replaced the file-control block interface of CP/M and DOS 1, in which the storage for any given file's state has to fit within a fixed-size blob owned by the calling application. This was a substantial internal change relative to the limited total amount of functionality that DOS implements; it's less true to call it just a filing system dressed up as an OS than it is with CP/M but, well...
There was also the abandoned multitasking DOS 4, a few years before Windows 3.x became the Microsoft thing that can multitask DOS applications. That made it out briefly, so the rewriting must have happened.
Multitask... the only way to get a Microsoft OS prior to NT4, and in consumer OSes Windows 2000, to actually multi task was to use to multiple computers. Anything else was purely cooperative and any application or system function that wanted to use 100% CPU could and there was nothing much that the OS could do about it.
Wrong. Windows 95 was not cooperative multitasking. It lacked the process separation and security of NT, but it was pre-emptive multitasking - witn 32 bit apps.
Anyway Mac OS wasn't pre-emptive until MacOS X (2001, six years after Win95), and it looked nobody complained...
Windows 95 used concurrent multitasking for all win32 apps.
Windows 3.x used concurrent multitasking for DOS apps if you had a 386 or better.
You're thinking of native Windows applications; these were cooperatively multitasked prior to Windows 95.
But at least, unlike Mac OS, they were designed to be from day one. Prior to the MultiFinder Mac OS was explicitly single-tasking (desk accessories aside, which had specialised constraints).
*sigh* for the sad little anti-Microsoft troll, https://lunduke.locals.com/post/4037306/myth-windows-3-1-was-just-a-shell-on-top-of-dos is just one of many statements of reality available to anyone will the intellectual capacity honestly to enquire. Amongst other things:
> Win386 ran individual "V8086" processes -- which was a key feature of the Intel 386 processor running in Protected Mode -- in a completely preemptive multitasking way.
> This is key: All DOS applications ran as independent "V8086'' processes.
> Which means that, if you were running DOS software under Windows 3.1... every single DOS application was preemptively multitasked.
If I recall correctly, in Windows 95 each DOS box was pre-emptively multi tasked, using the 386 VM features although I suspect that quite a lot of the underlying code derived from MS-DOS wasn't reentrant and was protected by some locking mechanism, But yes, the DOS apps could run without modification and pre-empted.
By the same token, the 16-bit & 32-bit windows apps were scheduled co-operatively? There were some subtle distinctions between the previous Windows/386 product which used a few 386 features to run DOS boxes and supported the 16-bit Windows API. There was a Win32S bodge to run limited 32-bit Windows apps, there was Windows 95 itself which supported native Win32 apps... I'm fairly sure , forgive an old man.
"Multitask... the only way to get a Microsoft OS prior to NT4"
...was to get NT3.x ?
"and in consumer OSes Windows 2000, to actually multi task was to use to multiple computers."
That's just nonsense. People used multiple software concurrently since Windows 2.0 at least. You could even multitask in DOS. It just wasn't preemptive multitasking.
I never saw the multitasking MSDOS 4 in the flesh, but did come across the documentation for it.
A lot of the concepts described (and their naming) later appeared inside OS/2 and WinNT. It DID pre-emptive multitasking.
Things get confusing to most folk because IBM's marketing department insisted on renaming DOS 3.4 as DOS 4.0.
There were two different versions of DOS 4.X ... The first one, released in mid 1986 (my copy says May), was based on MS-DOS 2.x, but with multitasking built in. It was mostly a European release, but I saw it here in the US in a few places. Only a few OEMs shipped product with it installed (including ICL!), and I don't believe it was ever sold as a stand-alone product. It was widely ignored, with most folks gravitating to 1985's DOS 3.
The second 4.x was the widely mocked IBM PC-DOS 4.00, released in July of '88, and the Microsoft bug fix release, MS-DOS 4.01, released in April of '89.
Note that all versions of DOS from 2.0 (October '83) on came with the PRINT command. Background printing is technically a form of multitasking. See also so-called TSRs, and IBM's TopView from '85.
... I was hacking on the proto-BSD in C and assembler. When I read about MS-BASIC in one of the trade rags (probably computerworld ... infoworld came about a year or two later), I remember thinking "Oh, goody. Yet another dialect of BASIC. Just what the world needs ... ".
I never did see a use for it.
"....from that double barrelled company 'Micro-Soft'"
Not to be confused of course with "microsoft" (with a small m).
https://www.zdnet.com/article/microsoft-everywhere-except-underwear/
BLUF: The software company claimed people would be confused between their products and Asda's range of "microsoft" underwear.
"I was hacking on the proto-BSD in C and assembler."
Which suggests you were at Cal ca 1976 and doing your dirty work in Evans Hall, or perhaps Corey Hall.
The first comment I heard about the C language was that it was "an abomination in the eyes of the Lord" and a comment "If Bell Labs hadn't invented the transistor, the phone company would still be using vacuum tubes".
FWIW, I got a BS degree and MS degree from Cal in '76 and '78 respectively.
I did most of my dirty work at home in Palo Alto, where it was quieter.
Almost as soon as computers became more than somewhat useful to business, they were accessible from home. The Teletype Model 33 came out in 1963, and was in common(ish) use by top-tier remote mainframe support staff from home by the late 1960s. Dad had one installed in '67 or thereabouts ... the company even brought a second POTS line into our house for it, their dime. I soon used the same system to access ORVYL, the Stanford timeshare system, with the blessing of Dad's company. (I also later used it to access a new-fangled thingie that DARPA had Stanford and Berkeley et al working on ... but that's another story for another day.)
Thanks for the correction!
I remember looking through the documentation for GE's timesharing service that was being used by the college where my dad was teaching circa 1969. My first exposure to computer programming was at the local CDC office a mile east or so of UCSD, and learned to like the IBM keypunches.
Working from home is a little bit different when using a fiber optic internet connection with 20 million times the data rate used by the model 33, along with a key board that's easier to type on the the model 33.
You can have Algol 60, or Algol 68.
The 32 bit time stamp is a signed integer, so the beginning of 1968 would be represented by -63 million or thereabouts (although the first working implementation of Algol 68 wasn't until 1970 anyway), while 1960 would be around -315 million.
Assuming its negativeness is honoured, 32-bit Unix time should be able to represent dates back to about 1902.
"glosses over how Microsoft later, ahem, drew inspiration from CP/M when creating MS-DOS"
Seattle Computer Products' 86-DOS possibly infringed on Kildall's CP/M, but MS had nothing to do with that.
According to Kildall, what happened was an artifact of the times.
86-DOS wasn't a port of CP/M. It was a re-write that used the same API. Gary told me several years later that he didn't think it was a direct rip-off, just an unauthorized use of the published API. Back then, such use wasn't codified into law, wasn't illegal, and in fact it was completely normal. SCP was legally allowed to do what they did, and MS was legally allowed to purchase it and re-license it to a third party. Just as MS did later with AT&T Version 7 UNIX, which MS distributed as Xenix ... and everybody+dog did porting of BASIC to all and sundry.
Trying to vilify somebody for actions back then based on today's law (or even worse, perceptions) just makes one look silly.
RIP Gary, you cantankerous old fart. Thanks for the memories. Cheers.
Todays laws actually allow it - look at the Google vs. Oracle Java API case, and anyway not only MS did it with Xenix, but Linux/BSD did copy Unix as well, and court cases went into allowing Linux/BSD copy of Unix. WINE copies the Windows APIs. And others.
There are many reasons to hate Microsoft (and Apple, Adobe, Google, Linux, etc. as well) but unless someone can prove MS lifted the CP/M code this is not one.
Just some legends are hard to kill, especially in some haters' circles.
With all the different systems in use and the frequency of change within the 1970s computer industry anyone deciding on the 'not illegal' reuse of an existing API was doing almost as much benefit to the donor as themselves.
Independent programmers would be more likely to choose a language that allowed for more sales due to a bigger range of compatible systems.
It is a long time ago, and I may have "misremembered", but sometime in the late 1970s I thought that I heard that Gates and Allen had looked at DEC's RSTS-11 BASIC (possibly found by "searching waste-bins"?) before they wrote their Altair Basic interpreter. Obviously the architecture was different, but knowing how DEC's stuff worked would have been a big advantage...
He didn't exactly steal it. Paul Allen maybe did most of the original coding.
Of course they didn't invent or develop BASIC. It was from Dartmouth College. A cut down alternative to ForTran. Beginners All-purpose Symbolic Instruction Code always sounded a bit forced.
Allen & Gates did do the first 8080 BASIC, and basically that was the thing that made Microsoft successful enough to buy DOS and re-license to IBM. They capitalised on IBM's stupidity of using the 8088 instead of a real 16 bit CPU . It was easy to port CP/M and applications as the 8088/8086 could only address the 1 M RAM (max) in 64k chunks and is a very similar instruction set to the 8080. Intel even had a translator. I don't remember if it worked on binary or needed assembler, but 8080 binary created from Assembler can be turned into assembler fairly sanely even then.
Brilliant marketing rather than great programming.
This post has been deleted by its author
There are 1,000 things you could use to argue that the 68000 is the better processor, so for the sake of being devil's advocate I'll just point out:
* the 8086's asynchronous bus unit does a better job at prefetching than the 68000's microcoded slots; the 8086 therefore does a better job of bus saturation; and
* later, after the heyday of the ST and the Amiga and all the other 68000 excellence, the fact that x86 instructions have at most one indirect operand massively simplified the handling of exceptions. x86 instructions don't have to be restartable, they can all always just start again from the beginning if an exception was caught and handled the last time around. The 68ks jump through a lot more hoops here.
Though obviously the ARM2 is the really smart way to spend about the same transistor budget as the 8086, albeit with an additional seven years of microcomputer hindsight. Spend the transistors on registers, hence make indirect accesses few and far between, hence use page-mode accesses almost all the time.
Intel stated that the 8086 instruction set was designed for source code compatibility with the 8080, which was source code compatible with the 8008. Seattle Computer Products had a program from translating Z-80 assembly code to 8086 assembly code, hence the hooks in 86-DOS to convert CP/M system calls to Int21H calls used in 86-DOS and subsequently MS-DOS.
Have a look around for CONV86 and XLT86, which claim to be source translators.
I didn't have occasion to use tools like this but Intel definitely sold one. Entirely possible it ran under ISIS-II, ISIS-III, or ISIS-IV, or even RMX86 on custom Intel hardware, as it pre-dates the IBM PC inspired commodity hardware. I spent a little time working for Intel in the mid-80s. From my addled memory, I don't think that using a third-party system like an IBM XT or AT to run Intel development tool software caught on until a few years later. YMMV. Anyway, if at that time when were shipping their dev tools to run against the UDI API interface on their own operating systems, changes of survival to the present day are lower. I wonder if they shipped early tools to run on CP/M? I don't remember that.
OF COURSE this was how it was done. It makes complete, absolute sense to do it this way. At the same time, it's like finding out Santa wasn't real!
IFE REALIO,< DT"SIMULATED BASIC FOR THE 6502 V1.1">
IFE REALIO-1,< DT"KIM BASIC V1.1">
IFE REALIO-2,< DT"OSI 6502 BASIC VERSION 1.1">
IFE REALIO-3,< DT"### COMMODORE BASIC ###"
EXP ^O15
EXP ^O15>
IFE REALIO-4,<DT"APPLE BASIC V1.1">
IFE REALIO-5,<DT"STM BASIC V1.1">
IFN REALIO-3,<
ACRLF
DT"COPYRIGHT 1978 MICROSOFT"
ACRLF>
But didn't we already have it? I still have the "Commented ROM Listing" for C16/Plus 4 which taught me a few things, and some things were just plain weird. Same Book exists for C64.
Missing: Basic 3.5 and 7.0 had Assembler/Disassembler builtin (C16/C116/Plus4/C128). Does the PET Commodore/MS basic 4.0 have Assembler Disassembler builtin?
This post has been deleted by its author
10K Microsoft Basic on the 6502 based Tangerine Microtan 65 was the first version of BASIC I ever coded in.
Press 'A' at the 'Memory Size?' prompt and it displayed "Written by Weiland and Gates"
Wasn't the first programming I ever did (the first being in 6502 machine code), but the first 'high level' language.
Haven't written a single word of BASIC in decades now.
Rare to see mention of the Tangerine system these days; my second computer, after (no sniggering at the back there) a Sinclair MK14.
It was selected after a careful analysis against a Z80 Nascom - the mail order for Tangerine accepted my credit card but Nascom didn't. Which is I suppose as good a way as any to start an interest in a subject that has kept going for fifty years... like you, it was hand-coded assembly to start, but eventually I shelled out for the 10k basic eproms. Which I promptly edited to use lower case keywords: the Tangerine could do upper _and_ lower case and I saw no reason to be shouted at by the code.
Altair BASIC as inspired by a copy of a DECUS BASIC tape that Gates obtained from the DECUS User Group. Or was found in the cabinet of the school PDP computer. Which Gates, Allen and Davidoff used to develope Basic. According to Gates, in a letter to hobbyists, the computer time spent developing Altair BASIC exceeded $40,000. Gates was sanctioned for using unauthorized computer time, but the details of the terms were sealed.
You mean this DECUS, who had to shut down ftp on Jan 2025 due to way too many buggy, bogus or deliberately disruptive connections?
MS Basic on an 8" floppy is what I used to build my first live business application running in 32K of ram on an 8080 on CP/M in the Welsh Valleys. And it worked for years. It changed my life completely, opened doors to working in places like Moscow, Kazakhstan, Middle East, even London. Carpe diem.
Ditto. Writing financial software in Basic for a little accounting firm north of London in the early 80s got me started, then off into military simulators, enterprise financials and MRP software, then off round the world - currently sitting on the other side of it.
There’s one thing that always fascinated me and that was the floating point representation in binary, then the C interpretations of float, double, and long double. Quirks like sometimes 1+1=1.999999999999, and the 387/487 math coprocessors which could do those calculations in just a couple clocks.
But the real majesty is doping out the floating point representation in BASIC, and how the operations worked. Sure, it’s all canned now in processor op-codes, the representations have been codified as IEEE standards, nobody even bothers learning how the nuts and bolts of it works. I credit Jim Butterfield for explaining the mechanics such that homemade machine language programs could benefit from floating point data and manipulation (back when M.L. was king for extracting performance).
If you wanna do 3D transformations, floating point is necessary. If you wanna do fast code, well, once upon a time M.L. was necessary. Putting the two together, for a game like Elite, well you’d have to be extra-bright for something like that!
>>Putting the two together, for a game like Elite, well you’d have to be extra-bright for something like that!
Absolutely the best example of concise programming ever!!11!!!11!!! (hyperbole - don'tcha love it?)
I remain in awe of Elite - the authors managed to get an open(ish) universe, deterministic, 3-D spaceflight game into 64k (or less? can't remember, it was a while ago) and it had a reasonably sophisticated profit protection system built in as well.
Beer for all the old school coders who know what they did and what they were doing ---->
"I remain in awe of Elite - the authors managed to get an open(ish) universe, deterministic, 3-D spaceflight game into 64k (or less? "
Way less!! The BBC Micro had, at most, 32K RAM in a "standard configuration" and a fair chunk of that was used for video memory. That's not even large for on-die L1 cache these days. In fact if you add up all the registers in a multi-core CPU (or GPU), the registers alone probably exceed the space needed to run Elite :-)
That's where the adventure started for me - first on a 4032 PET at school in 1980, then a VIC-20 when they arrived on our shores. 3583 BYTES FREE FTW!
University, 1977, we were each given a KIM-1 as a set of parts. We had to solder the board together, then write a simple display program as our first assembler language class.
I had mercifully forgotten the hours of keying hex code into the memory, hoping you hadn't made an error early on.
...that Commodore "shafted" Bill on the deal for BASIC too. They bought it outright rather than a per CPU licence[*] and went on to produce millions of computers, mostly for "free" in terms of the BASIC. IIRC, it's why most (all?) of the CBM 8-bit computers had no BASIC extensions for sound, graphics and disk handling and did so much with existing commands with added parameters or lots of arcane POKEs and PEEKs but had the side effect of BASIC programmes mostly being compatible between Commodore computers if you stuck to BASIC and didn't "bang the hardware".
* Almost every other implementation of MS BASIC was done "on the cheap" by the manufactures because the per device royalty seemed cheaper in the short term but Commodore had big ambitions and offered what to Bill at the time seemed like a large one off payment for the rights. I think Bill went on record at some stage saying he regretted that. Even at $1 per device, he "lost" $millions on that deal ;-)
All I remember is that both MS and C64 Basic were terrible in comparison to BBC Basic.
BBC Basic was lightning fast, had recursive subroutines, graphics and sound commands, could directly talk with a serial interface, and could include assembler, simply by inserting it between brackets.
C64 basic (2.0) was terrible compared to C16/C116/Plus4 basic 3.5 (which was AFTER VICE basic 4.0). Gosub recursive OK, graphics commands (albeit slow implementation), and sound commands. Reading serial interface, well, not from basic if I remember right :D.
The project has no license as LICENSE file dumped into the project root doesn't legally mean anything without a license statement stating which files are under which license (there is no way microsoft would not know this).
Looking in README.md, there is a statement indicating that the m6502.asm file has no license - as it says copyright microsoft, without listing a license.
- **Filename**: `m6502.asm`
- **Copyright**: Microsoft Corporation, 1976-1978
Also, in the m6502.asm file, there are 2 statements that make it clear that the file has no license;
--------- ---- -- ---------
COPYRIGHT 1976 BY MICROSOFT
--------- ---- -- ---------
"COPYRIGHT 1978 MICROSOFT"
It isn't even source-available either - on line 2 there is a `SEARCH M6502` instruction that is looking for another source file that has not been provided.
It seems that needed file is M6502.UNV; https://github.com/microsoft/BASIC-M6502/issues/9
Attempting to read the source, it looks like typical microsoft quality code and many lines do not have comments (with assembly, unless you comment every single instruction, you won't recognize what you wrote coming back next week).
Many of the comments seem extremely poor too;
;ONE MO TIME. - why one more time?
;ROTATE ARGUMENT 1 BIT RIGHT. - why is the argument being rotated 1 bit right?
;IS IT POSITIVE? - why are you checking if the value is positive?
Yet another case where microsoft has ensured to never release free software - even if the software is totally useless.
>the MIT License that allows free unrestricted use, and even resale.
Many MIT licenses do not allow unrestricted use or resale.
MIT expat may not allow freedom, as it does not cover trademarks or patents - either of which can be used to render software proprietary (even though such program is from 1978, it is extremely likely that one or more of the patents in microsoft's huge patent mountain applies).