How Steve Wozniak Wrote BASIC for the Original Apple From Scratch

18:20 No Comment

To bless the 50th ceremony of BASIC, Steve Wozniak has accounting some memories about his aboriginal adventures with this accepted language—and how he created his own BASIC from blemish for the Apple I and Apple II computers. An absurd feat. Enjoy!—JD

In 1967 or 1968, as a chief in top school, our electronics abecedary (the best abecedary of my activity in abounding teaching regards) abiding for me to go to a aggregation in Sunnyvale (Sylvania) to affairs a computer because I already knew all the electronics in chic at school. Mr. McCollum did this for acceptance with electronics abilities every year, award bounded companies with engineers and projects that would let top academy acceptance appear and and get some experience. I abstruse and programmed in FORTRAN on this IBM computer.

I aboriginal accomplished BASIC in top academy that aforementioned year. We didn't accept a computer in the academy but GE, I think, brought in a terminal with modem to advance their time-sharing business. A actual few of we ablaze algebraic acceptance were accustomed some pages of apprenticeship and we wrote some actual simple programs in BASIC. I saw that this was a actual simple and easy-to apprentice accent to alpha with, but that terminal was alone in our academy for a few days. I was asked by our arch algebraic abecedary to address a page on why I anticipation this would be a acceptable affair for our academy to have. I did absolutely address a page about analytic cerebration and botheration analytic but our academy didn't go advanced and get into the time-share program.

In my academy years my academy akin programming languages were of the accurate mold, FORTRAN, PL-1, Algol. Of advance I programmed a lot in abounding accumulation languages too, in academy and on my own.

In the Homebrew computer club we had a brace of books traveling about that I like to alarm 'bibles'. One was Computer Lib/Dream Apparatus by Ted Nelson, anecdotic a approaching apple of hyperlinks to added the acceptation of things in writing. His annual were like science fiction but we all knew that they were achievable, technically, and we were all apostles for this way of searching at the approaching of computing. The added 'bible' was a book "101 Amateur in BASIC." I was a fan of computer amateur and knew that as anon as I had a computer of my own I would wish to blazon in all these amateur to play. Judging by my own feelings, I affected that this would be a key to starting a home computer revolution. The non-businessman in me prevents me from talking about markets or finance.

I did not apperceive for abiding what a absolute computer bald to do the big banking jobs that computers did for companies, the computers that awash for huge amounts of money. Those were advantageous computers. All I knew was that which was abutting at hand. I ran simulations of dent designs and argumentation designs at HP, alive on calculators. My computer would accept to do that. My computer would aswell accept to play games. At atomic again I was abiding that my computer could accessible do the important things that top priced computers do, but I wasn't sure.

The key to amateur was BASIC. Bill Gates was alien except in the electronics amusement world. Everyone in our club knew that he'd accounting BASIC for the Intel microprocessor. I sniffed the wind and knew that the key to authoritative my computer acceptable (popular) was to cover a high-level accent and that it had to be BASIC. Engineers programming in FORTRAN were not traveling to be what would alpha a home computer revolution.

Learning the accent and autograph a BASIC interpreter

The botheration was that I had no ability of BASIC, just a bald anamnesis that it had band numbers from that 3-day high-school experience. So I best up a BASIC chiral backward one night at HP and started annual it and authoritative addendum about the commands of this language. Mind that I had never taken a advance in compiler (or interpreter) autograph in my life. But my acquaintance Allen Baum had beatific me archetype copies of pages of his texts at MIT about the accountable so I could affirmation that I had an MIT apprenticeship in it, ha ha. In my additional year of academy I had sat in a algebraic assay chic aggravating to advise myself how to alpha autograph a FORTRAN compiler, alive annihilation about the science of compiler writing. I went aback to this anamnesis and started autograph cipher for my 6502 dent to apprehend in curve that a user typed for assay and absurdity checking.

I knew about syntax archive and created one for this BASIC. I did not apperceive that HP BASIC was acutely altered than DEC BASIC, the one that the book "101 Amateur in BASIC" acclimated and that Bill Gates had written. I ample all BASIC's were the aforementioned but HP's differed abundantly if it came to strings of letters. I accomplished my syntax diagrams and they were complete. But I had in the aback of my arch that I could be a star, that I could get a little acclaim in the amusement world, like Bill Gates, if I created the aboriginal BASIC for the 6502. To save a bit of time, I bare the amphibian point operations out of my syntax diagram. I bald to address accumulation based simulations for my HP plan and amateur are based on logic, which is integers. I alone amphibian point numbers (ones with decimal points) alone to save a few weeks and accept a bigger adventitious of getting the aboriginal to advance this BASIC on the 6502. You ability attending aback and see that I included amphibian point addition routines in the ROM of the Apple ][ but I never went aback to plan them into the BASIC. If you cipher by duke (couldn't allow a time-share account) it's harder to accomplish changes in the average anatomy of things that accept to be at anchored addresses.

Breakout on Integer Basic running on the aboriginal Apple II.

I didn't apperceive about compiler autograph added than perchance. But I did apperceive about endless and things like converting expressions into RPN application stacks. Our HP calculators acclimated RPN, in fact. Cerebration about how to address this accent I came up with my own techniques, not like annihilation out of a book. I anguish up with what I alleged NOUN and VERB endless (operands and operators). I put tags in my syntax diagram but every abettor in it had a amount according to it's beeline position in this 256-byte or 512-byte (I forget) table. The 41st operand had the cipher of abettor #41.

I aswell had a account for every abettor of 2 priorities. One was its addiction to go advanced of added operators. For example, the + abettor would could cause a * abettor to activity first. But I bald a additional table of the attrition to getting pushed into activity to handle things like parentheses. I had no abstraction if I was on a actual clue but it formed accurately and did what I needed. It didn't accept to appear from a book.

I enjoyed demonstrating this BASIC at the Homebrew Computer Club. I never saw my name in book so I didn't get that 'Bill Gates' fame, but I was accepted in my club. This was even afore Steve Jobs saw that my computer existed. As time went by I alone had to address one accepted afterwards addition for ceremony of those numbered operators. Every club affair I'd accept a few added commands that formed fully.

With the Apple ][ I had the video and computer anamnesis one and the aforementioned so that the microprocessor, alteration maybe a actor (exaggerated) numbers a second, would change a actor awning bytes a second. Atari arcade amateur were accouterments again but now the amateur could be implemented as software, application 6502 apparatus accent programming. BASIC is an interpreted language. BASIC goes over the alone belletrist of ceremony account as it executes, free what to do. It is maybe 100 or 1000 times slower than apparatus accent as a result. But one day I was analytical as to whether you could affairs affective altar just in BASIC and see them move like astute animation.

I had advised Breakout for Atari in hardware. I wondered if I could affairs this simple activated arcade bold in BASIC? I knew I could affairs it in apparatus language. Since it was my own BASIC I went to the syntax blueprint and added commands to artifice blush and to draw accumbent and vertical lines. I again searched dent manuals and chose a dent with 4 timers (555 appearance timers) on one chip. I acclimated that with some software to apprehend paddle positions off potentiometers, dials that afflicted attrition according to area you angry the dial. Once I had these mechanisms installed (burning new EPROMS for the BASIC additions) I sat down and wrote some simple FOR loops to artifice artery in altered colors. I accept to accept approved 30 blush combinations in just minutes. Again I added paddles and account and a ball. I could acclimatize affairs ambit to change the brawl speeds and angles. By the way, I anticipate this is if I added a apostle with 1-bit audio just because you bald sounds if a brawl hit a brick, etc.

I alleged Steve Jobs over to my accommodation to see what I'd done. I approved to him how calmly and instantly your could change things like the blush of the bricks. Most importantly, in one-half hour I had approved added variations of this bold than I could accept done in accouterments over 10 years. Steve and I both accomplished how important it was traveling to be now that activated (arcade style) amateur could be software. Added than that, getting in BASIC meant that anyone of any age could affairs it.

I kept about 50 archival folders of affidavit throughout all my BASIC architecture work. Ceremony one was labelled GAME BASIC. So you can see area my arch was advancing from.

Update

Another note: In top academy or my aboriginal year of academy I told my dad that anytime I'd own a 4K Data General NOVA. He said it amount as abundant as a down transaction on an big-ticket house. I was abashed and told him I'd reside in an apartment.

Why 4KB?

Because that was the minimum bald to run a academy akin language. To me a computer had to accept added than switches an lights. It had to be able to run programs.

I'd congenital a switches and lights computer of my own architecture 5 years afore the Apple I. Aback again there was no way to allow 4KB of RAM so it had 256 bytes only.

In the Homebrew days, the summer of 1975, 3 companies alien 4K DRAM's. This was the aboriginal time that 4KB was absolutely affordable. I had to accept that abundant in adjustment to accept BASIC be a allotment of this computer. No best about it. Hence the minimum RAM on an Apple I or Apple ][ was 4KB. Had I not cared about BASIC, I apparently would accept just congenital addition switches and lights computer with basal changeless anamnesis and been done with it.

Editor's note: If you wish to apperceive added about Steve Wozniak's life, you can analysis out his biography iWoz.—JD

iWoz: Computer Geek to Cult Icon: How I Invented the Personal Computer,… iWoz: Computer Geek to Cult Icon: How I Invented the Personal Computer,… iWoz: Computer Geek to Cult Icon: How I Invented…

Amazon.com: $9.88

Buy now 478 readers bought this

No hay comentarios :

 
Copyright © Entertaiment | Powered by Blogger