Feb. 28th, 2008

tgies: (Default)

Paging probably [livejournal.com profile] secretcow or [livejournal.com profile] korgmeister or I think maybe [livejournal.com profile] 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

tgies: (Default)

ahaHA hAAHAHA HahA HAAA HA ha ha ha HA HA HA HA HA HAHHAHAHAHA

I

AM

HAVING

A

VERY

NICE

TIME

xkcd

Feb. 28th, 2008 11:44 pm
tgies: (Default)

Oh my shit I had this exact dream. It was really really vivid and I felt weird about it for roughly a week afterwards. I still don't really like thinking about it. The end.

Profile

tgies: (Default)
tgies

September 2016

S M T W T F S
    123
45 678910
11121314151617
18192021222324
252627282930 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Apr. 29th, 2026 08:22 pm
Powered by Dreamwidth Studios