From: Alan Cox Date: Tue, 16 Apr 2019 22:57:09 +0000 (+0100) Subject: 8085: add hooks for magic Z80 M1 emulation X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=77b5bf9545a88d9860ae48785ce9354cfb3bfa87;p=FUZIX.git 8085: add hooks for magic Z80 M1 emulation --- diff --git a/Kernel/lowlevel-8085.s b/Kernel/lowlevel-8085.s index 7e920adc..4f72cd7a 100644 --- a/Kernel/lowlevel-8085.s +++ b/Kernel/lowlevel-8085.s @@ -297,6 +297,10 @@ interrupt_handler: intout: xra a sta U_DATA__U_ININTERRUPT + + FAKE_IRET ! Usually null but some platforms + ! have hacks for Z80 peripherals + lda U_DATA__U_INSYS ora a jnz interrupt_pop @@ -342,6 +346,12 @@ preemption: lhld istack_switched_sp shld U_DATA__U_SYSCALL_SP lxi sp,kstack_top + + ! + ! So any Z80 style devices see an 'iret' + ! + FAKE_IRET + ! ! Mark ourselves as in a system call ! diff --git a/Kernel/platform-v85/kernel.def b/Kernel/platform-v85/kernel.def index 91b882e3..e3f55f04 100644 --- a/Kernel/platform-v85/kernel.def +++ b/Kernel/platform-v85/kernel.def @@ -17,3 +17,6 @@ CONFIG_SWAP = 1 #define DI mvi a,0x0a ; sim #define EI mvi a,0x08 ; sim + +/* We have no Z80 peripherals and no iret fakery */ +#define FAKE_IRET