From d187700447290de8d4feffd52d4e92a048d75473 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Fri, 15 Feb 2019 21:57:41 +0000 Subject: [PATCH] 8080: turn on interrupt support and pre-emption Fix one small bug in the process --- Kernel/lib/8080fixedbank-core.s | 2 +- Kernel/lowlevel-8080.s | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Kernel/lib/8080fixedbank-core.s b/Kernel/lib/8080fixedbank-core.s index 0ee44abe..37f82de7 100644 --- a/Kernel/lib/8080fixedbank-core.s +++ b/Kernel/lib/8080fixedbank-core.s @@ -167,7 +167,7 @@ skip_copyback: ! own saves so the cost is paid in the right place ! pop h - mov l,a + mov a,l sta .areg ! FIXME: add a pad byte to .areg instead pop h shld .tmp1 diff --git a/Kernel/lowlevel-8080.s b/Kernel/lowlevel-8080.s index 2b3f4eab..ae1edf05 100644 --- a/Kernel/lowlevel-8080.s +++ b/Kernel/lowlevel-8080.s @@ -236,12 +236,12 @@ interrupt_handler: push d push h call platform_interrupt_all - jmp interrupt_pop !! FIXME ! Switch stacks lxi h,0 dad sp shld istack_switched_sp lxi sp,istack_top + ! ! Map the kernel ! @@ -270,7 +270,7 @@ interrupt_handler: push h call _platform_interrupt pop h - mov l,a + mov a,l sta .areg ! FIXME: add a pad byte to .areg instead pop h shld .tmp1 @@ -334,7 +334,6 @@ trap_signal: preemption: xra a sta _need_resched - call map_restore ! ! Save our original stack in syscall_s ! Move to our kernel stack (free because we don't preempt @@ -344,10 +343,6 @@ preemption: shld U_DATA__U_SYSCALL_SP lxi sp,kstack_top ! - ! Fix up the mappings - ! - call map_kernel_di - ! ! Mark ourselves as in a system call ! mvi a,1 -- 2.34.1