Skip to content

Commit c1fefff

Browse files
committed
Update tests
This reflect new changes in the preprocessor. Mainly the removal of useless spaces
1 parent 0085203 commit c1fefff

14 files changed

Lines changed: 845 additions & 845 deletions

tests/functional/arrbase1.asm

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ __CALL_BACK__:
8686
__DATA__0:
8787
__DATA__END:
8888
DEFB 00h
89-
#line 1 "array.asm"
89+
#line 1 "/zxbasic/src/arch/zx48k/library-asm/array.asm"
9090
; vim: ts=4:et:sw=4:
9191
; Copyleft (K) by Jose M. Rodriguez de la Rosa
9292
; (a.k.a. Boriel)
@@ -102,7 +102,7 @@ __DATA__END:
102102
; O = [a0 + b0 * (a1 + b1 * (a2 + ... bN-2(aN-1)))]
103103
; What I will do here is to calculate the following sequence:
104104
; ((aN-1 * bN-2) + aN-2) * bN-3 + ...
105-
#line 1 "mul16.asm"
105+
#line 1 "/zxbasic/src/arch/zx48k/library-asm/mul16.asm"
106106
__MUL16: ; Mutiplies HL with the last value stored into de stack
107107
; Works for both signed and unsigned
108108
PROC
@@ -126,8 +126,8 @@ __MUL16NOADD:
126126
djnz __MUL16LOOP
127127
ret ; Result in hl (16 lower bits)
128128
ENDP
129-
#line 20 "array.asm"
130-
#line 24 "/zxbasic/arch/zx48k/library-asm/array.asm"
129+
#line 20 "/zxbasic/src/arch/zx48k/library-asm/array.asm"
130+
#line 24 "/zxbasic/src/arch/zx48k/library-asm/array.asm"
131131
__ARRAY_PTR: ;; computes an array offset from a pointer
132132
ld c, (hl)
133133
inc hl
@@ -156,9 +156,9 @@ __ARRAY:
156156
exx
157157
ld hl, 0 ; HL = Offset "accumulator"
158158
LOOP:
159-
#line 62 "/zxbasic/arch/zx48k/library-asm/array.asm"
159+
#line 62 "/zxbasic/src/arch/zx48k/library-asm/array.asm"
160160
pop bc ; Get next index (Ai) from the stack
161-
#line 72 "/zxbasic/arch/zx48k/library-asm/array.asm"
161+
#line 72 "/zxbasic/src/arch/zx48k/library-asm/array.asm"
162162
add hl, bc ; Adds current index
163163
exx ; Checks if B'C' = 0
164164
ld a, b ; Which means we must exit (last element is not multiplied by anything)
@@ -177,15 +177,15 @@ LOOP:
177177
ARRAY_END:
178178
ld a, (hl)
179179
exx
180-
#line 101 "/zxbasic/arch/zx48k/library-asm/array.asm"
180+
#line 101 "/zxbasic/src/arch/zx48k/library-asm/array.asm"
181181
LOCAL ARRAY_SIZE_LOOP
182182
ex de, hl
183183
ld hl, 0
184184
ld b, a
185185
ARRAY_SIZE_LOOP:
186186
add hl, de
187187
djnz ARRAY_SIZE_LOOP
188-
#line 111 "/zxbasic/arch/zx48k/library-asm/array.asm"
188+
#line 111 "/zxbasic/src/arch/zx48k/library-asm/array.asm"
189189
ex de, hl
190190
ld hl, (TMP_ARR_PTR)
191191
ld a, (hl)
@@ -215,7 +215,7 @@ TMP_ARR_PTR:
215215
DW 0 ; temporary storage for pointer to tables
216216
ENDP
217217
#line 48 "arrbase1.bas"
218-
#line 1 "read_restore.asm"
218+
#line 1 "/zxbasic/src/arch/zx48k/library-asm/read_restore.asm"
219219
;; This implements READ & RESTORE functions
220220
;; Reads a new element from the DATA Address code
221221
;; Updates the DATA_ADDR read ptr for the next read
@@ -233,7 +233,7 @@ TMP_ARR_PTR:
233233
;; 09: Float
234234
;; bit7 is set for a parameter-less function
235235
;; In that case, the next two bytes are the ptr of the function to jump
236-
#line 1 "error.asm"
236+
#line 1 "/zxbasic/src/arch/zx48k/library-asm/error.asm"
237237
; Simple error control routines
238238
; vim:ts=4:et:
239239
ERR_NR EQU 23610 ; Error code system variable
@@ -265,9 +265,9 @@ __ERROR_CODE:
265265
__STOP:
266266
ld (ERR_NR), a
267267
ret
268-
#line 23 "read_restore.asm"
269-
#line 1 "loadstr.asm"
270-
#line 1 "alloc.asm"
268+
#line 23 "/zxbasic/src/arch/zx48k/library-asm/read_restore.asm"
269+
#line 1 "/zxbasic/src/arch/zx48k/library-asm/loadstr.asm"
270+
#line 1 "/zxbasic/src/arch/zx48k/library-asm/alloc.asm"
271271
; vim: ts=4:et:sw=4:
272272
; Copyleft (K) by Jose M. Rodriguez de la Rosa
273273
; (a.k.a. Boriel)
@@ -327,7 +327,7 @@ __STOP:
327327
; HL = BLOCK Start & DE = Length.
328328
; An init directive is useful for initialization routines.
329329
; They will be added automatically if needed.
330-
#line 1 "heapinit.asm"
330+
#line 1 "/zxbasic/src/arch/zx48k/library-asm/heapinit.asm"
331331
; vim: ts=4:et:sw=4:
332332
; Copyleft (K) by Jose M. Rodriguez de la Rosa
333333
; (a.k.a. Boriel)
@@ -432,7 +432,7 @@ __MEM_INIT2:
432432
ld (__MEM_INIT), a; "Pokes" with a RET so ensure this routine is not called again
433433
ret
434434
ENDP
435-
#line 70 "alloc.asm"
435+
#line 70 "/zxbasic/src/arch/zx48k/library-asm/alloc.asm"
436436
; ---------------------------------------------------------------------
437437
; MEM_ALLOC
438438
; Allocates a block of memory in the heap.
@@ -462,9 +462,9 @@ __MEM_START:
462462
__MEM_LOOP: ; Loads lengh at (HL, HL+). If Lenght >= BC, jump to __MEM_DONE
463463
ld a, h ; HL = NULL (No memory available?)
464464
or l
465-
#line 111 "/zxbasic/arch/zx48k/library-asm/alloc.asm"
465+
#line 111 "/zxbasic/src/arch/zx48k/library-asm/alloc.asm"
466466
ret z ; NULL
467-
#line 113 "/zxbasic/arch/zx48k/library-asm/alloc.asm"
467+
#line 113 "/zxbasic/src/arch/zx48k/library-asm/alloc.asm"
468468
; HL = Pointer to Free block
469469
ld e, (hl)
470470
inc hl
@@ -528,7 +528,7 @@ __MEM_SUBTRACT:
528528
inc hl ; Return hl
529529
ret
530530
ENDP
531-
#line 2 "loadstr.asm"
531+
#line 2 "/zxbasic/src/arch/zx48k/library-asm/loadstr.asm"
532532
; Loads a string (ptr) from HL
533533
; and duplicates it on dynamic memory again
534534
; Finally, it returns result pointer in HL
@@ -563,8 +563,8 @@ __LOADSTR: ; __FASTCALL__ entry
563563
ldir ; Copies string (length number included)
564564
pop hl ; Recovers destiny in hl as result
565565
ret
566-
#line 24 "read_restore.asm"
567-
#line 1 "iload32.asm"
566+
#line 24 "/zxbasic/src/arch/zx48k/library-asm/read_restore.asm"
567+
#line 1 "/zxbasic/src/arch/zx48k/library-asm/iload32.asm"
568568
; __FASTCALL__ routine which
569569
; loads a 32 bits integer into DE,HL
570570
; stored at position pointed by POINTER HL
@@ -580,8 +580,8 @@ __ILOAD32:
580580
ld l, a
581581
ex de, hl
582582
ret
583-
#line 25 "read_restore.asm"
584-
#line 1 "iloadf.asm"
583+
#line 25 "/zxbasic/src/arch/zx48k/library-asm/read_restore.asm"
584+
#line 1 "/zxbasic/src/arch/zx48k/library-asm/iloadf.asm"
585585
; __FASTCALL__ routine which
586586
; loads a 40 bits floating point into A ED CB
587587
; stored at position pointed by POINTER HL
@@ -606,10 +606,10 @@ __LOADF: ; Loads a 40 bits FP number from address pointed by HL
606606
inc hl
607607
ld b, (hl)
608608
ret
609-
#line 26 "read_restore.asm"
610-
#line 1 "ftof16reg.asm"
611-
#line 1 "ftou32reg.asm"
612-
#line 1 "neg32.asm"
609+
#line 26 "/zxbasic/src/arch/zx48k/library-asm/read_restore.asm"
610+
#line 1 "/zxbasic/src/arch/zx48k/library-asm/ftof16reg.asm"
611+
#line 1 "/zxbasic/src/arch/zx48k/library-asm/ftou32reg.asm"
612+
#line 1 "/zxbasic/src/arch/zx48k/library-asm/neg32.asm"
613613
__ABS32:
614614
bit 7, d
615615
ret z
@@ -632,7 +632,7 @@ __NEG32: ; Negates DEHL (Two's complement)
632632
ret nz
633633
inc de
634634
ret
635-
#line 2 "ftou32reg.asm"
635+
#line 2 "/zxbasic/src/arch/zx48k/library-asm/ftou32reg.asm"
636636
__FTOU32REG: ; Converts a Float to (un)signed 32 bit integer (NOTE: It's ALWAYS 32 bit signed)
637637
; Input FP number in A EDCB (A exponent, EDCB mantissa)
638638
; Output: DEHL 32 bit number (signed)
@@ -705,7 +705,7 @@ __FTOU8: ; Converts float in C ED LH to Unsigned byte in A
705705
call __FTOU32REG
706706
ld a, l
707707
ret
708-
#line 2 "ftof16reg.asm"
708+
#line 2 "/zxbasic/src/arch/zx48k/library-asm/ftof16reg.asm"
709709
__FTOF16REG: ; Converts a Float to 16.16 (32 bit) fixed point decimal
710710
; Input FP number in A EDCB (A exponent, EDCB mantissa)
711711
ld l, a ; Saves exponent for later
@@ -734,9 +734,9 @@ __FTOF16REG: ; Converts a Float to 16.16 (32 bit) fixed point decimal
734734
jp c, __FTOU32REG_END ; It was decimal (0.xxx). We are done (return 0)
735735
ld b, a ; Loop counter = exponent - 128 + 16 (we need to shift 16 bit more)
736736
jp __FTOU32REG_LOOP ; proceed as an u32 integer
737-
#line 27 "read_restore.asm"
738-
#line 1 "f16tofreg.asm"
739-
#line 1 "u32tofreg.asm"
737+
#line 27 "/zxbasic/src/arch/zx48k/library-asm/read_restore.asm"
738+
#line 1 "/zxbasic/src/arch/zx48k/library-asm/f16tofreg.asm"
739+
#line 1 "/zxbasic/src/arch/zx48k/library-asm/u32tofreg.asm"
740740
__I8TOFREG:
741741
ld l, a
742742
rlca
@@ -804,7 +804,7 @@ __U32TOFREG_END:
804804
res 7, e ; Sets the sign bit to 0 (positive)
805805
ret
806806
ENDP
807-
#line 3 "f16tofreg.asm"
807+
#line 3 "/zxbasic/src/arch/zx48k/library-asm/f16tofreg.asm"
808808
__F16TOFREG: ; Converts a 16.16 signed fixed point (stored in DEHL)
809809
; to a Floating Point Number returned in (C ED CB)
810810
PROC
@@ -837,8 +837,8 @@ __F16TOFREG2: ; Converts an unsigned 32 bit integer (DEHL)
837837
ld e, c
838838
jp __U32TOFREG_LOOP ; Proceed as an integer
839839
ENDP
840-
#line 28 "read_restore.asm"
841-
#line 1 "free.asm"
840+
#line 28 "/zxbasic/src/arch/zx48k/library-asm/read_restore.asm"
841+
#line 1 "/zxbasic/src/arch/zx48k/library-asm/free.asm"
842842
; vim: ts=4:et:sw=4:
843843
; Copyleft (K) by Jose M. Rodriguez de la Rosa
844844
; (a.k.a. Boriel)
@@ -994,7 +994,7 @@ __MEM_BLOCK_JOIN: ; Joins current block (pointed by HL) with next one (pointed
994994
ld (hl), d ; Next saved
995995
ret
996996
ENDP
997-
#line 29 "read_restore.asm"
997+
#line 29 "/zxbasic/src/arch/zx48k/library-asm/read_restore.asm"
998998
;; Updates restore point to the given HL mem. address
999999
__RESTORE:
10001000
PROC
@@ -1067,7 +1067,7 @@ dynamic_cast3:
10671067
jr c, dynamic_cast4
10681068
;; here the user expected type is "larger" than the read one
10691069
ld a, b
1070-
sub 2
1070+
sub 2
10711071
add a, a
10721072
ld l, a
10731073
ld h, 0
@@ -1272,4 +1272,4 @@ __DATA_ADDR: ;; Stores current DATA ptr
12721272
dw __DATA__0
12731273
ENDP
12741274
#line 49 "arrbase1.bas"
1275-
END
1275+
END

0 commit comments

Comments
 (0)