Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on KolibriOS – operating system written entirely in assembly language. Parent comment
BSF (Bit Scan Forward) is the most famous which returns an undefined result if your operand is 0.
Many instructions leave the state of bits in the FLAGs register undefined. E.g. AAA will leave SF,ZF, and PF undefined.
Then of course there is the “reserved bits” but those are easier to avoid.
There are no comments on this comment yet.
BSF (Bit Scan Forward) is the most famous which returns an undefined result if your operand is 0.
Many instructions leave the state of bits in the FLAGs register undefined. E.g. AAA will leave SF,ZF, and PF undefined.
Then of course there is the “reserved bits” but those are easier to avoid.