8085: add hooks for magic Z80 M1 emulation
authorAlan Cox <alan@linux.intel.com>
Tue, 16 Apr 2019 22:57:09 +0000 (23:57 +0100)
committerAlan Cox <alan@linux.intel.com>
Tue, 16 Apr 2019 22:57:09 +0000 (23:57 +0100)
Kernel/lowlevel-8085.s
Kernel/platform-v85/kernel.def

index 7e920ad..4f72cd7 100644 (file)
@@ -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
        !
index 91b882e..e3f55f0 100644 (file)
@@ -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