Skip to content

Commit 0d5dcdd

Browse files
committed
tests: update test
1 parent a0a6a31 commit 0d5dcdd

74 files changed

Lines changed: 1647 additions & 1439 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

tests/functional/arch/zx48k/40.asm

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -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
@@ -57,8 +58,8 @@ _test:
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

tests/functional/arch/zx48k/42.asm

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,23 @@ _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
55-
ld l, (ix-2)
56-
ld h, (ix-1)
56+
ld l, (ix-4)
57+
ld h, (ix-3)
5758
inc hl
5859
ld a, (hl)
5960
ld (ix+5), a
6061
_test__leave:
6162
ex af, af'
6263
exx
63-
ld l, (ix-2)
64-
ld h, (ix-1)
64+
ld l, (ix-4)
65+
ld h, (ix-3)
6566
call .core.__MEM_FREE
6667
ex af, af'
6768
exx
@@ -73,8 +74,8 @@ _test__leave:
7374
exx
7475
ret
7576
;; --- end of user code ---
76-
#line 1 "/zxbasic/src/arch/zx48k/library-asm/arrayalloc.asm"
77-
#line 1 "/zxbasic/src/arch/zx48k/library-asm/calloc.asm"
77+
#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/array/arrayalloc.asm"
78+
#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/calloc.asm"
7879
; vim: ts=4:et:sw=4:
7980
; Copyleft (K) by Jose M. Rodriguez de la Rosa
8081
; (a.k.a. Boriel)
@@ -85,7 +86,7 @@ _test__leave:
8586
; closed source programs).
8687
;
8788
; Please read the MIT license on the internet
88-
#line 1 "/zxbasic/src/arch/zx48k/library-asm/alloc.asm"
89+
#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/alloc.asm"
8990
; vim: ts=4:et:sw=4:
9091
; Copyleft (K) by Jose M. Rodriguez de la Rosa
9192
; (a.k.a. Boriel)
@@ -145,7 +146,7 @@ _test__leave:
145146
; HL = BLOCK Start & DE = Length.
146147
; An init directive is useful for initialization routines.
147148
; They will be added automatically if needed.
148-
#line 1 "/zxbasic/src/arch/zx48k/library-asm/error.asm"
149+
#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/error.asm"
149150
; Simple error control routines
150151
; vim:ts=4:et:
151152
push namespace core
@@ -179,8 +180,8 @@ __STOP:
179180
ld (ERR_NR), a
180181
ret
181182
pop namespace
182-
#line 69 "/zxbasic/src/arch/zx48k/library-asm/alloc.asm"
183-
#line 1 "/zxbasic/src/arch/zx48k/library-asm/heapinit.asm"
183+
#line 69 "/zxbasic/src/lib/arch/zx48k/runtime/alloc.asm"
184+
#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/heapinit.asm"
184185
; vim: ts=4:et:sw=4:
185186
; Copyleft (K) by Jose M. Rodriguez de la Rosa
186187
; (a.k.a. Boriel)
@@ -287,7 +288,7 @@ __MEM_INIT2:
287288
ret
288289
ENDP
289290
pop namespace
290-
#line 70 "/zxbasic/src/arch/zx48k/library-asm/alloc.asm"
291+
#line 70 "/zxbasic/src/lib/arch/zx48k/runtime/alloc.asm"
291292
; ---------------------------------------------------------------------
292293
; MEM_ALLOC
293294
; Allocates a block of memory in the heap.
@@ -318,9 +319,9 @@ __MEM_START:
318319
__MEM_LOOP: ; Loads lengh at (HL, HL+). If Lenght >= BC, jump to __MEM_DONE
319320
ld a, h ; HL = NULL (No memory available?)
320321
or l
321-
#line 113 "/zxbasic/src/arch/zx48k/library-asm/alloc.asm"
322+
#line 113 "/zxbasic/src/lib/arch/zx48k/runtime/alloc.asm"
322323
ret z ; NULL
323-
#line 115 "/zxbasic/src/arch/zx48k/library-asm/alloc.asm"
324+
#line 115 "/zxbasic/src/lib/arch/zx48k/runtime/alloc.asm"
324325
; HL = Pointer to Free block
325326
ld e, (hl)
326327
inc hl
@@ -385,7 +386,7 @@ __MEM_SUBTRACT:
385386
ret
386387
ENDP
387388
pop namespace
388-
#line 13 "/zxbasic/src/arch/zx48k/library-asm/calloc.asm"
389+
#line 13 "/zxbasic/src/lib/arch/zx48k/runtime/calloc.asm"
389390
; ---------------------------------------------------------------------
390391
; MEM_CALLOC
391392
; Allocates a block of memory in the heap, and clears it filling it
@@ -419,7 +420,7 @@ __MEM_CALLOC:
419420
pop hl
420421
ret
421422
pop namespace
422-
#line 3 "/zxbasic/src/arch/zx48k/library-asm/arrayalloc.asm"
423+
#line 3 "/zxbasic/src/lib/arch/zx48k/runtime/array/arrayalloc.asm"
423424
; ---------------------------------------------------------------------
424425
; __ALLOC_LOCAL_ARRAY
425426
; Allocates an array element area in the heap, and clears it filling it
@@ -455,7 +456,7 @@ __ALLOC_LOCAL_ARRAY:
455456
; ---------------------------------------------------------------------
456457
; __ALLOC_INITIALIZED_LOCAL_ARRAY
457458
; Allocates an array element area in the heap, and clears it filling it
458-
; with 0 bytes
459+
; with data whose pointer (PTR) is in the stack
459460
;
460461
; Parameters
461462
; HL = Offset to be added to IX => HL = IX + HL
@@ -483,10 +484,10 @@ __ALLOC_INITIALIZED_LOCAL_ARRAY:
483484
ldir
484485
pop hl ; HL = addr of LBound area if used
485486
ret
486-
#line 139 "/zxbasic/src/arch/zx48k/library-asm/arrayalloc.asm"
487+
#line 142 "/zxbasic/src/lib/arch/zx48k/runtime/array/arrayalloc.asm"
487488
pop namespace
488-
#line 50 "42.bas"
489-
#line 1 "/zxbasic/src/arch/zx48k/library-asm/free.asm"
489+
#line 51 "arch/zx48k/42.bas"
490+
#line 1 "/zxbasic/src/lib/arch/zx48k/runtime/free.asm"
490491
; vim: ts=4:et:sw=4:
491492
; Copyleft (K) by Jose M. Rodriguez de la Rosa
492493
; (a.k.a. Boriel)
@@ -644,7 +645,7 @@ __MEM_BLOCK_JOIN: ; Joins current block (pointed by HL) with next one (pointed
644645
ret
645646
ENDP
646647
pop namespace
647-
#line 51 "42.bas"
648+
#line 52 "arch/zx48k/42.bas"
648649
.LABEL.__LABEL0:
649650
DEFB 00h
650651
DEFB 00h

0 commit comments

Comments
 (0)