Hacker News new | ask | show | jobs
by a1k0n 2886 days ago
Hats off for making use of the AAA instruction. That's a very clever sequence converting up/down/left/right to -320/+320/-1/+1.
1 comments

For those who don’t know, x86 had support for binary coded decimal (you end up wasting a bunch of bits).

AAA converts the result of the addition of two valid unpacked BCD digits to a valid 2-digit BCD number.