File tree Expand file tree Collapse file tree 1 file changed +14
-13
lines changed
Expand file tree Collapse file tree 1 file changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -90,10 +90,6 @@ disable_relocations
9090 call ti.MemClear
9191 pop bc
9292
93- ld a , (iy + LIB_FLAGS)
94- ld (flag_save) , a
95- ld (ix_save) , ix ; save IX since older ICE programs don't
96-
9793 ld hl , $ AA55AA
9894 xor a , a
9995 sbc hl , bc
@@ -117,19 +113,11 @@ disable_relocations
117113
118114 ld (error_sp) , sp
119115
120- ld (iy + LIB_FLAGS) , c ; C is zero here
121- ; res is_dep, (iy + LIB_FLAGS)
122- ; res optional, (iy + LIB_FLAGS)
123-
124116 ld a , (hl)
125117 cp a , REQ_LIB_MARKER
126118 jr z , start
127- set optional , (iy + LIB_FLAGS)
128119 cp a , OPT_LIB_MARKER
129- jr z , start
130- ld a , (flag_save)
131- ld (iy + LIB_FLAGS) , a ; restore flag bits
132- ld ix , (ix_save) ; restore IX register
120+ jr z , start_optional
133121 jp (hl) ; return to execution if there are no libs
134122
135123macro relocate? name , address *
@@ -187,7 +175,20 @@ macro rload? name
187175 dl name - $ - 3
188176end macro
189177
178+ start_optional:
179+ ; set optional, (iy + LIB_FLAGS)
180+ ld c , 1 shl optional
190181start:
182+ ld (ix_save) , ix ; save IX since older ICE programs don't
183+
184+ ld a , (iy + LIB_FLAGS)
185+ ld (flag_save) , a
186+ ; initialize LIB_FLAGS
187+ ; REQ_LIB_MARKER --> C = 0
188+ ; OPT_LIB_MARKER --> C = (1 << optional)
189+ ld (iy + LIB_FLAGS) , c
190+ ; res is_dep, (iy + LIB_FLAGS)
191+
191192 push hl
192193 call ti.PushOP1 ; save calling program name
193194 pop hl
You can’t perform that action at this time.
0 commit comments