@@ -57,7 +57,8 @@ __LABEL0:
5757 DEFW 0002h
5858 DEFB 31h
5959 DEFB 30h
60- #line 1 "storestr.asm"
60+ ;; --- end of user code ---
61+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/storestr.asm"
6162; vim:ts=4:et:sw=4
6263 ; Stores value of current string pointed by DE register into address pointed by HL
6364 ; Returns DE = Address pointer (&a$)
@@ -68,8 +69,8 @@ __LABEL0:
6869 ;
6970 ; This function will resize (REALLOC) the space pointed by HL
7071 ; before copying the content of b$ into a$
71- #line 1 "strcpy.asm"
72- #line 1 "realloc.asm"
72+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ strcpy.asm"
73+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ realloc.asm"
7374; vim: ts=4:et:sw=4:
7475 ; Copyleft (K) by Jose M. Rodriguez de la Rosa
7576 ; (a.k.a. Boriel)
@@ -129,7 +130,7 @@ __LABEL0:
129130 ; HL = BLOCK Start & DE = Length.
130131 ; An init directive is useful for initialization routines.
131132 ; They will be added automatically if needed.
132- #line 1 "error.asm"
133+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ error.asm"
133134 ; Simple error control routines
134135; vim:ts=4:et:
135136 ERR_NR EQU 23610 ; Error code system variable
@@ -161,8 +162,8 @@ __ERROR_CODE:
161162__STOP:
162163 ld (ERR_NR) , a
163164 ret
164- #line 70 "realloc.asm"
165- #line 1 "alloc.asm"
165+ #line 70 "/zxbasic/src/arch/zx48k/library-asm/ realloc.asm"
166+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ alloc.asm"
166167; vim: ts=4:et:sw=4:
167168 ; Copyleft (K) by Jose M. Rodriguez de la Rosa
168169 ; (a.k.a. Boriel)
@@ -222,7 +223,7 @@ __STOP:
222223 ; HL = BLOCK Start & DE = Length.
223224 ; An init directive is useful for initialization routines.
224225 ; They will be added automatically if needed.
225- #line 1 "heapinit.asm"
226+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ heapinit.asm"
226227; vim: ts=4:et:sw=4:
227228 ; Copyleft (K) by Jose M. Rodriguez de la Rosa
228229 ; (a.k.a. Boriel)
@@ -327,7 +328,7 @@ __MEM_INIT2:
327328 ld (__MEM_INIT) , a ; "Pokes" with a RET so ensure this routine is not called again
328329 ret
329330 ENDP
330- #line 70 "alloc.asm"
331+ #line 70 "/zxbasic/src/arch/zx48k/library-asm/ alloc.asm"
331332 ; ---------------------------------------------------------------------
332333 ; MEM_ALLOC
333334 ; Allocates a block of memory in the heap.
@@ -357,9 +358,9 @@ __MEM_START:
357358__MEM_LOOP: ; Loads lengh at (HL, HL+). If Lenght >= BC, jump to __MEM_DONE
358359 ld a , h ; HL = NULL (No memory available?)
359360 or l
360- #line 111 "/zxbasic/arch/zx48k/library-asm/alloc.asm"
361+ #line 111 "/zxbasic/src/ arch/zx48k/library-asm/alloc.asm"
361362 ret z ; NULL
362- #line 113 "/zxbasic/arch/zx48k/library-asm/alloc.asm"
363+ #line 113 "/zxbasic/src/ arch/zx48k/library-asm/alloc.asm"
363364 ; HL = Pointer to Free block
364365 ld e , (hl)
365366 inc hl
@@ -423,8 +424,8 @@ __MEM_SUBTRACT:
423424 inc hl ; Return hl
424425 ret
425426 ENDP
426- #line 71 "realloc.asm"
427- #line 1 "free.asm"
427+ #line 71 "/zxbasic/src/arch/zx48k/library-asm/ realloc.asm"
428+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ free.asm"
428429; vim: ts=4:et:sw=4:
429430 ; Copyleft (K) by Jose M. Rodriguez de la Rosa
430431 ; (a.k.a. Boriel)
@@ -580,7 +581,7 @@ __MEM_BLOCK_JOIN: ; Joins current block (pointed by HL) with next one (pointed
580581 ld (hl) , d ; Next saved
581582 ret
582583 ENDP
583- #line 72 "realloc.asm"
584+ #line 72 "/zxbasic/src/arch/zx48k/library-asm/ realloc.asm"
584585 ; ---------------------------------------------------------------------
585586 ; MEM_REALLOC
586587 ; Reallocates a block of memory in the heap.
@@ -649,7 +650,7 @@ __REALLOC_END:
649650 dec hl ; To begin of block
650651 ret
651652 ENDP
652- #line 2 "strcpy.asm"
653+ #line 2 "/zxbasic/src/arch/zx48k/library-asm/ strcpy.asm"
653654 ; String library
654655__STRASSIGN: ; Performs a$ = b$ (HL = address of a$; DE = Address of b$)
655656 PROC
@@ -726,7 +727,7 @@ __NOTHING_TO_COPY:
726727 dec hl
727728 ret
728729 ENDP
729- #line 14 "storestr.asm"
730+ #line 14 "/zxbasic/src/arch/zx48k/library-asm/ storestr.asm"
730731__PISTORE_STR: ; Indirect assignement at (IX + BC)
731732 push ix
732733 pop hl
@@ -751,8 +752,8 @@ __STORE_STR:
751752 ld (hl) , d ; Stores a$ ptr into elemem ptr
752753 pop hl ; Returns ptr to b$ in HL (Caller might needed to free it from memory)
753754 ret
754- #line 32 "loadstr.bas"
755- #line 1 "storestr2.asm"
755+ #line 33 "loadstr.bas"
756+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ storestr2.asm"
756757 ; Similar to __STORE_STR, but this one is called when
757758 ; the value of B$ if already duplicated onto the stack.
758759 ; So we needn't call STRASSING to create a duplication
@@ -783,13 +784,13 @@ __STORE_STR2:
783784 ld (hl) , d
784785 dec hl ; HL points to mem address variable. This might be useful in the future.
785786 ret
786- #line 33 "loadstr.bas"
787- #line 1 "str.asm"
787+ #line 34 "loadstr.bas"
788+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ str.asm"
788789 ; The STR$( ) BASIC function implementation
789790 ; Given a FP number in C ED LH
790791 ; Returns a pointer (in HL) to the memory heap
791792 ; containing the FP number string representation
792- #line 1 "stackf.asm"
793+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ stackf.asm"
793794 ; -------------------------------------------------------------
794795 ; Functions to manage FP-Stack of the ZX Spectrum ROM CALC
795796 ; -------------------------------------------------------------
@@ -826,8 +827,8 @@ __FPSTACK_I16: ; Pushes 16 bits integer in HL into the FP ROM STACK
826827 xor a
827828 ld b , a
828829 jp __FPSTACK_PUSH
829- #line 9 "str.asm"
830- #line 1 "const.asm"
830+ #line 9 "/zxbasic/src/arch/zx48k/library-asm/ str.asm"
831+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ const.asm"
831832 ; Global constants
832833 P_FLAG EQU 23697
833834 FLAGS2 EQU 23681
@@ -836,7 +837,7 @@ __FPSTACK_I16: ; Pushes 16 bits integer in HL into the FP ROM STACK
836837 CHARS EQU 23606 ; Pointer to ROM/RAM Charset
837838 UDG EQU 23675 ; Pointer to UDG Charset
838839 MEM0 EQU 5C92h ; Temporary memory buffer used by ROM chars
839- #line 10 "str.asm"
840+ #line 10 "/zxbasic/src/arch/zx48k/library-asm/ str.asm"
840841__STR:
841842__STR_FAST:
842843 PROC
@@ -886,8 +887,8 @@ __STR_END:
886887 RECLAIM2 EQU 19E8h
887888 STK_END EQU 5C65h
888889 ENDP
889- #line 34 "loadstr.bas"
890- #line 1 "val.asm"
890+ #line 35 "loadstr.bas"
891+ #line 1 "/zxbasic/src/arch/zx48k/library-asm/ val.asm"
891892VAL: ; Computes VAL(a$) using ROM FP-CALC
892893 ; HL = address of a$
893894 ; Returns FP number in C ED LH registers
@@ -967,7 +968,7 @@ __VAL_EMPTY: ; Jumps here on empty string
967968 or a
968969 call nz , __MEM_FREE ; Frees "" string
969970__RET_ZERO: ; Returns 0 Floating point on error
970- ld a , ERROR_Ok
971+ ld a , ERROR_InvalidArg
971972 ld (ERR_NR) , a
972973 xor a
973974 ld b , a
@@ -976,5 +977,5 @@ __RET_ZERO: ; Returns 0 Floating point on error
976977 ld e , c
977978 ret
978979 ENDP
979- #line 35 "loadstr.bas"
980+ #line 36 "loadstr.bas"
980981 END
0 commit comments