Floating Point Routines by Steve Wozniak
mailp.in
mailp.in
I am (very slowly) working on including all ROMs in my AppleII emulator in source form. Most usefully, this will eventually include writing an assembler that understands multiple old-school assembler formats. I have S-C Macro Assembler syntax implemented, at least enough to assemble the S-C Applesoft disassembly. https://github.com/zellyn/goapple2/tree/master/source (This is my first-ever assembler, so the code is likely horrible. I intend to read some other assemblers for tips, but wanted to bash my way through the problem myself first.)
Mailpin seems to just add additional tracking to who's reading it, without adding additional value: the syntax highlighting is pretty broken.
https://news.ycombinator.com/submitted?id=mailpin
https://news.ycombinator.com/submitted?id=getmailpin
https://news.ycombinator.com/submitted?id=wenbinf (maybe unrelated, but odd submission patterns nonetheless)
The first was for the IBM 1401 (really!). iirc, it had a 2 or 3 digit exponent and 10 or more digit mantissa. It was just for fun, and never used for anything.
The second was for a Varian minicomputer. It was intended for an application that needed to solve a 19 x 19 system of linear equations. Since the Varian was a 16-bit machine, I used a format of 1 word (16 bits) exponent and 2 word (32 bits) mantissa. It was fun, it worked, and I was paid to do it. What more could anyone ask?
By the way, though I know what an IBM 1401 is, I had never heard of Varian and even their Wikipedia page is only like two paragraphs long. The Internet needs more information...
This code so eminently readable. Is this the norm or is it Woz working his magic writing incredibly detailed documentation. Writing easily understandable code takes effort and wisdom. Anyone who writes code for a living knows the importance of writing code which is easy to read and maintain.
Of course, it helped that the ARM instruction set was very simple back then.
It's super easy to write spaghetti code in assembler, so if you wrote any code of any size you really needed to be super careful in structuring and documenting it. Especially since in the "old days" your selection of identifiers (labels) was also often limited.
Plus assembly is generally pretty regular in structure so you can't rely on the "shape" of the code (e.g. indenting) to find your way, and it's not dense enough to allow a complete functional unit to fit in your fovea.
As a result of that, if you didn't write like Woz did here you ended up with write only code.
Plus Woz was also a very good developer.
FPGA design is not writing a program with instructions that are executed by a processor. It is describing real hardware with registers, wires, memories, pins and logic gates. This description is mapped onto the actual resources in the FPGA. The result might be a CPU that can execute instructions available as bit values in a memory, but quite often it isn't.
I know this is nitpicking - but as a HW designer I really have a problem when people use the term "FPGA programming". ;-)
Nice find!
(edited to add, what I'm getting at is sometimes the standard is written a decade after the code is in use, like web standards, sometimes its the other way around like IPv6)
Note that Briel Computing sells at least two SBCs based on the 6502 and there may be other modern 6502 boards out there. The N8VEM project sells/sold bare PCBs for a "6502 on a S100 bus". I own all of the above. There is also a N8VEM 6502 board in redesign for the ECB bus which is kinda sorta one line summary a Kontron-like DIN41612 eurocard connector bus, probably exists because a genuine S100 connector is $15 and a DIN41612 because of the eurocard standard is like $3.
- The representation is totally different (twos-complement signed significand and exponent instead of unsigned significand, biased exponent, and sign bit), one less bit of precision, no inf/nan encodings, and support for unnormalized encodings. - No rounding. Results are chopped. - Traps instead of defined results for all computations. - No guard bit[s] for subtraction.
If you're using "IEEE 754" to colloquially refer to "floating point", we can go back considerably earlier; at least to the Z3.
Syntax highlighting in general is kinda silly. I'm sad that people turn their noses up at code that isn't drenched in unicorn vomit.