TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Steve Wozniak's floating point routines for the 6502

502 点作者 jamesbowman将近 6 年前

23 条评论

dekhn将近 6 年前
I don&#x27;t think many people realize that Woz&#x27;s dad was an electrical engineer at Lockheed who would bring home computer manuals that Woz would read as a kid.<p>This seems to be a fairly effective way to create world-changing computer engineers.
评论 #20401231 未加载
评论 #20397413 未加载
评论 #20397486 未加载
评论 #20397820 未加载
justinjlynn将近 6 年前
Steve Wozniak is one of the few people of note in the tech industry who, the more I learn about them, seems more and more worthy of my respect. When I hear others speak of their sense of humour, how they stuck by their friends even when those friends clearly took advantage of them, the work and exemplary engineering skill they so clearly poured into their projects, their financial success and, then after having enjoyed that success, their leaving that successful business behind to engage in improving things for the future - to invest in educating children - I feel a sense of loss. Steve Wozniak just seems like the kind of person one would be lucky to have the opportunity to have as a friend one could learn so much from. It&#x27;s rare to feel that way about people one doesn&#x27;t know first hand and, while it does feel like missing out, it&#x27;s nice to have a prominent example of such a person, a financially successful person, within the tech industry - often a dark place indeed. A reminder that one doesn&#x27;t have to be soulless in order to succeed in the valley - just skilled and, hopefully, lucky. &quot;So shines a good deed in a weary world.&quot;
评论 #20398768 未加载
评论 #20398908 未加载
评论 #20398855 未加载
js2将近 6 年前
See also his (probably better known) 16-bit VM, Sweet 16. Published in Byte November, 1977:<p><a href="https:&#x2F;&#x2F;archive.org&#x2F;details&#x2F;byte-magazine-1977-11&#x2F;page&#x2F;n147" rel="nofollow">https:&#x2F;&#x2F;archive.org&#x2F;details&#x2F;byte-magazine-1977-11&#x2F;page&#x2F;n147</a><p><a href="http:&#x2F;&#x2F;amigan.1emu.net&#x2F;kolsen&#x2F;programming&#x2F;sweet16.html" rel="nofollow">http:&#x2F;&#x2F;amigan.1emu.net&#x2F;kolsen&#x2F;programming&#x2F;sweet16.html</a>
评论 #20405181 未加载
评论 #20399644 未加载
sagebird将近 6 年前
I jumped into reading this note without looking at the url or author and near the end I was wondering who wrote it -- Then I saw the reference to the SPI driver which was a dead give away for James Bowman. I am continuously impressed with his work in the embedded scene after discovering the gameduino. It feels like even though there are thousands of voices on the web I actually only care about what perhaps 50 people are writing.
评论 #20399627 未加载
dev_dull将近 6 年前
&gt; <i>They took the limitations of their computers as a challenge, sat down, and made these tiny machines do impressive things.</i><p>Poets knew from long ago that using pentameter and constraints fosters creativity. Here we see the same principle applied in computing.
评论 #20397869 未加载
评论 #20398037 未加载
评论 #20400376 未加载
评论 #20397392 未加载
评论 #20408364 未加载
phaedrus将近 6 年前
Floating point can be tricky.<p>I competed in the first couple years of Sparkfun&#x27;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.)<p>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&#x27;t trigger the bug.<p>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&#x27;t yet have a smartphone, or I looked and couldn&#x27;t find code on the web for my microcontroller.<p>(And I couldn&#x27;t just drop in some C code - it was a Parallax Propeller and my robot&#x27;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 &quot;experiemental&quot; - or were when I started the project.)<p>The incorrect floating point code had been one of the first things I&#x27;d written - it&#x27;d been responsible for my robot crashing every year, including that morning. (I&#x27;d blamed hardware, upgraded the GPS unit, improved sensors, etc.)<p>One year later to the day, this was all on my mind again because I couldn&#x27;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 &quot;public&quot; and I could have called it.
WalterBright将近 6 年前
Having written a lot of 8 bit assembler for the 6800 microprocessor for 2K eproms, I can attest it is a very different skill from writing modern software.
评论 #20398291 未加载
commandlinefan将近 6 年前
I learned to program on a 6502 when I was younger - it&#x27;s a little depressing that computers went and got so fast that there&#x27;s no real justification for doing this sort of thing any more in almost any domain (except, I guess, if you manage to land a position developing embedded I2C drivers).
评论 #20398047 未加载
评论 #20397403 未加载
评论 #20398705 未加载
评论 #20402461 未加载
mothsonasloth将近 6 年前
As a senior Java &#x2F; CPP developer, reading what Wozniak had written, it might have been some incantation in a forgotten language.<p>I really wish I had done more embedded and assembly at school. I can&#x27;t understand it or appreciate it.<p>Maybe SW and HW shouldn&#x27;t mix, bar a few visionaries who bridge both worlds?
评论 #20398766 未加载
评论 #20397936 未加载
评论 #20397640 未加载
评论 #20397845 未加载
评论 #20399198 未加载
jackhack将近 6 年前
How curious that there&#x27;s a reference to Jef Raskin on the facing page (p.205). Raskin, of course, was a visionary at Apple who would go on to advocate for a version of Macintosh quite different from what Steve Jobs envisioned (but which later appeared as the Cannon Cat). (a standalone system, but also an Apple ][ expansion card: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Canon_Cat" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Canon_Cat</a> )<p>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.<p>On the off-chance he&#x27;ll see this:<p>Mr. Wozniak, thank you for creating something that has give me a career and a lifetime of joy.
ananonymoususer将近 6 年前
The 8051 platform can present even more challenges for assembly language code developers than the 6502. It has been over 35 years since I wrote any 6502 code, and over 30 years since I wrote any 8051 code, but I remember the biggest issue on 8051 was the lack of RAM. You get a total of 384 bytes of RAM (256 bytes of normal RAM and 128 bytes of &quot;zero page&quot; RAM). When I needed to write floating point math functions for the 8051, I realized that fixed point decimal math would meet my requirements. I took advantage of the large ROM space to store a bunch of constants (powers of 10) and the code I wrote operated on decimal ASCII strings. Because of the limited memory, all of my operators would destroy the second argument and replace it with the result.<p>Code is available upon request.
评论 #20398846 未加载
simonebrunozzi将近 6 年前
The title says &quot;Wozniac&quot; but it really should be with a final &quot;k&quot;, as in &quot;Wozniak&quot;.
评论 #20397939 未加载
iainmerrick将近 6 年前
I was always very impressed by the floating point routines in BBC Basic (also on the 6502). Anyone know who wrote those, and if they were derived from this work by Rankin and Wozniak?<p>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&#x27;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?
评论 #20401104 未加载
ARandomerDude将近 6 年前
He was 2nd author on the paper. No doubt, Woz has a well-deserved reputation for brilliance, but I wonder about the 1st author&#x27;s contributions too. Anyone familiar with Roy Rankin of Stanford?<p><a href="https:&#x2F;&#x2F;archive.org&#x2F;details&#x2F;dr_dobbs_journal_vol_01&#x2F;page&#x2F;n207" rel="nofollow">https:&#x2F;&#x2F;archive.org&#x2F;details&#x2F;dr_dobbs_journal_vol_01&#x2F;page&#x2F;n20...</a>
评论 #20400178 未加载
dang将近 6 年前
A thread from 2014: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=7768465" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=7768465</a>
gomijacogeo将近 6 年前
He also wrote a nifty article back in &#x27;81 about calculating e to 118,000 decimal places.<p><a href="https:&#x2F;&#x2F;downloads.reactivemicro.com&#x2F;Users&#x2F;Grant_Stockley&#x2F;Apple%202%20Woz%20e%20Calc%201981.pdf" rel="nofollow">https:&#x2F;&#x2F;downloads.reactivemicro.com&#x2F;Users&#x2F;Grant_Stockley&#x2F;App...</a>
Mauricio_将近 6 年前
&quot;They presume a four-byte floating point operand consisting of a one-byte exponent ranging from -218 through +127...&quot; Is this a mistake on the magazine?
constmu将近 6 年前
There are a couple of famous books for reading Steve Jobs&#x27; biography. Are there similarly good books to read about Steve Wozniak&#x27;s biography?
评论 #20399060 未加载
hi41将近 6 年前
I need to confess. I am absolutely petrified by floating point. Is there a good resource I can learn it from.
michelinman将近 6 年前
Woz ur the man.
redis_mlc将近 6 年前
Woz was scary good at both hw and sw (author of Apple BASIC.) If you have time, go through his various Apple documents online.<p>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.)<p>I worked with another hw engineer of similar ability back in the 80s.<p>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.
评论 #20397636 未加载
评论 #20398234 未加载
评论 #20398155 未加载
评论 #20398449 未加载
评论 #20398036 未加载
评论 #20400514 未加载
justinjlynn将近 6 年前
While I think Woz sets a good example, they&#x27;re human - and I&#x27;m sure they&#x27;ve done and&#x2F;or said things that are less than one might expect and which one probably wouldn&#x27;t approve of or condone - or perhaps which one might even condemn. I&#x27;d caution against canonising people - it sets too high a standard; which no one real can meet.
评论 #20399579 未加载
评论 #20403091 未加载
评论 #20399106 未加载
Udik将近 6 年前
For the two people who might not have seen it yet, here&#x27;s that fabulous joint interview to Steve Jobs <i>and</i> Bill Gates, where they recount the story of the (missing) floating point routines in Woz&#x27;s BASIC for the Apple, and how Microsoft came to rescue.<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=-LUGU0xprUo#t=14m20s" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=-LUGU0xprUo#t=14m20s</a><p>The whole interview is fantastic.