From 410815af404018a51cc3adcd4c9192426b20b450 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 25 Nov 2018 00:02:04 +0000 Subject: [PATCH] zxdiv: set interrupt flags properly around swap We don't turn interrupts on for swap yet as we need to tidy up other areas like the page duplicator --- Kernel/platform-zxdiv/tricks.s | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Kernel/platform-zxdiv/tricks.s b/Kernel/platform-zxdiv/tricks.s index 5eb7d39e..5bae347e 100644 --- a/Kernel/platform-zxdiv/tricks.s +++ b/Kernel/platform-zxdiv/tricks.s @@ -114,6 +114,10 @@ _switchin: ; The second pushes are C function arguments. SDCC can trample ; these + ; Turn this one once we have it all sorted and debugged + ; ei + ; xor a + ; ld (_int_disabled),a push hl ; Save push de push hl ; Arguments @@ -125,6 +129,9 @@ _switchin: pop af pop de ; Restore pop hl + ld a,#1 + ld (_int_disabled),a + di ld a, (hl) ; We should now have a page assigned not_swapped: ; We are in DI so we can poke these directly but must not invoke -- 2.34.1