Steve Wozniak's floating point routines for the 6502(tinyletter.com) |
Steve Wozniak's floating point routines for the 6502(tinyletter.com) |
This seems to be a fairly effective way to create world-changing computer engineers.
Imagine where Woz's life might have taken him had his dad worked elsewhere...
Would you mind pointing me to some more of these interesting writers?
Poets knew from long ago that using pentameter and constraints fosters creativity. Here we see the same principle applied in computing.
By limiting its resources, future developers will have to be clever to find new ways to create amazing things that early on we thought we could never do. Memory is cheap, so I could easily spend the same amount of money on a single chip that could have given me the chance to fill the memory space with RAM. But instead, I am choosing to use many chips with much lower capacity. It’s more limiting, but that’s the point."
https://c256foenix.com/product/c256-foenix-rev-c-bare-board-...
https://www.poetryfoundation.org/poems/52299/nuns-fret-not-a...
Design depends largely on constraints.
Q: What constraints?
The sum of all constraints. Here is one of the few effective keys to the Design problem: the ability of the Designer to recognize as many of the constraints as possible; his willingness and enthusiasm for working within these constraints. Constraints of price, of size, of strength, of balance, of surface, of time, and so forth. Each problem has its own peculiar list.
- Charles Eames
It was so hard to do anything.
For instance, it did not have an add instruction.
You had to clear carry, then add with carry.
That said, I can see how having a microprocessor was amazingly awesome to a hardware designer like woz who could think fluidly at the transistor level.
I competed in the first couple years of Sparkfun's autonomous vehicle competition. My robot had a keypad where you could enter GPS coordinates for waypoints. The microcontroller I was using had 32-bit soft floating point routines in its standard library, but I had to code my own string-to-float routine. (I think only float-to-string was provided, but not the inverse.)
Every year, the robot worked in Oklahoma but in Colorado would make a wild turn and head the wrong way. The morning of the last time I competed I realized the problem was in my string to floating point conversion code. I had made a programming assumption which was mathematically incorrect. It happened to work in Oklahoma because the fractional part of the GPS coordinates at home were in a range that didn't trigger the bug.
I also realized it meant the conversion algorithm was more subtle than I had assumed, and there was no way I was going to be able to figure out the correct algorithm in the field, under time pressure. In those years I either didn't yet have a smartphone, or I looked and couldn't find code on the web for my microcontroller.
(And I couldn't just drop in some C code - it was a Parallax Propeller and my robot's code was in the Spin language. Quirks of the chip made it unusually hard to port C to it and so C compilers for the Propeller were still what I would consider "experiemental" - or were when I started the project.)
The incorrect floating point code had been one of the first things I'd written - it'd been responsible for my robot crashing every year, including that morning. (I'd blamed hardware, upgraded the GPS unit, improved sensors, etc.)
One year later to the day, this was all on my mind again because I couldn't make it to the competition that year, and I had a shower thought. I had had a KNOWN GOOD floating point conversion routine on my hard drive and running inside my microcontroller that whole time!! I was using a Propeller GPS library. GPS data comes in NEMA strings which are... strings! By necessity, there was a private routine in the GPS object which had to be doing the conversion. I went and looked - yes, all I would have had to do was change this private routine to "public" and I could have called it.
Anyhow, programming an 8 bit 6800 for an embedded controller means keeping track of 6 or more things going on at the same time, while modern software focuses on one thing at a time and isolating it from everything else.
Those things include the contents of each register, the stack level, the size of the code, interrupts going off, polling that has to be done, counting cycles, etc. Organizing code into functions is a luxury not usually affordable.
It sounds tedious, but it was fun. I attached my own hard disk drive to my LSI-11, meaning I had to build an interface board and write a device driver. To figure out how to write the device driver, I dumped the floppy driver code. It was a marvel of tight engineering. The bootstrap loader was executing code only an instruction or two behind it getting loaded. I was just in awe.
[1] https://www.linusakesson.net/programming/poems-for-bugs/inde...
[2] e.g. https://www.linusakesson.net/scene/a-mind-is-born/index.php
edit:
I love the Zachtronics games "Shenzhen I/O" (easier) and "TIS-100" (MUCH harder/esoteric). They are a great (and fun) way to try asm/microcontroller programming.
https://github.com/DigitalMars/dmc/blob/master/src/CORE16/DO...
I really wish I had done more embedded and assembly at school. I can't understand it or appreciate it.
Maybe SW and HW shouldn't mix, bar a few visionaries who bridge both worlds?
And yes, Wozniak is one of the great engineers of our time. I cut my teeth on an Apple ][, and it was both amazing and mysterious to me then, as a child. Now, with 40 years of professional programming experience, the mystery is largely gone but my appreciation for the elegance of his design is only amplified.
On the off-chance he'll see this:
Mr. Wozniak, thank you for creating something that has give me a career and a lifetime of joy.
Code is available upon request.
I keep a Color Computer 3 because it has that excellent chip in it.
BBC Basic is the best all-round Basic of its era that I know of, with rich control flow features, proper recursion and built-in assembler. But I don't know how much was original work from Acorn and how much was borrowed from elsewhere. Are there any other 8-bit Basics that are especially good?
https://archive.org/details/dr_dobbs_journal_vol_01/page/n20...
https://downloads.reactivemicro.com/Users/Grant_Stockley/App...
I believe he was never the same after his small plane crashed. (Back then, wealthy people used small planes like ATVs, and had about the same safety record.)
I worked with another hw engineer of similar ability back in the 80s.
Mind-blowing watching him just pick up a pen and draw out a complete board schematic at lunch, then getting the working board back from mfg. the following week and launching it on the Space Shuttle.
https://www.youtube.com/watch?v=-LUGU0xprUo#t=14m20s
The whole interview is fantastic.
a) praise achievement not intelligence
and
b) Create an interest first. Maybe make it seem like magic or show something that you can do with it.
https://github.com/DigitalMars/Empire-for-PDP-11/blob/master...
It would be 2017 now if it wasn't for him!
E.g Commodore's Chuck Peddle was part of actually designing the 6502 with Bill Mensch, and went on to lead work on the PET which reached the market about the same time, and Commodore machines outsold pre-Mac Apple machines by a substantial factor from the very beginning.
The early Apple machines were too expensive to get the same reach, and never penetrated many markets at all (I'd never seen one in person growing up in Norway until the Mac - it simply wasn't a thing there, same as in many other European countries).
Woz's designs may well have been influential in some parts, but e.g Peddle spoke to Woz and Jobs when peddling (sorry) the 6502 to them, and was subsequently very dismissive about them, so the Commodore team explicitly went a different direction because Peddle saw their approach as too hacky and decided to build his own instead of considering licensing theirs, and so he's one of few people that have designed a computer from the CPU itself and up.
While his assessment of Apple will have to stand for Peddle's personal opinion, the point is that Commodore as well as Tandy/RadioShack machines would likely have hit the market at the same time irrespective of Apple, and in many markets they - especially Commodore - totally trounced Apple in vokumes anyway, so while I know Apple was influential to some, I really don't see any of those tree taken out of the equation changing things that much.
In fact to me my primary interest in the early Apple machines is because it's like a window into an alternate past that's just totally foreign to me because to me early Apple was just not a part of my childhood (my friends all had Commodore, Spectrum, Atari or Amstrad machines with some poor soul stuck with a Tandy; the mix varied greatly by country, but Apple was in very rarely in Europe, with strong sales in only a handful of countries), and it's fascinating.
This makes me cringe. A "senior" engineer is defined by whatever role a company slots you in. This is compounded by adding programming languages to the mix.
> I really wish I had done more embedded and assembly at school. I can't understand it or appreciate it.
There is no hardware involved here, per-se. What is there is the 6502 instruction set, plus binary floating point calculations. But the fact it is on the 6502 is only interesting because of the constraints.
If you are interested, pick up some tutorials on x86 assembly (or ARM, or whatever you have emulators or real hardware available) and go to town. Actually creating full programs(with syscalls) is a bit involved, but a small ASM function inside C++ (since you mentioned C++) should be perfectly doable (example: https://github.com/diasurgical/devilution/blob/master/Source... – you'll notice the Diablo game was not an embedded system either)
Here's one example:
https://jameshfisher.com/2018/03/10/linux-assembly-hello-wor...
I am so far away from the bits...
All of us who work in embedded software would disagree!
(Some of us still use small planes like ATVs -- but if the description of Woz' experience in the incident is accurate, this is like taking a Lamborghini out with a fresh driving permit)
[1] https://www.cultofmac.com/465778/today-in-apple-history-stev...
How could leaning on the yoke (or any other control) cause a stall? She'd have to pull back on it to force a climb like that. I'm kind of amazed he was able to fly a plane like that at 50 hours. A turbo-charged engine requires an extra certification step right? And the private pilot license minimum is 40 hours.
One of my flight instructors had a friend/business associate that bought a Kodiak @ Oshkosh after only having flown 182s. The insurance requirements were insane of course. Also, know a guy with 70 hours who bought a Lancair with a 330hp engine. In flying it seems more readily to be a case of if you can afford it, you can do it.
I was in a Mooney @ 120 hours. I just did a lot of extra training--EMT, Tailwheel endorsement, Instrument & commercial rating in it when I had the hours.
I guess there are people who do it for the danger, but the beauty of it is that you can get really down in the details and master things so it's not that risky. Once you really master the game, your biggest danger is yourself: get-there-itis, sloppy preflights, pushing things a little at a time, getting away with them, then pushing more, and so on.
I have done nothing in my life that I loved as much as flying. Mankind has been staring up into the sky for eons wishing we could fly. Now we can. Who wouldn't want to be part of that?
It can be an interesting experience, even if you have no desire to become a licensed pilot.
In case you are interested, that book is a post-apocalyptic novel and the protagonist has a great relationship with his dog. Usually having a dog in the story is all it takes to keep me interested, but I loved everything about this book.
When I turned 16 and started driving, my life changed overnight in a very good way. I imagine learning to fly would give me that feeling again. I could go where I want and not be limited by going where the roads are. It's very appealing.
I can hardly wait for my electric VTOL PAV.
This is a fundamental drive in many people that calls on something innate.
When you can fit the entire architecture into your head, all the way down to the chips and board layout, you'll find that you're capable of quite a lot on that platform.
A human with a skillet that has scaled up as much as computing hardware has scaled up is going to be virtually impossible to find, if not actually impossible.
Systems today are just too complex for one person to understand at the breadth and depth that Woz understood the earliest Apple hardware.
I was feeling old and thinking I was ignorant of some new slang there for a few seconds.
:-D
You damn-near gave me a heart attack then! :D
I thought he had died for a moment, Phew!
Personally I still use he/she most of the time unless I have a reason not to, but I also try to get into the habit of assuming less, not least because online in particular it is increasingly noticeable how often we assume someone's gender even in situations we have no reason to.
It's not unsurprising that some choose to carry that over into discussing people they don't know the preference of when it doesn't otherwise matter.
One reason to do so may be to explicitly normalise the usage so it doesn't imply a value judgement e.g based on appearance.
That’s some scary sentence here. so gender is now a « judgment ». Like, there’s no reason to assume because steve wozniak has all the physical characteristics of a male, and has always been called « mister », using « he » (which is the grammatically correct way of designing a male human in the english language by default) is the expression of a value judgement... Seeing this kind of mental twist in a scientific forum (which believes there is something called nature, with laws and hard facts) makes me really scared.
I base my estimates on several very admiring write-ups on Woz's genius early designs.
But of course those kinds of stories travel better than "his designs were half decent and did the job good enough to capture an empty market", and winners always write history, etc.
mov ah, 9
mov dx, 108
int 21
ret
db "Hello world!" 0D 0A "$"The wikipedia page for the Beechcraft Bonanza says: "The NTSB investigation revealed Wozniak did not have a "high performance" endorsement (making him legally unqualified to operate the airplane)" and links to https://web.archive.org/web/20121019022620/http://www.ntsb.g...
To fly this he would need a complex sign off to fly the retractable gear/variable pitch prop and high performance sign off for having over 200hp engine.
It’s a lot of airplane for that much experience but only takes 5 hours or so to get those sign offs from your instructor. Bonanzas have a reputation -now- that keep people away from them until they are very comfortable with flying a complex and fast airplane.
Fast reflexes comes from being young or being older and using reflexes you picked up when you were young. Knowing what you are doing comes from knuckling under to someone that does. It's why these aircraft regularly kill middle aged doctors. They have neither the reflexes or the tendency to obey.
There is a reason the air force trains 20 year old's to fly jet fighters.
No, most Bonanza owners are mid-career doctors, dentists and lawyers. Never seen a teen fly one.
Also, you generally have a second or two at least to deal with issues. Hence the old saw about "winding your watch before reacting to an airliner emergency."
> There is a reason the air force trains 20 year old's to fly jet fighters.
I talked to an ex-Air Force, now civilian flight school owner about that.
He said the problem with 30 year-old military aviation students is that they talk back when fed b.s., unlike kids. So it's a general discipline issue, not an age one.
Normalization of deviance, for people interested in the literature.
I don't fly anymore, but when I did? I used to get all the aviation safety magazines and read them cover-to-cover. I also knew some flight instructor instructors; people known for teaching safety in the industry.
A surprising number of well-trained pilots get in perfectly good airplanes and fly them until they run out of gas. Just because you pushed it those last dozen times doesn't mean you're going to get away with it this time.
EDIT: One of the more unusual crashes I will mention since this is HN happened out in the mountain states. A couple of thousand hour+ MEII pilots get into a multi-million dollar brand new jet. It's CAVU -- clear skies, visibility unlimited. They then proceed to fly the plane into the side of a mountain -- all the time trying to figure out the new switches and displays in the cockpit. I still think of that one when designing UX. Aviation is really complex, detailed, fun, and full of math like programming. But it is also a life-and-death endeavor if you take it too lightly. If you're safety paranoid, take up boating. It's much more forgiving than aviation.
I tried to get into guitar, but after I found skydiving I sold my guitar for my initial training and have been jumping ever since (20 years). That led me to wanting to drive airplanes when I could afford it.
Flying touches my imagination some how and was always interested in it. Being able to leave my local airport and bust out of the clouds hundreds of miles away safely despite the weather and lack of vision is rewarding.
https://en.wikipedia.org/wiki/Integer_BASIC
I do know that it was referred to that as far back as 1980. I’ve never seen a reference to it as “Apple Basic” and I had an Apple //e in 1986.
Woz originally called it "Game BASIC", some history at this page: http://woz.org/letters/apple-basic/
And it is totally something I could see Woz doing. :-D
I'm extremely sensitive to ideology wanting to change a language to better reflect its theory. It's the first step to totalitarism, and it's almost always done with perfectly good intentions (until we start to see the damaging side effects).
Note that many of the historical examples involve contexts where gender would not even have been in doubt (e.g. all students at Cambridge would have been men).
But some people use "they" just as a default when they're not sure. Using it as a default all of the time then serves to remove the consideration of whether or not it is done to try to send some sort of signal about the subject.
As a case in point, you here keep talking about Woz, but there is no reason to assume that using "they" was meant to imply anything about Woz at all. As such you're demonstrating exactly why to some using "they" in a bid to normalize it matters.
As for getting scared about it, it's just a pronoun. If that "scares" you, then that is an indication to me of why it is important.
Remember one of the goal of a language is also to convey meaning, and if possible in the most precise way (which is already hard enough even without taking moral issues into consideration).
The only question here is whether using "they" instead of "he" in this case implies something about Woz rather than is just a way for the speaker to be gender neutral in how they are writing about it.
It is already increasingly common to use singular "they" when we don't know the gender - I did it above, when writing about the person who originally used "they" about Woz. The only question then is whether there's any issue with doing so when their gender is relatively well known.
Since singular "they" is already common in English, the only reason why there might be an issue with it in the case of Woz would be because someone concerns themselves with the signalling effect.
We also never use language in the most precise way possible. That is a total strawman. Pretty much everything we write is full of ambiguity, sometimes because easier, but often also very much intentional, e.g. to signal that certain details (such as the gender of the person you're talking about) is irrelevant to what you're saying. And sometimes because it is political, such as to signal that gender does not matter can be.
Aside from the downdraft issue, running out of gas at altitude in VMC can be very interesting, but it doesn't have to be fatal. Even in heavily-forested areas, in a small plane you can put out the barn doors and decrease your horizontal speed quite bit, especially with a headwind.
We had a guy in Virginia in the 90s, I think. He was a student-ish pilot in a 150 that ended up in IMC (fog) in the heavily-wooded mountains while running out of gas.
He slowed the plane down as much he could, somehow kept the wings level, and ended up on somebody's back deck. Walked away. That's not guaranteed, of course, but in general planes are crash-rated based on flying directly into something. It's the failure to maintain control that kills many times more than the crash itself. Heck, they used to have shows where people crashed planes on purpose.
https://app.ntsb.gov/pdfgenerator/ReportGeneratorFile.ashx?E...
The use of singular 'they' has been common for (at least) several decades, long before any substantial number of people were worried about trans issues.
Tried googling and didn't turn up much.
Details on page 16 of http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Refere...
An exception is the "Reset" key which is hard-wired to the reset pin of the 6502. On early Apple II models, pushing "Reset", which is located just above Return, had disastrous consequences. People used to put a washer under the Reset key to make it harder to push by accident. Magazines published a simple hardware mod that required Control to be held at the same time as Reset, and later versions of the Apple II came with the mod built-in.
The Apple IIe keyboard adds two "apple" keys on both sides of the space bar which are dealt with in a completely different way, and are mapped to the same locations as the two joystick/paddle buttons. This was useful for playing games which required repetitive button-mashing, as it is easier to type a key quickly than to push a joystick button quickly. Since I was used to controlling the joystick with one hand and pushing a key on the keyboard with another hand, I had no problem adapting to early Macintosh software that required shift-click, option-click and command-click to overcome the limitation of a one-button mouse.
"The Macintosh mouse has four buttons, it's just that three of them are on the keyboard."