Skip to content

Commit 7292468

Browse files
committed
combined two nearby rjumps
1 parent e3c6850 commit 7292468

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

src/libload/libload.asm

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -538,10 +538,7 @@ check_for_lib_marker:
538538
jr z, goto_load_lib
539539
set optional, (iy + LIB_FLAGS)
540540
cp a, OPT_LIB_MARKER
541-
jr nz, check_has_deps
542-
goto_load_lib:
543-
rjump load_lib ; load the next library
544-
541+
jr z, goto_load_lib ; load the next library
545542
check_has_deps: ; the first time we hit this, we have all the dependencies placed onto the queue that the libraries use.
546543
res optional, (iy + LIB_FLAGS)
547544
bit is_dep, (iy + LIB_FLAGS)
@@ -555,15 +552,16 @@ load_next_dep:
555552
sbc hl, de ; make sure we are done parsing the dependency queue
556553
add hl, de
557554
; now we need to parse the libraries like they are programs. this will be fun.
558-
jr z, .exit
555+
jr z, start_execution
559556
dec hl
560557
dec hl
561558
dec hl ; hl->dependency ($C0, "LIBNAME", 0, VERSION, JUMP_TABLE)
562559
ld (end_dep_queue), hl
563560
ld hl, (hl) ; valid pointer to $C0 (REQ_LIB_MARKER)
561+
goto_load_lib:
564562
rjump load_lib ; load current dependency if needed, or resolve entry points
565563

566-
.exit:
564+
start_execution:
567565
call ti.PopOP1 ; restore program name
568566
ld hl, (prgm_start)
569567
ld ix, (ix_save) ; restore IX register

0 commit comments

Comments
 (0)