From 6d7051bc0fd86089b865cd9b7c0f8f7284dba2f5 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Thu, 5 Jul 2018 12:58:27 +0100 Subject: [PATCH] trs80m1: preserve A from the boot loader to use as mapper info We need different boot blocks for different mappers so make them pass in a mapper code. Our current boot blocks all enter with A = 0 s this is compatible. --- Kernel/platform-trs80m1/crt0.s | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Kernel/platform-trs80m1/crt0.s b/Kernel/platform-trs80m1/crt0.s index 2e7f84cf..19b4a382 100644 --- a/Kernel/platform-trs80m1/crt0.s +++ b/Kernel/platform-trs80m1/crt0.s @@ -48,8 +48,13 @@ ; ; Once the loader completes it jumps here +; A holds the type of mapper the boot block was for +; +; 0: Supermem +; 1: Selector ; start: + ; Take care to preserve A until init_early ld sp, #kstack_top ; then zero the data area ld hl, #s__DATA @@ -68,6 +73,7 @@ start: or a sbc hl,de ld (_discard_size),hl + ; We pass A into init_eatly holding the mapper type call init_early call init_hardware push af -- 2.34.1