This is a discussion on Re: Mode 2 interupts - CP/M ; >Message-ID: J.G.Harston wrote: > >Is bit zero actually forced to zero by the Z80 during an IM2 or > >not? If I=&FF and the data bus is &FF, is the vector fetched from > >.IRQFix ; I needs to be ...
> >Is bit zero actually forced to zero by the Z80 during an IM2 or
> >not? If I=&FF and the data bus is &FF, is the vector fetched from
> >.IRQFix ; I needs to be set to &FD
> >FDF7 E5 PUSH HL
> >FDF8 2A FE FF LD HL,(&FFFE) ; Save HL and get IRQV
> >FDFB E3 EX (SP),HL ; Restore HL and jump to IRQV
> >FDFC C9 RET
> >FDFD C3 F7 FD JP &FDF7
> >FE00 FD DEFB &FD
> bit 0=0 internally and the hardware I use also forces that.
Doing further testing on real hardware shows the real world
contradicts its documentation.
BBC BASIC for the Spectrum has the above mentioned IRQ patch. The
consequence of this is that, with the databus at &FF:
* If bit zero is forced to zero, IRQs vector via &FDFE/&FDFF and
thence to &FDF7.
* If bit zero is not forced to zero, IRQs vector via &FDFF/&FE00
and thence to &FDFD.
Consequently, setting &FDFD to &C9 would NOP out the interrupt
code if bit zero is /not/ forced to zero. I tested this and got
the following results:
Sinclair Spectrum 48K
Acorn BBC BASIC Version 2.20
(C) Copyright R.T.Russell 1983
>PRINT ~!&FDFD Confirm contents of memory
>10?&FDFD=&C9 Make &FDFD a RET
>20REPEAT PRINT TIME:VDU 11:UNTIL 0 Print TIME continously
>GOTO 20 Initial test
11666 Continuously updated TIME displayed
Escape at line 20 Press Escape to stop program
>RUN Set RET and test
11978 Static display
Also, no response to interrupt
driven keyboard, so no response
Interrupt code is not being executed, which means the RET is being
jumped to. The only way this can happen is if IRQs are being
vectored to &FDFD, via &FDFE/&FE00, which can only be happening if
bit zero is not being forced to zero.
J.G.Harston - firstname.lastname@example.org - mdfs.net/User/JGH
Our chief weapons are 'who', 'ps -aux', 'kill -9', and a fanatical devotion
to 'reboot -q'.