FAILURE MAP
← Case archive

FA-89795 / Instruction set emulation / Member archive

Rotate right is circular instead of through carry · case 05

ror moves bit 0 into bit 7 rather than the old carry.

Member previewVariant 5 · 3 implementations · 8 checks per implementation

Case contract

Input [a, c, ops] with ops asl, lsr, rol, ror, asr on an 8-bit value and a carry bit. asl: C = bit 7, shift left. lsr: C = bit 0, shift right with 0. rol: shift left, bit 0 = old C, new C = old bit 7. ror: shift right, bit 7 = old C, new C = old bit 0. asr: C = bit 0, shift right keeping bit 7. Report [A, C, Z, N] after each op.

Why this case matters

Rotate-through-carry instructions implement multi-byte shifts in 8-bit code; emulating them with circular rotates or sequenced updates breaks arithmetic libraries.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
rotate right through carry[[128, 1, 0, 1], [64, 0, 0, 0], [32, 0, 0, 0]][[128, 1, 0, 1], [192, 0, 0, 1], [96, 0, 0, 0]]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗