From 87daf0d2bade0c66b353809c4ce7977a59535900 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 10 Sep 2018 13:55:18 +0100 Subject: [PATCH] sam: don't swap the callers IX and IY on a switch it upsets them --- Kernel/platform-sam/tricks.s | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Kernel/platform-sam/tricks.s b/Kernel/platform-sam/tricks.s index 0bf22e49..127d4f31 100644 --- a/Kernel/platform-sam/tricks.s +++ b/Kernel/platform-sam/tricks.s @@ -42,7 +42,7 @@ _platform_switchout: push iy ld (U_DATA__U_SP), sp - ; The U_DATA stash lives in th top of the user process. Map that + ; The U_DATA stash lives in the top of the user process. Map that ; low with interrupts off so we can ldir between the two ld a,(U_DATA__U_PAGE + 1) call map_page_low @@ -105,8 +105,8 @@ skip_copyback: ld hl,#0 ld (_runticks), hl ; Recover IX and IY, return value - pop ix pop iy + pop ix pop hl ; if we pre-empted in an ISR IRQ's stay off, if not they get enabled -- 2.34.1