Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/31/00 13:14
Read: times


 
#2961 - A little more detail

In my example above for the interrupt routine, you'll need to add all the other envirnoment maintenance code like pushing and popping the flags (as you must do for most all interrupts).

I only mention it because this sounded like a novice question and if you forget to PUSH PSW and POP PSW on the way out, you'll get a very hard system wide bug to find. The example code I wrote affects no other register values during its interrupt:

. NTR_T1:
. push psw ;save foreground flags
. ... ;enable next interrupt
. djnz countdown,adios
. cpl px.y ;toggle LED output pin
. mov countdown,#8 ;reload passcount
.adios:
. pop psw ;restore foreground flags
. reti

-Jay C. Box


List of 5 messages in thread
TopicAuthorDate
Need to falsh LED using interupts            01/01/70 00:00      
RE: Need to falsh LED using interupts            01/01/70 00:00      
RE: Need to falsh LED using interupts            01/01/70 00:00      
A little more detail            01/01/70 00:00      
A little more detail            01/01/70 00:00      

Back to Subject List