From 0df9fc570cb4990463a12680c81ad7896bdc32e3 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 11 Aug 2018 00:32:42 +0100 Subject: [PATCH] z80fixedbank-banked: apply the same SP fix as to the main fixedbank code --- Kernel/lib/z80fixedbank-banked.s | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Kernel/lib/z80fixedbank-banked.s b/Kernel/lib/z80fixedbank-banked.s index bd0b4ac2..54a7ecb6 100644 --- a/Kernel/lib/z80fixedbank-banked.s +++ b/Kernel/lib/z80fixedbank-banked.s @@ -159,6 +159,11 @@ not_swapped: ldir exx + ; Restore the stack in case we are not swap based so we don't + ; scribble the bank stack + + ld sp, (U_DATA__U_SP) + call map_kernel_restore ; check u_data->u_ptab matches what we wanted @@ -183,7 +188,6 @@ skip_copyback: ; restore machine state -- note we may be returning from either ; _switchout or _dofork - ld sp, (U_DATA__U_SP) pop af pop iy -- 2.34.1