@@ -46,9 +46,10 @@ _test:
4646 ld hl , 0
4747 push hl
4848 push hl
49+ push hl
4950 ld hl , .LABEL.__LABEL1
5051 push hl
51- ld hl , - 4
52+ ld hl , - 6
5253 ld de , .LABEL.__LABEL0
5354 ld bc , 3
5455 call .core.__ALLOC_INITIALIZED_LOCAL_ARRAY
5758_test__leave:
5859 ex af , af'
5960 exx
60- ld l , (ix - 2 )
61- ld h , (ix - 1 )
61+ ld l , (ix - 4 )
62+ ld h , (ix - 3 )
6263 call .core.__MEM_FREE
6364 ex af , af'
6465 exx
@@ -70,8 +71,8 @@ _test__leave:
7071 exx
7172 ret
7273 ;; --- end of user code ---
73- #line 1 "/zxbasic/src/arch/zx48k/library-asm /arrayalloc.asm"
74- #line 1 "/zxbasic/src/arch/zx48k/library-asm /calloc.asm"
74+ #line 1 "/zxbasic/src/lib/ arch/zx48k/runtime/array /arrayalloc.asm"
75+ #line 1 "/zxbasic/src/lib/ arch/zx48k/runtime /calloc.asm"
7576; vim: ts=4:et:sw=4:
7677 ; Copyleft (K) by Jose M. Rodriguez de la Rosa
7778 ; (a.k.a. Boriel)
@@ -82,7 +83,7 @@ _test__leave:
8283 ; closed source programs).
8384 ;
8485 ; Please read the MIT license on the internet
85- #line 1 "/zxbasic/src/arch/zx48k/library-asm /alloc.asm"
86+ #line 1 "/zxbasic/src/lib/ arch/zx48k/runtime /alloc.asm"
8687; vim: ts=4:et:sw=4:
8788 ; Copyleft (K) by Jose M. Rodriguez de la Rosa
8889 ; (a.k.a. Boriel)
@@ -142,7 +143,7 @@ _test__leave:
142143 ; HL = BLOCK Start & DE = Length.
143144 ; An init directive is useful for initialization routines.
144145 ; They will be added automatically if needed.
145- #line 1 "/zxbasic/src/arch/zx48k/library-asm /error.asm"
146+ #line 1 "/zxbasic/src/lib/ arch/zx48k/runtime /error.asm"
146147 ; Simple error control routines
147148; vim:ts=4:et:
148149 push namespace core
@@ -176,8 +177,8 @@ __STOP:
176177 ld (ERR_NR) , a
177178 ret
178179 pop namespace
179- #line 69 "/zxbasic/src/arch/zx48k/library-asm /alloc.asm"
180- #line 1 "/zxbasic/src/arch/zx48k/library-asm /heapinit.asm"
180+ #line 69 "/zxbasic/src/lib/ arch/zx48k/runtime /alloc.asm"
181+ #line 1 "/zxbasic/src/lib/ arch/zx48k/runtime /heapinit.asm"
181182; vim: ts=4:et:sw=4:
182183 ; Copyleft (K) by Jose M. Rodriguez de la Rosa
183184 ; (a.k.a. Boriel)
@@ -284,7 +285,7 @@ __MEM_INIT2:
284285 ret
285286 ENDP
286287 pop namespace
287- #line 70 "/zxbasic/src/arch/zx48k/library-asm /alloc.asm"
288+ #line 70 "/zxbasic/src/lib/ arch/zx48k/runtime /alloc.asm"
288289 ; ---------------------------------------------------------------------
289290 ; MEM_ALLOC
290291 ; Allocates a block of memory in the heap.
@@ -315,9 +316,9 @@ __MEM_START:
315316__MEM_LOOP: ; Loads lengh at (HL, HL+). If Lenght >= BC, jump to __MEM_DONE
316317 ld a , h ; HL = NULL (No memory available?)
317318 or l
318- #line 113 "/zxbasic/src/arch/zx48k/library-asm /alloc.asm"
319+ #line 113 "/zxbasic/src/lib/ arch/zx48k/runtime /alloc.asm"
319320 ret z ; NULL
320- #line 115 "/zxbasic/src/arch/zx48k/library-asm /alloc.asm"
321+ #line 115 "/zxbasic/src/lib/ arch/zx48k/runtime /alloc.asm"
321322 ; HL = Pointer to Free block
322323 ld e , (hl)
323324 inc hl
@@ -382,7 +383,7 @@ __MEM_SUBTRACT:
382383 ret
383384 ENDP
384385 pop namespace
385- #line 13 "/zxbasic/src/arch/zx48k/library-asm /calloc.asm"
386+ #line 13 "/zxbasic/src/lib/ arch/zx48k/runtime /calloc.asm"
386387 ; ---------------------------------------------------------------------
387388 ; MEM_CALLOC
388389 ; Allocates a block of memory in the heap, and clears it filling it
@@ -416,7 +417,7 @@ __MEM_CALLOC:
416417 pop hl
417418 ret
418419 pop namespace
419- #line 3 "/zxbasic/src/arch/zx48k/library-asm /arrayalloc.asm"
420+ #line 3 "/zxbasic/src/lib/ arch/zx48k/runtime/array /arrayalloc.asm"
420421 ; ---------------------------------------------------------------------
421422 ; __ALLOC_LOCAL_ARRAY
422423 ; Allocates an array element area in the heap, and clears it filling it
@@ -452,7 +453,7 @@ __ALLOC_LOCAL_ARRAY:
452453 ; ---------------------------------------------------------------------
453454 ; __ALLOC_INITIALIZED_LOCAL_ARRAY
454455 ; Allocates an array element area in the heap, and clears it filling it
455- ; with 0 bytes
456+ ; with data whose pointer (PTR) is in the stack
456457 ;
457458 ; Parameters
458459 ; HL = Offset to be added to IX => HL = IX + HL
@@ -480,10 +481,10 @@ __ALLOC_INITIALIZED_LOCAL_ARRAY:
480481 ldir
481482 pop hl ; HL = addr of LBound area if used
482483 ret
483- #line 139 "/zxbasic/src/arch/zx48k/library-asm /arrayalloc.asm"
484+ #line 142 "/zxbasic/src/lib/ arch/zx48k/runtime/array /arrayalloc.asm"
484485 pop namespace
485- #line 47 " 40.bas"
486- #line 1 "/zxbasic/src/arch/zx48k/library-asm /free.asm"
486+ #line 48 "arch/zx48k/ 40.bas"
487+ #line 1 "/zxbasic/src/lib/ arch/zx48k/runtime /free.asm"
487488; vim: ts=4:et:sw=4:
488489 ; Copyleft (K) by Jose M. Rodriguez de la Rosa
489490 ; (a.k.a. Boriel)
@@ -641,9 +642,9 @@ __MEM_BLOCK_JOIN: ; Joins current block (pointed by HL) with next one (pointed
641642 ret
642643 ENDP
643644 pop namespace
644- #line 48 " 40.bas"
645- #line 1 "/zxbasic/src/arch/zx48k/library-asm /u32tofreg.asm"
646- #line 1 "/zxbasic/src/arch/zx48k/library-asm /neg32.asm"
645+ #line 49 "arch/zx48k/ 40.bas"
646+ #line 1 "/zxbasic/src/lib/ arch/zx48k/runtime /u32tofreg.asm"
647+ #line 1 "/zxbasic/src/lib/ arch/zx48k/runtime /neg32.asm"
647648 push namespace core
648649__ABS32:
649650 bit 7 , d
@@ -668,7 +669,7 @@ __NEG32: ; Negates DEHL (Two's complement)
668669 inc de
669670 ret
670671 pop namespace
671- #line 2 "/zxbasic/src/arch/zx48k/library-asm /u32tofreg.asm"
672+ #line 2 "/zxbasic/src/lib/ arch/zx48k/runtime /u32tofreg.asm"
672673 push namespace core
673674__I8TOFREG:
674675 ld l , a
@@ -738,7 +739,7 @@ __U32TOFREG_END:
738739 ret
739740 ENDP
740741 pop namespace
741- #line 49 " 40.bas"
742+ #line 50 "arch/zx48k/ 40.bas"
742743.LABEL.__LABEL0:
743744 DEFB 00h
744745 DEFB 00h
0 commit comments