Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The BCD instructions are one of the few things that was dropped in the x86-64 transition, so it wouldn't work at all anymore.


they'd never been extended to work on more than 8 bits, even in the 8086; they only really existed for 8080 compatibility, and arguably the 8080 primarily had them to ease the path from earlier intel processors designed for, if i'm not mistaken, literal pocket calculators

in pocket calculators you have to display the result in decimal after performing a single arithmetic operation, so it's much more efficient to do the arithmetic in bcd than to convert from decimal to binary, perform the arithmetic operation, and then convert back


Yeah, if you wanted numbers greater than 99 you had to use them in the x87 (if you had one)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: