From aa786e815543647f3d3c306aaf13ed00084a5684 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Fri, 16 Jan 2015 20:45:15 +0000 Subject: [PATCH] 6502: add warning about ordering of stash_zp --- Kernel/lowlevel-6502.s | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Kernel/lowlevel-6502.s b/Kernel/lowlevel-6502.s index 771d557b..ab8eba6c 100644 --- a/Kernel/lowlevel-6502.s +++ b/Kernel/lowlevel-6502.s @@ -82,6 +82,11 @@ _doexec: ; The C world here is fairly ugly. We have to stash various bits of ; zero page magic because its not re-entrant. ; +; stash_zp must bappen *before* we change mapping so the zp stash +; must be in common. The map routines are allowed to use _tmp1 and +; _ptr1 which will upset userspace terribly if they are not saved and +; properly restored! +; interrupt_handler: jsr stash_zp ; Save zero page bits jsr map_save -- 2.34.1