◄ WORLD V · SONNY 5DART 467 · a helldive at the net

THE WIDE REGISTERS a hidden high byte above A — the 16-bit accumulator C = B:A

The 6502’s accumulator is 8 bits: A. The 65816’s is 16: C = B : A, where B is a hidden high byte sitting above the old A. In 8-bit mode (M=1) you see only A, exactly as before; in 16-bit mode (M=0) the whole of C is live, and instructions like XBA (exchange B and A) and TCD (transfer C to the direct-page register) let you get at the high half. So a value like 0x1234 is B=0x12, A=0x34 combined — the 6502’s register preserved as the low byte of a wider one. Backwards compatibility built into the register file.

THE TECHNIQUE C = (B « 8) | A — the 6502’s A is the low byte

The demo combines a high byte B=0x12 and the 6502’s A=0x34 into the 16-bit accumulator C=0x1234: live demo


HISTORY & CREDIT 65C816 16-bit accumulator (C=B:A)

“A wider accumulator throws away the old one.” — the 65816 keeps the 6502’s A as the low byte and adds B above it. cited

the register · C = B:A — B a hidden high byte above the 6502’s A.
the access · XBA swaps B and A; TCD/TDC move the full C to/from D.
the compatibility · M=1 shows only A — the 6502 register, unchanged.

A wider accumulator that keeps the old one as its low byte — the 6502’s A living inside the 65816’s C. width

RECOMMEND FOR I-13 the combined register, on the compiler

On the canonical compiler, B=0x12 and A=0x34 combine to C=0x1234 (4660) — the 6502’s A as the low byte:

$ i13 run pm_wideregisters.i13 # C = (B<<8) | A RUN OK · 14 step(s) · peak stack 2 · call depth 0 A_lo = 52 B_hi = 18 C16 = 4660 -- 0x1234 = B:A combines = 1
Recommend as a NULL — a wider register, same family. The 16-bit accumulator concatenates a high byte onto the 6502’s A — a representation/width change (B44), with M=1 recovering the 6502 (B39). No carried channel. NULL — the permutation widening the register file while keeping the old register as the low half.