From 3c29dbcb76e99a608f1c624c850d5291eb338150 Mon Sep 17 00:00:00 2001 From: pjht Date: Sun, 5 Feb 2023 11:05:59 -0600 Subject: [PATCH] Fix initrd_fs not saving mailbox number until initialization complete --- initrd_fs.z80 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/initrd_fs.z80 b/initrd_fs.z80 index 79f4c61..96dfd12 100644 --- a/initrd_fs.z80 +++ b/initrd_fs.z80 @@ -1,7 +1,7 @@ .global _start _start: call get_free_mailbox ; Get a mailbox -push hl +ld (mailbox_num), hl ld de, 1 call get_free_frame ; Set up a frame to send messages at 0x8000 ld b, c @@ -81,8 +81,6 @@ adc a, 0 ld c, a jp initrd_read_loop call proc_map_set ; Register ourselves as ID 1 -pop hl -ld (mailbox_num), hl msg_loop: call yield ld hl, (mailbox_num)