Mini-challenge: detecting activity on a port

Programming the 6502 microprocessor and its relatives in assembly and other languages.
Chromatix
Posts: 1462
Joined: 21 May 2018

Re: Mini-challenge: detecting activity on a port

Post by Chromatix »

The /NMI sampling mentioned will be in the context of the edge detection logic. If it was high this cycle but not last cycle, set the flip-flop so we remember to take the interrupt at the next instruction boundary; reset that flipflop as part of the NMI interrupt entry.
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: Mini-challenge: detecting activity on a port

Post by BigEd »

The general question of interrupt timing got a good airing in the thread
A taken branch delays interrupt handling by one instruction

but I think the question of how WAI resumed might be an interesting one to measure. I'm sure there's documentation, but as we know well, the reality could possibly be different: and a single cycle pulse on IRQ is not a normal thing to do.
Post Reply