General question re: interrupts

Programming the 6502 microprocessor and its relatives in assembly and other languages.
Post Reply
Meterman58761
Posts: 19
Joined: 05 Jun 2021

General question re: interrupts

Post by Meterman58761 »

If the only interrupt I'm working with is driven by the NMI pin on the CPU, are any SEI / CLI instructions therefore meaningless?

Or are there internal IRQs within the processor that are not otherwise addressed by the user's code?
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: General question re: interrupts

Post by BigEd »

Indeed, SEI/CLI only makes a difference for IRQs, so no need for those, and if you have them they won't have any effect.
Meterman58761
Posts: 19
Joined: 05 Jun 2021

Re: General question re: interrupts

Post by Meterman58761 »

Thank you! It just amazes me the code I've been looking at even works with all the cruft and inefficient coding I've dug out so far.
User avatar
BigDumbDinosaur
Posts: 9426
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: General question re: interrupts

Post by BigDumbDinosaur »

I suggest you read Garth's interrupt primer so you will become real familiar with how the 6502 reacts to interrupts.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
AndrewP
Posts: 368
Joined: 30 Aug 2021
Location: South Africa

Re: General question re: interrupts

Post by AndrewP »

BigDumbDinosaur wrote:
I suggest you read Garth's interrupt primer so you will become real familiar with how the 6502 reacts to interrupts.
Yup, I can second that; I've got it printed out behind me. I found it incredibly useful. That and your Investigating 65816 interrupts too (if using 65816).
User avatar
BigDumbDinosaur
Posts: 9426
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: General question re: interrupts

Post by BigDumbDinosaur »

AndrewP wrote:
Yup, I can second that; I've got it printed out behind me. I found it incredibly useful. That and your Investigating 65816 interrupts too (if using 65816).

The 65C816 interrupts article does repeat a few items in Garth's piece, but was focused on the 65C816's more powerful interrupt capabilities.

Incidentally, the 816 article posted here is out-of-date. The most up-to-date version is on my POC website.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
Post Reply