Paging probably
secretcow or
korgmeister or I think maybe
caladri I don't know
sei ; interrupt disable
cld ; disable stupid stupid decimal mode
ldx #%01000000 ; a flag i'm about to stuff somewhere for my particular application
nop ; it doesn't matter what this is -- we always halt immediately after
; the last cycle of the ldx. Because the world hates me.
Why the hell does this halt right after the ldx on a 65C802? It works fine on a 6502 or a Ricoh 2A03. It always halts at the first ldx I try to do, unless I leave out the interrupt disable. However, if I do that, it jumps into damn nowhere a bit later, because there's no way for me to have the interrupt table set up yet (not without my registers!), and I get an unavoidable interrupt on a timer unless I disable them. Basically, it looks like the 65C802 won't let me ldanything when interrupts are off! What the hell! The documentation didn't warn me about this! Does anyone know what is going on here?
It is worth pointing out that X does indeed appear to contain what I loaded into it, but it doesn't matter, because the processor unceremoniously breaks immediately upon completion of this instruction. Weird. And the 'C802 is supposed to be a drop-in replacement for the stupid '02!
Also today I learned that 6502 programmers are the worst about premature optimization holy damn. (And they all think that inx inx is a faster way to get X from $FE to $00 than ldx #$00, which is hilarious)
i got more than two problems