3 ms·
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? I
by jzwinck 4y ago
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.
- kens 4y agoThe 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.
- prirun 4y agoPrime 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.