When I did this, I remember there was a pair of registers that I could not 
save, probably de. I can look and see if I ended up with useful isr code in my 
project. Maybe the real Intended use is to be able to halt and resume on 
interrupt.

There was a way to cleverly restore the flags.

My isr code is in 
https://github.com/sbelectronics/h8/blob/master/h8-8008/asm/fpanisr.inc

Sent from my iPhone

> On Dec 24, 2025, at 1:02 PM, Robert Armstrong via cctalk 
> <[email protected]> wrote:
> 
> 
>> 
>> Tom Uban <[email protected]> wrote:
>> Here is the power-up/interrupt code I use on a board I built: ...
> 
>  Thanks!  A couple of questions -
> 
>  It looks like this code trashes DE, so I assume the background code just 
> can't use those registers?  So there's no way to code a truly transparent ISR?
> 
>  I also notice that the 8008 lacks any kind of interrupt enable F-F, nor any 
> EI/DI type instructions.  Is that right?  I guess you could always implement 
> those with external hardware, at least.
> 
>  And the big question - what's your code for restoring these flags when you 
> exit the ISR?  The MCS-8 manual says that all ALU instructions always update 
> all flags, with the exception of the rotate opcodes which only change carry.  
> It seems that means the ZS&P flags at least would have to be restored 
> together in one instruction.
> 
> Bob
> 

Reply via email to