I don't remember this being the case back in the day, and therefore believe WDC's documentation may be wrong here. I just tested on an Apple IIGS emulator (I can break out real hardware if you want --
I've done it before) and the upper 8 bits remain intact after the
sep. Code used to test (started at memory offset $B000):
Code:
clc
xce
rep #$30
lda #$beef
sep #$30
brk $ff
Result once the
brk hits (on the IIGS the built-in monitor will give you a full register dump):
Code:
00/B009: 00 FF
A=BEEF X=0000 Y=0000 S=0134 D=0000 P=B0
B=00 K=00 M=0C Q=88 L=1 m=1 x=1 e=0
You can clearly see here that m=1 and x=1 (meaning 8-bit accumulator and 8-bit indexes), but A contains $BEEF, not $00EF.
I've attached screenshots proving the case (note I had to issue
m=0 prior to ensure the disassembly showed up correct, given use of the 16-bit
lda).