On Feb 14, 11:48am in "Re: Another giant leap... ermmm... sideways", you
warbled:
] On 14 Feb 95 00:29:25 +0000, Johnathan Taylor said:
] > RETI difference is actually that it's
] > recognised by true Zilog peripherals to relinquish the current priority
level.
]
] So could you explain precisely what is meant to happen? Is there a difference
] between RET and RETI or not?
]
] imc
>From the man with the Databook in his bag (it's ok, I'm not _really_ that
sad, I'm doing a z80-simulation for my 3rd-year-project!),
"the PIO decodes the RETI (return from Interrupt) instruction directly
from the CPU data bus so that each PIO in the system knows at all times
whether it is being serviced by the CPU interrupt service routine. No
other communication with the CPU is required"
This basically means that if you want to interface to `standard' z80
peripherals that use this method in your interrupt routine, you have
to use reti (trust me, I know, I had to last year!) but otherwise
the difference is diddly squat.
Except that reti takes an extra byte and 4 extra t-states...
S Z H PV N C HEX Bytes Cycs Tstates
RET PCl<-(SP) . . X . X . . . C9 1 3 10
PCh<-(SP+1)
RETI Return from . . X . X . . . ED 2 4 14
Interrupt 4D
Happy now?
Geoff