Re:Reverse-engineering the multiplication algorithm in the I...
by kens on Wednesday March 15, 2023 @12:34PM
(#35170856)
Author here. I'm without electricity but can discuss the 8086 if anyone has questions :-)
[ Parent
| on HN ]
Re:Reverse-engineering the multiplication algorithm in the I...
by jzwinck on Wednesday March 15, 2023 @01:31PM
(#35171829)
As far as I know, x86 and x86-64 have never had microcode for ASCII (base 10 is what I'm interested in) to binary number conversion. Why do you think this is? It seems like a very common operation these days, and the reasons you gave for microcode multiply seem applicable.
Re:Reverse-engineering the multiplication algorithm in the I...
by kens on Wednesday March 15, 2023 @01:53PM
(#35172143)
The IBM System/360 (1964) had instructions to convert a character string to packed decimal, and to convert packed decimal to binary. This was motivated by the large amount of punch-card data that was handled back then, with all the numbers in decimal. But I guess Intel figured that string conversion wasn't common enough in modern systems to merit adding it to the instruction set.
Re:Reverse-engineering the multiplication algorithm in the I...
by prirun on Wednesday March 15, 2023 @05:48PM
(#35175184)
Prime minicomputers had decimal arithmetic in microcode & hardware in the early 80's to support PL/I and COBOL "picture" data types and packed decimal. They also had sophisticated editing to pictures like ZZZ,ZZ9.99 which would display 1024 as 1,024.00
These instructions were also implemented in PMA, the Prime Macro Assembler, in the OS so that if a machine didn't have these instructions, a UII fault occurred and the instruction was simulated in software. I implemented a lot of the easier instructions in C in the Prime emulator, but for the more complex things like decimal math, I let those fault so the Prime OS would handle them.
Re:Reverse-engineering the multiplication algorithm in the I...
by detrites on Wednesday March 15, 2023 @01:36PM
(#35171903)
Not a question, just a comment that after having read several of your posts now, building up knowledge as I go, this one is the first I've understood from start to end. Most satisfying!
Re:Reverse-engineering the multiplication algorithm in the I...
by gregschlom on Wednesday March 15, 2023 @01:51PM
(#35172112)
Ken, I've read and enjoyed many of your posts and I always wonder: how do you find so much time to do that? Is that your full time occupation?
Thanks!
Re:Reverse-engineering the multiplication algorithm in the I...
by kens on Wednesday March 15, 2023 @01:54PM
(#35172154)
I'm retired, so I have time for various vintage computer projects.
Re:Reverse-engineering the multiplication algorithm in the I...
by peteri on Wednesday March 15, 2023 @04:03PM
(#35173974)
Interesting, any reason for not discussing AAD yet? (oh and great series BTW)
Re:Reverse-engineering the multiplication algorithm in the I...
by kens on Wednesday March 15, 2023 @04:20PM
(#35174187)
AAD is lower on the list since it is both complicated and kind of obscure. Also, it depends on multiplication and division, so I want to cover them first.
Re:Reverse-engineering the multiplication algorithm in the I...
by bonzini on Wednesday March 15, 2023 @06:17PM
(#35175484)
AAD is essentially a multiplication and a sum:
170 Q -> tmpc
171 AH -> tmpb CALL CORX
172 AL -> tmpb ADD tmpc
173 ZERO -> AH JMP 179
179 SIGMA -> AL RNI
F
It doesn't depend on division despite the name, it performs ASCII to binary conversion.
Re:Reverse-engineering the multiplication algorithm in the I...
by johndmcmaster on Wednesday March 15, 2023 @11:15PM
(#35177722)
What is your favorite BBQ sauce to pair with an 8086?