Feeds

Could Bill Gates write code?

Yes. And then some, Altair BASIC dis-assemblers reckon

  • alert
  • submit to reddit

Security for virtualized datacentres

Even if you've been following our saga of Micro-Soft's 1975 Altair BASIC here and here, - one question remains unanswered.

Was it any good?

Reuben Harris has been disassembling a binary with some help from Monte Davidoff, the third author of Altair BASIC (along with Gates and Paul Allen) and who we interviewed here last week. He has the same question in mind:-

"'Could Bill Gates Write Code?' Or was he merely the luckiest man alive," before concluding... "Yes He Bloody Could!"

Although Reuben's analysis is not quite complete, he tells us that Gates, Allen and Davidoff threw every trick at the book to squeeze the interpreter into 4 kilobytes. They succeeded and left some headroom for the programs themselves - without which it would have been pretty useless, of course.

"It was pretty incredible - they were pretty good at what they were doing," he tells us.

Reuben draws out attention to a particularly Mel-like feat.

" I found a jump instruction that jumped to the middle of another instruction. Why was this extraordinary? Well, on the 8080, instructions were 1, 2, or 3 bytes in size. Since instructions could be more than one byte in length a programmer had to be careful that he didn't jump to, say, the second or third byte of a three-byte instruction; since he'd be executing arbitrary instructions that would almost certainly crash the whole program. What was going on??"

Reuben concludes this was entirely intentional. "Rather than skip over some small bit of conditionally-executed code that we don't want to execute, if that bit of code was small enough (ie one or two bytes) you could simply encode those one or two bytes inside a two or three byte instruction thus saving the three-byte instruction needed to jump over it. The best example of this technique is in BASIC's error message code "

All that... for three bytes.

You can play with Altair BASIC online, if you have a telnet client. It's at the splendid Online Software Museum here and a selection of "mindbendingly dumb" games are included.

Reuben has also pointed out the similarities between the Altair BASIC's error codes and the error codes returned by
modern Microsoft Basics
. Plus ca change.

Of course Monte Davidoff, who worked on two BASICs for Micro-Soft in all, tells us that the better algorithms could be used when the developers had more memory space. And we know from Bill Gates' foreword to Gordon Letwin's Inside OS/2 (Microsoft Press, 1988) that Letwin ripped up the designs for the earlier interpreters when he arrived at Microsoft. But that isn't really the point - the Altair BASIC is rightly feted not for being the most elegant, but for being the first and the smallest. And that's enough. ®

Related Links

Reuben Harris' analysis of Altair 4K BASIC
Play with Altair 4K BASIC at the Online Software Museum
The Story of Mel

Related Stories

Microsoft Altair BASIC legend talks about Linux, CPRM and that very frightening photo
Raiders of the Lost Altair BASIC Source Code

Remote control for virtualized desktops

More from The Register

next story
PEAK APPLE: iOS 8 is least popular Cupertino mobile OS in all of HUMAN HISTORY
'Nerd release' finally staggers past 50 per cent adoption
Microsoft to bake Skype into IE, without plugins
Redmond thinks the Object Real-Time Communications API for WebRTC is ready to roll
Microsoft promises Windows 10 will mean two-factor auth for all
Sneak peek at security features Redmond's baking into new OS
Mozilla: Spidermonkey ATE Apple's JavaScriptCore, THRASHED Google V8
Moz man claims the win on rivals' own benchmarks
FTDI yanks chip-bricking driver from Windows Update, vows to fight on
Next driver to battle fake chips with 'non-invasive' methods
DEATH by PowerPoint: Microsoft warns of 0-day attack hidden in slides
Might put out patch in update, might chuck it out sooner
Ubuntu 14.10 tries pulling a Steve Ballmer on cloudy offerings
Oi, Windows, centOS and openSUSE – behave, we're all friends here
Was ist das? Eine neue Suse Linux Enterprise? Ausgezeichnet!
Version 12 first major-number Suse release since 2009
prev story

Whitepapers

Why and how to choose the right cloud vendor
The benefits of cloud-based storage in your processes. Eliminate onsite, disk-based backup and archiving in favor of cloud-based data protection.
Forging a new future with identity relationship management
Learn about ForgeRock's next generation IRM platform and how it is designed to empower CEOS's and enterprises to engage with consumers.
Reg Reader Research: SaaS based Email and Office Productivity Tools
Read this Reg reader report which provides advice and guidance for SMBs towards the use of SaaS based email and Office productivity tools.
Storage capacity and performance optimization at Mizuno USA
Mizuno USA turn to Tegile storage technology to solve both their SAN and backup issues.
Simplify SSL certificate management across the enterprise
Simple steps to take control of SSL across the enterprise, and recommendations for a management platform for full visibility and single-point of control for these Certificates.