@@ -95,7 +95,7 @@ __MUL16NOADD:
9595
9696#line 20 "array.asm"
9797
98- #line 24 "/zxbasic/library-asm/array.asm"
98+ #line 24 "/home/boriel/src/zxbasic/ zxbasic/library-asm/array.asm"
9999
100100__ARRAY:
101101 PROC
@@ -115,13 +115,13 @@ __ARRAY:
115115 inc hl ; Ready
116116 exx
117117
118- ld hl , 0 ; BC = Offset "accumulator"
118+ ld hl , 0 ; HL = Offset "accumulator"
119119
120120LOOP :
121- #line 49 "/zxbasic/library-asm/array.asm"
121+ #line 49 "/home/boriel/src/zxbasic/ zxbasic/library-asm/array.asm"
122122 pop bc ; Get next index (Ai) from the stack
123123
124- #line 59 "/zxbasic/library-asm/array.asm"
124+ #line 59 "/home/boriel/src/zxbasic/ zxbasic/library-asm/array.asm"
125125
126126 add hl , bc ; Adds current index
127127
@@ -143,25 +143,22 @@ LOOP:
143143 jp LOOP
144144
145145ARRAY_END:
146- ld e , (hl)
146+ ld a , (hl)
147147 inc hl
148- ld d , c ; C = 0 => DE = E = Element size
149148 push hl
150- push de
151149 exx
152150
153- #line 91 " /zxbasic/library-asm/array.asm"
151+ #line 90 "/home/boriel/src/zxbasic /zxbasic/library-asm/array.asm"
154152 LOCAL ARRAY_SIZE_LOOP
155153
156154 ex de , hl
157155 ld hl , 0
158- pop bc
159- ld b , c
156+ ld b , a
160157ARRAY_SIZE_LOOP:
161158 add hl , de
162159 djnz ARRAY_SIZE_LOOP
163160
164- #line 102 " /zxbasic/library-asm/array.asm"
161+ #line 100 "/home/boriel/src/zxbasic /zxbasic/library-asm/array.asm"
165162
166163 pop de
167164 add hl , de ; Adds element start
@@ -174,8 +171,10 @@ RET_ADDRESS:
174171
175172__FNMUL:
176173 xor a
177- or d
174+ or h
178175 jp nz , __MUL16_FAST
176+ or l
177+ ret z
179178
180179 cp 33
181180 jp nc , __MUL16_FAST
@@ -470,9 +469,9 @@ __MEM_START:
470469__MEM_LOOP: ; Loads lengh at (HL, HL+). If Lenght >= BC, jump to __MEM_DONE
471470 ld a , h ; HL = NULL (No memory available?)
472471 or l
473- #line 111 "/zxbasic/library-asm/alloc.asm"
472+ #line 111 "/home/boriel/src/zxbasic/ zxbasic/library-asm/alloc.asm"
474473 ret z ; NULL
475- #line 113 "/zxbasic/library-asm/alloc.asm"
474+ #line 113 "/home/boriel/src/zxbasic/ zxbasic/library-asm/alloc.asm"
476475 ; HL = Pointer to Free block
477476 ld e , (hl)
478477 inc hl
0 commit comments