10 ms·
How Steve Wozniak Wrote BASIC for the Original Apple From Scratch
- subdane 12y ago"But I had in the back of my head that I could be a star, that I could get a little fame in the hobby world, like Bill Gates, if I created the first BASIC for the 6502." Big things start small!
- ProAm 12y agoBaby steps are fine as long as you keep moving your feet.
- matthewmcg 12y ago"In 1967 or 1968, as a senior in high school, our electronics teacher ... arranged for me to go to a company in Sunnyvale (Sylvania) to program a computer because I already knew all the electronics in class at school. Mr. McCollum did this for students with electronics abilities every year, finding local companies with engineers and projects that would let high school students come and and get some experience." It's amazing that his high school had electronics classes and vocational externships. Is that something that was common at the time or just another amazing aspect of Silicon Valley?
- thesimpsons1022 12y agoits an amazing aspect of silicon valley. Back then, it was way different too. Just like steve jobs was able to call the founder of HP in highschool and ended up getting a job there for the summer.
- larrys 12y ago"Just like steve jobs was able to call the founder of HP in highschool and ended up getting a job there for the summer." There is nothing that unusual about that now except with tech companies or any other company that is the current "belle of the ball" or super large and well known. The idea is to learn and gain experience not to get some buzz because you have achieved some popular culture dream of working for the same place that millions of others would like to. Sure we'd all like to work at those places. That's the problem. If you pick any company that is generally off the public radar (and not being fawned over in the press with a celebrity CEO) it is quite possible to send a postal letter to the CEO and have a fair shot of getting a summer job. Or even an email but my feeling is a letter would get more attention and seem more genuine. Not all the value lies in the usual suspects that have more applicants than they can handle. A corollary to this goes with low paid jobs. Our offices used to be located near a Walmart. Yet not one time in 9 years to anyone ever come through the door looking for an office or admin or warehouse job. Yet everyday people showed up at the Walmart and got a much lower paying job and (from our pov) much worse working conditions. It's important to put effort in, be creative, and not do what everyone else is doing.
- zhemao 12y agoYeah, but HP was the "belle of the ball" at the time.
- dasil003 12y agoThe difference now vs then is that if you were a kid who had heard of HP and wrote a letter because you were that interested in computers, there's an extremely high chance that you would be a good employee in some capacity. Today for every single kid with natural curiosity and potential for working in a tech country there are probably more than 100 that want to work at Facebook just because everyone uses it and it sounds like a good job or career stepping stone.
- wil421 12y agoNote - I'm not in SV. Until I graduated from college it was hard to get anyone to take me seriously or even respond. I think the barriers to enter the tech job market with no experience or degree is so much higher today.
- a-priori 12y agoIt's not unheard-of. My high school (in Waterloo, Ontario) had an internship program like this too, and it's how I got my first programming job in about 2000-2001, at age 15. There were about ten students in my class that got technology jobs of one sort or another that year.
- grecy 12y agoHigh schools in Australia have electronics classes. When I was in grades 7-9 it was mandatory, then elective after that. We didn't flash chips back then (in the late 90's) but I bet they do now. We mostly did hands on of making circuit boards (acid etch), and soldering all the components together for simple little circuits. I only stayed in electronics until grade 10, but I know they made some pretty cool stuff in grade 11 and 12.
- epaladin 12y agoWow. We had an elective "electricity" class in high school (small K-12 school in US) and we basically went over Ohm's law and how to use a multimeter. Sounds like you had something closer to what first year EE majors get.
- grecy 12y agoFunny you should say that. I went on to Study Software Engineering with a minor in Digital Electronics. In my 5th and final year, I took an electronics class called "Digital Electric Design" which actually turned out to be my only hands-on Electronics course at University. All the EE people were shocked to see me there, as I'd not been in all the same hands-on EE type classes as them for the prior 4 years. (I think we only had Maths in common) They were more that a little shocked I knew how to use a soldering iron, acid etch bath, multimeter, had the resistor charts memorized etc. etc. Apparently, they'd spend the preceding 4 years learning that at Universtiy which I had learned in high school. (The Australians had learned it in High School too, but my university was majority international students)
- ratscabies 12y agoI don't know if they kind of back slid over the years, But what you learned in high school sound similar to what I did in high school in the late 70s. I used to love playing with the radio shack electronic experimenters kit with spring terminals and color coded wires too!
- robbiep 12y ago
- rogerbinns 12y agoCalifornia used to have amongst the highest per pupil education funding, which started changing in the 70s and is now amongst the lowest in the US. This article explains some of the history http://california-in-crisis.news21.com/node/24 http://california-in-crisis.news21.com/node/24 The consequence was "more" available to students and teachers.
- nsxwolf 12y agoMy Chicago-suburban public high school offered Electronics Tech 1, 2, and Independent Study (basically a hacker space pretending to be a class). This was in the early 1990s.
- pessimizer 12y agoEvanston Township? I took electronics there at around the same time.
- nsxwolf 12y agoDistrict 211 (Northwest Suburbs). Great fun! Back then I had no idea how spoiled I was. All the power supplies, oscilloscopes, multimeters, soldering stations, and parts I could ever want.
- johnpowell 12y agoI was a Junior in high school in Springfield, Oregon and we had classes like these. One was Principles of Technology were we played with wiring houses and oscilloscopes. We also had a robust machine shop with CNC machines. In Principles of tech we had a injection molder. I also took four years of drafting and auto-tech. So we had the tools in the tenth grade to design a part in autocad in drafting class, take it over to the machine shop and have a CNC machine mill a mold that could then be pushed over to have parts injection molded. All that is gone now due to cuts in funding. And for fun we actually had a class to teach people how to be a logger.
- ratscabies 12y agoDoesn't that piss you off that those types of classes are not around anymore? I'm a bit older, so our machine shop was all manual WW2 surplus lathes and mills. Our well equipped woodshop had a teacher with requisite missing digits.
- johnpowell 12y agoSo much anger. My sisters boy just turned 21. His dad is a electrician and always stressed that he should do jobs that can't be outsourced. Corey just got a union job for 30 a hour as a carpenter.
- andrewjkerr 12y agoIt's been ~3yrs since I've graduated high school, but my high school (top in the county and an 'A' school in Florida) didn't have any electronics, shop, or computer science classes. I vaguely remember almost taking "Web Development" thinking they would go into PHP or something like that, but apparently they just made small sites on Microsoft Word and played video games the entire class. Such a shame.
- area51org 12y agoI grew up in a small-to-mid-sized town in California's central valley, east of the Bay Area and SV. We had an electronics class, and as a freshman, I took it. If you needed parts for a homework assignment, the only store that had them was Radio Shack (yes, they actually sold lots of electronic parts back then). So one day, I meandered into The Shack to get a resistor I needed. Lo and behold, there was a new manager, a guy named Tony. This guy was much friendlier than the previous manager had been. That other manager just tried to get us in and out, apparently presuming we wanted to shoplift or something. This new guy? Happy to show me the new TRS-80, and though my parents wouldn't pay for one, he scarcely complained as I went back to use it every day for more than a year. I taught myself how to code on that machine, and so I have that freshman electronics class to thank, in part, for my career.
- jmspring 12y agoIn the late 80s and 90s, you could still find specific electrical parts at Frys in the bay area, but that quickly faded towards the late 90s. The only place that had a continual decent stock of components was Quement Electronics in San Jose. A now, gone era. Gratuitous photo share (not my photo) - https://www.flickr.com/photos/xythian/4223283103/ https://www.flickr.com/photos/xythian/4223283103/
- joshu 12y agoPalo Alto Fry's still has a few aisles of electrical parts and tools.
- jmspring 12y agoA few, but not like it used to be :) When I have some free time, I'd be interested in going back and seeing what would be involved in recreating some of the labs these days. I'm curious how many of the parts are available on amazon.
- debt 12y agoThat's some serious passion for programming. I try to relate to people what "passion" actually means and this is a good example of it.
- sanswork 12y agoIn the Toronto,Canada area we had electrical classes where we learned the basics of electricity but more with a focus on wiring a house and also after taking that you could choose an electronics class in the more senior levels. This was mid to late 90s. I'm not sure if they are still in the curriculum.
- aianus 12y agoI graduated from high school in Toronto in 2009 and we had elective electronics courses in Grades 11 and 12. I remember learning about logic gates, flip-flops, and building simple circuits on breadboards. We even ended up connecting them to the parallel port on a computer and writing simple programs to communicate with them.
- stan_rogers 12y agoThat's sort of vestigial when you compare it to the old Industrial Arts track in Ontario high schools. As I recall, Grade 9 Electricity was a common course required for both the Electricity (what you'd need to know as an apprentice electrician) and Electronics (prep for a technician/technologist program at a College of Applied Arts and Technology) courses in grades 10-12, and both programs required additional courses in drafting and the basics in sheet metal, wordworking and machine shops as well (things you'd need to practically apply what you were taking in your core courses). Unfortunately, the way things were arranged meant that opting for the IA track in Grade 9 pretty much meant giving up university as an option since you'd have to give up the credits in things like history, geography and CanLit that were required at the grade 9 and 10 level for an OSSHGD (Grade 13 diploma). And there was a big gender divide as well, at least at the time. It's a damned shame that the only approach considered for fixing the system was to (mostly) dump it.
- jolohaga 12y agoI was in middle-school during this time in Southern California and had hands-on electronics classes.
- analog31 12y agoI went to a suburban high school in southeast Michigan. My high school had three tracks: College Prep, Business, and Vocational. Electronics was one of the Vocational subjects. They also taught "programming" to the Business students, though I have no idea at what level. I assume that these programs had been in place for many years before my time. I was in the College Prep track, so those other courses were pretty much off limits for me. Nonetheless I got permission to sign up for Electronics. I discovered that the course was mainly going to revolve around TV repair, and the teacher even told me that I'd be bored. So I dropped it and learned that one of the math teachers had started a course in BASIC! It's not an understatement that the course changed my life.
- madengr 12y agoI took votech electronics in HS; 4 hrs/day for junior and senior years. It was the opposite experience though. 1st year was analog, second was digital. Learned small signal response, Karnaugh mapping, 6502 assembly. I'm an EE now of course.
- glenra 12y agoI can't speak to other areas but Silicon Valley was definitely like that. In the 1980s in Palo Alto, my high school AP Computer Science teacher asked parents to come in and give guest lectures in the last few weeks of class. Donald Knuth's daughter was in my class so he came and talked about TeX. Another kid's parent was a VP at a bank; he talked about secure transaction processing for ATMs. My dad (a researcher in robotics and AI) talked about expert systems. It was okay. :-)
- pjmlp 12y agoHighschools in Portugal had computing and electronic classes in the late 80's. I started with electricity concepts and basic circuits in the 7th grade and 8th grade. Sadly had to take mechanic in the 9th as electronic classes were full. On my last three years (10-12 grade), I switched high school to became a computer technician. We had classes about data structures, programming languages, basic compiler design concepts, DB, network and graphics programming. It made my first CS years a walk in the park.
- stephengillie 12y agoOne of my high school friends finds my Arduino obsession ridiculous because he learned all about soldering and electronics st the high school he attended before transferring to mine. Our poor school district could barely afford welding, small gas engines, and basic Windows and Office (document/spreadsheet/presentation program basic use) classes. Understanding how these work is one thing, and that used to be enough to be worth employing. Today, you have to have a passion for using that knowledge to solve problems.
- SnakeDoc 12y agoThe Woz -- The true genius behind Apple.
- Someone 12y ago"I kept about 50 chronological folders of papers throughout all my BASIC design work. Each one was labelled GAME BASIC. So you can see where my head was coming from." I'm not sure whether that 'kept' means they are gone, with that "can see" a sentence later, but if they exist, somebody should write a book or a paper on them.
- DodgyEggplant 12y ago"When you code by hand (couldn't afford a time-share account) it's hard to make changes in the middle structure of things that have to be at fixed addresses."
- raverbashing 12y ago"Wow, so, you mean people can develop software without using TDD and an OO language?!" Edit: yes, this is why I have much more respect for Wozniak than for Uncle Bob or other consultants
- softbuilder 12y agoOrdinarily I'd vote this down for snark not contributing to the conversation, but I actually do this the underlying thought here is worthy and contributes to the conversation. There is a core aspect of hacking/making/doing that Woz demonstrated well and aren't represented by many modern thought leaders in the industry.
- bmm6o 12y ago> Ordinarily I'd vote this down for snark not contributing to the conversation [...] You're right, it doesn't contribute to the conversation. > I actually do this the underlying thought here is worthy and contributes to the conversation Unless someone actually takes the "underlying thought" and expresses it as more than 12 words of snark, there's nothing to discuss.
- VikingCoder 12y agoI believe I know exactly how he did it - the Richard Feynman Problem Solving Algorithm: * Write down the problem. * Think very hard. * Write down the solution.
- listic 12y agoI programmed in Forth some time ago and I wonder why didn't Wozniak implement Forth on his first computer. Surely, it would be easier to do and run faster than BASIC. That BASIC was a naive interpreter, it couldn't help being slow, except for the primitives that Woz coded in machine language, I'm sure they were fast. Was it already clear for Wozniak in 1975 that Forth looks weird and people won't get it?
- Jtsummers 12y agohttp://en.wikipedia.org/wiki/Forth_(programming_language) http://en.wikipedia.org/wiki/Forth_(programming_language) I checked the above link to confirm my recollection, but while Forth had been around for a while it wasn't really public until the 70s (versus BASIC). I suspect he wouldn't have even heard of it, or at least not realized its potential, in 1975.
- raverbashing 12y ago> Was it already clear for Wozniak in 1975 that Forth looks weird and people won't get it? Since he had an HP calculator, yes
- colomon 12y agoI'd simply guess he'd never heard of it -- it was pretty obscure in the early 1970s. It might have been less accessible to beginners, but Forth was the perfect language for those early microcomputers. I loved programming in it on my Commodore 64.
- zhemao 12y agoWozniak was all about bringing computers into wider use. At the time, BASIC was considered the "easy" language to learn. So easy that kids could do it.
- listic 12y agoI thought Logo was, too, and Logo is based on Forth, but I checked Wikipedia article and Forth is not mentioned. Also, don't know about the popularity of Logo back in the day, but I thought it enjoyed some.
- npongratz 12y ago"The other 'bible' was a book "101 Games in BASIC." I was a fan of computer games and knew that as soon as I had a computer of my own I would want to type in all these games to play." I don't know for sure, but I think Mr. Wozniak is referring to the book edited by David H. Ahl, BASIC Computer Games: http://atariarchives.org/basicgames/ http://atariarchives.org/basicgames/ Notes on the page mention the book was "[a]lso published as 101 BASIC Computer Games". This book happened to be a great influence on me. Reading it in grade school gave me a small taste of what fun programming can be. I especially liked how some of the programs showed how simple rules can result in emergent and unexpected behavior. Not to mention how easy and fun it was to change the source (sometimes by accident... SYNTAX ERROR anyone?) and seeing what would happen. Today, I have the distinct privilege to do effectively the same (different platforms, of course :)), and now it even pays the bills.
- dbecker 12y agoWith all the people that book inspired to get into computing, and the sum total of what we've built, I bet Ahl couldn't have guessed what an impact that book would have.
- RogerL 12y agoOh, how I loved that book. We were poor, and it took awhile before I got my first computer (Timex sinclair), but until then I read that book, programmed on paper, and dreamed.
- munificent 12y agoOh, wow, I haven't seen that cover since I was a kid. I'm awash in delightful nostalgia now. I had that book and got it specifically to program games on my Apple IIe, so I guess Woz achieved his goal!
- mncolinlee 12y agoThis was how I learned to program BASIC at six years old. Of course, I also figured out I could get my TRS-80 Model 1 to make sounds of various pitches by tuning an FM radio to its CPU and running loops with varying delays. I added sound to a pinball game this way back then.
- afs35mm 12y agoWoz wrote BASIC from scratch and I'm having trouble with call and apply...
- dpweb 12y agoI remember a quote by Woz I think it was with the hardware however, about being forced to design everything more completely before even starting to build it. There's got to be a lesson in that somewhere.
- krishna2 12y agoA few days of coding could save you a few hours of designing. :)
- k1w1 12y agoThe update that describes why 4KB of RAM was necessary was interesting to me. In 1998 I wrote a Java Virtual Machine in assembly language for a PIC-like microcontroller that only had 4k of ROM (actually it was 4k instructions, but they were 12-bit words giving 6kB). I managed to get all of the important features of the language to fit, including exception handling and an interactive debugger. However by the end, each time I wanted to add a new instruction to my code I had to find something else to optimize first so it would still fit in 4k. By the end I convinced myself that 4k was the minimum possible code size for implementing a JVM. The JVM was used in the Parallax Javelin Stamp - a Java version of the BASIC Stamp (http://en.wikipedia.org/wiki/BASIC_Stamp http://en.wikipedia.org/wiki/BASIC_Stamp). As an aside, the SX microcontroller only had 256 bytes (yes bytes!) of RAM internally so I used an external 32kB SRAM for the Java heap and stack. The 256 bytes of internal RAM held the internal state of the interpreter and memory manager.
- seanmcdirmid 12y agoAround the same time, I wrote a JVM for the PalmPilot [1]. I think it had to fit into 128K of ram with an additional 256K of memory for data (like the class libraries). I was able to fit the entire JDK 1.0.2 runtime into it by transforming the byte code. But 4K...wow! [1] http://lampwww.epfl.ch/~mcdirmid/papers/ghost.pdf http://lampwww.epfl.ch/~mcdirmid/papers/ghost.pdf
- radio4fan 12y agoYep, 4k is pretty wow indeed. My first computer was a Sinclair ZX81, which only had 1K or RAM, but there was 8K of ROM, and the BASIC interpreter was pretty, um basic.
- analog31 12y agoThe hardware was interesting too. It bit-banged the video display circuit, leaving only the re-trace interval for general purpose computation, including running BASIC programs. Yet the result was an extremely simple and inexpensive design. Every early microcomputer had to come up with a solution to the video display problem. As I understand it, the Apple II had a bus architecture that interleaved the clock timing of the video circuit and the CPU, sharing a single bus. The Commodore computers had custom video graphics chips. And so forth.
- csense 12y agoI feel like gaming has always been an important application for driving hardware innovation. It's interesting that this article shows that goes at least all the way back to Woz's home-built computer that turned into the first Apple.
- projectileboy 12y agoGames aren't given nearly the credit they deserve for driving the PC revolution. My house was one of a very few in our neighborhood that had an Apple II in the house (this was 1980), which cost $2000 in 1980 dollars. For that kind of money, people said the reason they bought the computer was for <x>, but the real reason was almost always for the games.
- austinz 12y agoNot to mention the consumer-grade GPU market that preceded GPGPU and a lot of the modern scientific uses for commodity/commodity-like hardware.
- corysama 12y agoIf I recall correctly, the design of the Apple 1 and 2 were heavily influenced by Woz's experience making arcade game machines. From his arcade work, he had a lot of experience (and talent) in reducing costs by doing more with fewer chips and in interfacing with CRT televisions.
- joezydeco 12y ago"Breakout directly influenced Wozniak's design for the Apple II computer. He said, 'A lot of features of the Apple II went in because I had designed Breakout for Atari. I had designed it in hardware. I wanted to write it in software now.'" http://en.wikipedia.org/wiki/Breakout_(video_game) http://en.wikipedia.org/wiki/Breakout_(video_game)
- tn13 12y agoIn India I studied in a school that had only one electric bulb per class and a second hand MS-DOS machine donated by a politician. The school and teachers were glad to let me use it and I am eternally thankful to them for the same. It changed me totally. We also had awesome electronics equipment lying around which we could use. I used IC-555 when I was in 8th grade to program a flashing LED and I can not explain the joy of doing it in words.
- noisy_boy 12y agoOur school had no computers. I first saw computers in my University in a air-conditioned room and we were not allowed to go inside. We had a Fortran-77 module (elective) which I took in the hopes of getting a chance to use the computers. However, it turned out that we were supposed to write our code on paper and the teacher would evaluate them by reading them, not compiling them! So the end result was me scoring very well in the exam by writing code on paper, the teacher evaluating it by reading it. Sigh.
- tn13 12y agoThat is how C programming was taught in my engineering college and so was Java and even HTML. There would be a short note table tag or a 10 mark question on what is the difference between Interfaces and Inheritance in Java.
- marcosscriven 12y agoWozniak is the closest I get to idolising. There's just something about the combination his extreme talent, humbleness, and humanity.
- deleted 12y ago[deleted]
- beachstartup 12y agothis is a serious question. does anyone know if woz lifted weights or participated in any other kind of serious athletics when he was younger? he's always very fit and muscular in early pictures and as many athletes do, he's gained some weight in later years. i only ask because some contemporary biopic films/representations have portrayed him as out of shape in his early years and that's clearly bullshit.
- acqq 12y agoHollywood lives on shoveling stereotypes. Good catch.
- abecedarius 12y agoI suspect what's going on is that he was chubby by early-70s standards, and so contemporary representations start with chubby-by-2010s standards and blow that up for effect. (I've wondered about this too.)
- noisy_boy 12y agoExactly what I was thinking - he seems to have pretty muscular forearms if he wasn't working out.
- read 12y agoJudging by my own feelings, I assumed that... At least then I was sure that my computer could possible do the important things that high priced computers do, but I wasn't sure. I sniffed the wind and knew... I never saw my name in print so I didn't get that 'Bill Gates' fame, but I was known in my club. Every club meeting I'd have a few more commands that worked fully. Had I not cared about BASIC, I probably would have just built another switches and lights computer with minimal static memory and been done with it.
- read 12y agoEmotional decision. Uncertainty. Gut feeling as compass. Mild recognition to ability. Incremental progress. Emotional tie. These might be the ingredients for innovation. HN penalizes them without reflection.
- etfb 12y agoWoz is, for me, the ISO standard geek, the distillation of all that I aspire to. Somewhere in Paris is a vault, and in that vault is a platinum-iridium Steve Wozniak, against which all of us are judged and found wanting.
- moron4hire 12y agoPeople always ask me, "what was it like to be homeschooled" and I never have an answer for them. It was all I knew. What was it like to go to public school? But this. This is what it was like. My sister and I did things, made things, whatever we wanted. We went places and interacted with adults and worked on real projects. Nothing as impressive as this, but lots of things far more impressive than our peers. But that wasn't "being homeschooled", that was having our parents. I've learned that most of our homeschooled peers didn't do anything like we did. It was kind of a weird revelation to grow up in this group of supposed-academic-over-achievers, often feel like the dumb one because I hadn't read all of the books they did (which I now realize was because I had a much more balanced up bringing that included sports and other studies), and then be the only two (my sister and I) to make something out of our lives. Religious zealotry will do that to people. And they were zealous in both homeschooling and Christianity. I'm now somewhat surprised one or two of them haven't committed suicide yet. I know one has tried, but his zealotry makes him refuse to get help. His father, being the local physician in our small town, apparently doesn't believe depression is a real thing. And yet half or more of his 11 kids are textbook cases. It makes me sick. But again, that's not homeschooling, that's having certain parents. One's parents are, naturally, the biggest influence on their lives.
- kbs 12y agoIf you're interested in the actual details of the implementation of the syntax table, I had a great exchange on the 6502.org forum a couple of years back. http://forum.6502.org/viewtopic.php?p=17736 http://forum.6502.org/viewtopic.php?p=17736 There is a (relatively easier to understand) stack-based expression evaluator, with hooks to allow for operator precedence. The interesting part is the scanner, which converts each line of BASIC into the tokens used by the evaluator. This is the bit that has the "syntax table diagram". You may also find this article by Woz on the Apple][ from the '77 BYTE magazine a pretty interesting read. http://www.downloads.reactivemicro.com/Public/Users/Grant_Stockley/Apple2WozSystemDescription.pdf http://www.downloads.reactivemicro.com/Public/Users/Grant_St...