From 27816581339316b7c58f6df506a1188b3821bc62 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 8 Mar 2015 19:27:24 +0000 Subject: [PATCH] zx128: Fix stacking of arguments on switchin/switchout With this fixed we can get to the point of trying to load init properly --- Kernel/platform-zx128/tricks.s | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Kernel/platform-zx128/tricks.s b/Kernel/platform-zx128/tricks.s index 92ba3431..d08f1adb 100644 --- a/Kernel/platform-zx128/tricks.s +++ b/Kernel/platform-zx128/tricks.s @@ -72,9 +72,10 @@ _switchout: ; find another process to run (may select this one again) push af call _getproc - pop af + pop af ; tidy this stack stuff up ex (sp), hl ?? push hl + push af call _switchin ; we should never get here @@ -140,6 +141,7 @@ _switchin: ; Is our low data in 0x8000 already or do we need to flip ; it with bank 6 + inc hl ; get our low bank (2nd entry) ld a, (low_bank) cp (hl) call nz, fliplow @@ -360,6 +362,7 @@ bankfork_1: ; have the IM2 vectors ; fliplow: + ret ; FIXME exx ld hl, #0x8000 ld de, #0xc000 -- 2.34.1