@@ -81,7 +81,8 @@ _test__leave:
8181__LABEL0:
8282 DEFW 0001h
8383 DEFB 35h
84- #line 1 "free.asm"
84+ ;; --- end of user code ---
85+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/free.asm"
8586; vim: ts=4:et:sw=4:
8687 ; Copyleft (K) by Jose M. Rodriguez de la Rosa
8788 ; (a.k.a. Boriel)
@@ -141,7 +142,7 @@ __LABEL0:
141142 ; HL = BLOCK Start & DE = Length.
142143 ; An init directive is useful for initialization routines.
143144 ; They will be added automatically if needed.
144- #line 1 "heapinit.asm"
145+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ heapinit.asm"
145146; vim: ts=4:et:sw=4:
146147 ; Copyleft (K) by Jose M. Rodriguez de la Rosa
147148 ; (a.k.a. Boriel)
@@ -246,7 +247,7 @@ __MEM_INIT2:
246247 ld (__MEM_INIT) , a ; "Pokes" with a RET so ensure this routine is not called again
247248 ret
248249 ENDP
249- #line 69 "free.asm"
250+ #line 69 "/zxbasic/src/arch/zx48k/library-asm/ free.asm"
250251 ; ---------------------------------------------------------------------
251252 ; MEM_FREE
252253 ; Frees a block of memory
@@ -343,9 +344,9 @@ __MEM_BLOCK_JOIN: ; Joins current block (pointed by HL) with next one (pointed
343344 ld (hl) , d ; Next saved
344345 ret
345346 ENDP
346- #line 58 "valcrash1.bas"
347- #line 1 "loadstr.asm"
348- #line 1 "alloc.asm"
347+ #line 59 "valcrash1.bas"
348+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ loadstr.asm"
349+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ alloc.asm"
349350; vim: ts=4:et:sw=4:
350351 ; Copyleft (K) by Jose M. Rodriguez de la Rosa
351352 ; (a.k.a. Boriel)
@@ -405,7 +406,7 @@ __MEM_BLOCK_JOIN: ; Joins current block (pointed by HL) with next one (pointed
405406 ; HL = BLOCK Start & DE = Length.
406407 ; An init directive is useful for initialization routines.
407408 ; They will be added automatically if needed.
408- #line 1 "error.asm"
409+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ error.asm"
409410 ; Simple error control routines
410411; vim:ts=4:et:
411412 ERR_NR EQU 23610 ; Error code system variable
@@ -437,7 +438,7 @@ __ERROR_CODE:
437438__STOP:
438439 ld (ERR_NR) , a
439440 ret
440- #line 69 "alloc.asm"
441+ #line 69 "/zxbasic/src/arch/zx48k/library-asm/ alloc.asm"
441442 ; ---------------------------------------------------------------------
442443 ; MEM_ALLOC
443444 ; Allocates a block of memory in the heap.
@@ -467,9 +468,9 @@ __MEM_START:
467468__MEM_LOOP: ; Loads lengh at (HL, HL+). If Lenght >= BC, jump to __MEM_DONE
468469 ld a , h ; HL = NULL (No memory available?)
469470 or l
470- #line 111 "/zxbasic/arch/zx48k/library-asm/alloc.asm"
471+ #line 111 "/zxbasic/src/ arch/zx48k/library-asm/alloc.asm"
471472 ret z ; NULL
472- #line 113 "/zxbasic/arch/zx48k/library-asm/alloc.asm"
473+ #line 113 "/zxbasic/src/ arch/zx48k/library-asm/alloc.asm"
473474 ; HL = Pointer to Free block
474475 ld e , (hl)
475476 inc hl
@@ -533,7 +534,7 @@ __MEM_SUBTRACT:
533534 inc hl ; Return hl
534535 ret
535536 ENDP
536- #line 2 "loadstr.asm"
537+ #line 2 "/zxbasic/src/arch/zx48k/library-asm/ loadstr.asm"
537538 ; Loads a string (ptr) from HL
538539 ; and duplicates it on dynamic memory again
539540 ; Finally, it returns result pointer in HL
@@ -568,13 +569,13 @@ __LOADSTR: ; __FASTCALL__ entry
568569 ldir ; Copies string (length number included)
569570 pop hl ; Recovers destiny in hl as result
570571 ret
571- #line 59 "valcrash1.bas"
572- #line 1 "pstoref.asm"
572+ #line 60 "valcrash1.bas"
573+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ pstoref.asm"
573574 ; Stores FP number in A ED CB at location HL+IX
574575 ; HL = Offset
575576 ; IX = Stack Frame
576577 ; A ED CB = FP Number
577- #line 1 "storef.asm"
578+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ storef.asm"
578579__PISTOREF: ; Indect Stores a float (A, E, D, C, B) at location stored in memory, pointed by (IX + HL)
579580 push de
580581 ex de , hl ; DE <- HL
@@ -600,7 +601,7 @@ __STOREF: ; Stores the given FP number in A EDCB at address HL
600601 inc hl
601602 ld (hl) , b
602603 ret
603- #line 7 "pstoref.asm"
604+ #line 7 "/zxbasic/src/arch/zx48k/library-asm/ pstoref.asm"
604605 ; Stored a float number in A ED CB into the address pointed by IX + HL
605606__PSTOREF:
606607 push de
@@ -610,8 +611,8 @@ __PSTOREF:
610611 add hl , de ; HL <- IX + DE
611612 pop de
612613 jp __STOREF
613- #line 60 "valcrash1.bas"
614- #line 1 "storestr.asm"
614+ #line 61 "valcrash1.bas"
615+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ storestr.asm"
615616; vim:ts=4:et:sw=4
616617 ; Stores value of current string pointed by DE register into address pointed by HL
617618 ; Returns DE = Address pointer (&a$)
@@ -622,8 +623,8 @@ __PSTOREF:
622623 ;
623624 ; This function will resize (REALLOC) the space pointed by HL
624625 ; before copying the content of b$ into a$
625- #line 1 "strcpy.asm"
626- #line 1 "realloc.asm"
626+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ strcpy.asm"
627+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ realloc.asm"
627628; vim: ts=4:et:sw=4:
628629 ; Copyleft (K) by Jose M. Rodriguez de la Rosa
629630 ; (a.k.a. Boriel)
@@ -751,7 +752,7 @@ __REALLOC_END:
751752 dec hl ; To begin of block
752753 ret
753754 ENDP
754- #line 2 "strcpy.asm"
755+ #line 2 "/zxbasic/src/arch/zx48k/library-asm/ strcpy.asm"
755756 ; String library
756757__STRASSIGN: ; Performs a$ = b$ (HL = address of a$; DE = Address of b$)
757758 PROC
@@ -828,7 +829,7 @@ __NOTHING_TO_COPY:
828829 dec hl
829830 ret
830831 ENDP
831- #line 14 "storestr.asm"
832+ #line 14 "/zxbasic/src/arch/zx48k/library-asm/ storestr.asm"
832833__PISTORE_STR: ; Indirect assignement at (IX + BC)
833834 push ix
834835 pop hl
@@ -853,9 +854,9 @@ __STORE_STR:
853854 ld (hl) , d ; Stores a$ ptr into elemem ptr
854855 pop hl ; Returns ptr to b$ in HL (Caller might needed to free it from memory)
855856 ret
856- #line 61 "valcrash1.bas"
857- #line 1 "val.asm"
858- #line 1 "stackf.asm"
857+ #line 62 "valcrash1.bas"
858+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ val.asm"
859+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ stackf.asm"
859860 ; -------------------------------------------------------------
860861 ; Functions to manage FP-Stack of the ZX Spectrum ROM CALC
861862 ; -------------------------------------------------------------
@@ -892,7 +893,7 @@ __FPSTACK_I16: ; Pushes 16 bits integer in HL into the FP ROM STACK
892893 xor a
893894 ld b , a
894895 jp __FPSTACK_PUSH
895- #line 3 "val.asm"
896+ #line 3 "/zxbasic/src/arch/zx48k/library-asm/ val.asm"
896897VAL: ; Computes VAL(a$) using ROM FP-CALC
897898 ; HL = address of a$
898899 ; Returns FP number in C ED LH registers
@@ -972,7 +973,7 @@ __VAL_EMPTY: ; Jumps here on empty string
972973 or a
973974 call nz , __MEM_FREE ; Frees "" string
974975__RET_ZERO: ; Returns 0 Floating point on error
975- ld a , ERROR_Ok
976+ ld a , ERROR_InvalidArg
976977 ld (ERR_NR) , a
977978 xor a
978979 ld b , a
@@ -981,5 +982,5 @@ __RET_ZERO: ; Returns 0 Floating point on error
981982 ld e , c
982983 ret
983984 ENDP
984- #line 62 "valcrash1.bas"
985+ #line 63 "valcrash1.bas"
985986 END
0 commit comments