Fix initrd_fs not saving mailbox number until initialization complete

This commit is contained in:
pjht 2023-02-05 11:05:59 -06:00
parent 6c9c9349b6
commit 3c29dbcb76
Signed by: pjht
GPG Key ID: 7B5F6AFBEC7EE78E

View File

@ -1,7 +1,7 @@
.global _start .global _start
_start: _start:
call get_free_mailbox ; Get a mailbox call get_free_mailbox ; Get a mailbox
push hl ld (mailbox_num), hl
ld de, 1 ld de, 1
call get_free_frame ; Set up a frame to send messages at 0x8000 call get_free_frame ; Set up a frame to send messages at 0x8000
ld b, c ld b, c
@ -81,8 +81,6 @@ adc a, 0
ld c, a ld c, a
jp initrd_read_loop jp initrd_read_loop
call proc_map_set ; Register ourselves as ID 1 call proc_map_set ; Register ourselves as ID 1
pop hl
ld (mailbox_num), hl
msg_loop: msg_loop:
call yield call yield
ld hl, (mailbox_num) ld hl, (mailbox_num)