Skip to content

Commit a26b18a

Browse files
committed
Update tests
Also update test.py tool to update binary tests (.tap, .tzx)
1 parent d842048 commit a26b18a

56 files changed

Lines changed: 897 additions & 725 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/astore16.asm

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ __END_PROGRAM:
111111
ret
112112
__CALL_BACK__:
113113
DEFW 0
114+
;; --- end of user code ---
114115
#line 1 "/zxbasic/src/arch/zx48k/library-asm/array.asm"
115116
; vim: ts=4:et:sw=4:
116117
; Copyleft (K) by Jose M. Rodriguez de la Rosa
@@ -239,7 +240,7 @@ __FNMUL2:
239240
TMP_ARR_PTR:
240241
DW 0 ; temporary storage for pointer to tables
241242
ENDP
242-
#line 52 "astore16.bas"
243+
#line 53 "astore16.bas"
243244
#line 1 "/zxbasic/src/arch/zx48k/library-asm/print.asm"
244245
; vim:ts=4:sw=4:et:
245246
; vim:ts=4:sw=4:et:
@@ -880,11 +881,8 @@ INVERSE_MODE: ; 00 -> NOP -> INVERSE 0
880881
ld hl, (MAXX)
881882
ld a, e
882883
dec l ; l = MAXX
883-
cp l ; Lower than max?
884-
jp c, __PRINT_CONT; Nothing to do
885-
call __PRINT_EOL1
886-
exx ; counteracts __PRINT_EOL1 exx
887-
jp __PRINT_CONT2
884+
cp l ; Lower than max?
885+
jp nc, __PRINT_EOL1
888886
__PRINT_CONT:
889887
call __SAVE_S_POSN
890888
__PRINT_CONT2:
@@ -899,7 +897,7 @@ PRINT_EOL: ; Called WHENEVER there is no ";" at end of PRINT sentence
899897
exx
900898
__PRINT_0Dh: ; Called WHEN printing CHR$(13)
901899
call __SCROLL
902-
#line 210 "/zxbasic/src/arch/zx48k/library-asm/print.asm"
900+
#line 207 "/zxbasic/src/arch/zx48k/library-asm/print.asm"
903901
call __LOAD_S_POSN
904902
__PRINT_EOL1: ; Another entry called from PRINT when next line required
905903
ld e, 0
@@ -908,12 +906,12 @@ __PRINT_EOL2:
908906
inc a
909907
__PRINT_AT1_END:
910908
ld hl, (MAXY)
911-
cp h
909+
cp l
912910
jr c, __PRINT_EOL_END ; Carry if (MAXY) < d
913911
ld hl, __TVFLAGS
914912
set 1, (hl)
915913
dec a
916-
#line 230 "/zxbasic/src/arch/zx48k/library-asm/print.asm"
914+
#line 227 "/zxbasic/src/arch/zx48k/library-asm/print.asm"
917915
__PRINT_EOL_END:
918916
ld d, a
919917
__PRINT_AT2_END:
@@ -1111,7 +1109,11 @@ CONTINUE:
11111109
ld b, a
11121110
LOOP:
11131111
ld a, ' '
1112+
push bc
1113+
exx
11141114
call __PRINTCHAR
1115+
exx
1116+
pop bc
11151117
djnz LOOP
11161118
ret
11171119
ENDP
@@ -1126,7 +1128,7 @@ PRINT_AT: ; Changes cursor to ROW, COL
11261128
ret nc ; Return if out of screen
11271129
ld hl, __TVFLAGS
11281130
res 1, (hl)
1129-
#line 482 "/zxbasic/src/arch/zx48k/library-asm/print.asm"
1131+
#line 483 "/zxbasic/src/arch/zx48k/library-asm/print.asm"
11301132
jp __SAVE_S_POSN
11311133
LOCAL __PRINT_COM
11321134
LOCAL __BOLD
@@ -1172,7 +1174,7 @@ __PRINT_TABLE: ; Jump table for 0 .. 22 codes
11721174
DW __PRINT_AT ; 22 AT
11731175
DW __PRINT_TAB ; 23 TAB
11741176
ENDP
1175-
#line 53 "astore16.bas"
1177+
#line 54 "astore16.bas"
11761178
#line 1 "/zxbasic/src/arch/zx48k/library-asm/printu16.asm"
11771179
#line 1 "/zxbasic/src/arch/zx48k/library-asm/printi16.asm"
11781180
#line 1 "/zxbasic/src/arch/zx48k/library-asm/printnum.asm"
@@ -1312,5 +1314,5 @@ __PRINTU_LOOP:
13121314
jp __PRINTU_LOOP ; Uses JP in loops
13131315
ENDP
13141316
#line 2 "/zxbasic/src/arch/zx48k/library-asm/printu16.asm"
1315-
#line 54 "astore16.bas"
1317+
#line 55 "astore16.bas"
13161318
END

tests/functional/code00.asm

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ __CALL_BACK__:
5252
DEFW 0
5353
__LABEL0:
5454
DEFW 0000h
55+
;; --- end of user code ---
5556
#line 1 "/zxbasic/src/arch/zx48k/library-asm/load.asm"
5657
#line 1 "/zxbasic/src/arch/zx48k/library-asm/free.asm"
5758
; vim: ts=4:et:sw=4:
@@ -933,11 +934,8 @@ INVERSE_MODE: ; 00 -> NOP -> INVERSE 0
933934
ld hl, (MAXX)
934935
ld a, e
935936
dec l ; l = MAXX
936-
cp l ; Lower than max?
937-
jp c, __PRINT_CONT; Nothing to do
938-
call __PRINT_EOL1
939-
exx ; counteracts __PRINT_EOL1 exx
940-
jp __PRINT_CONT2
937+
cp l ; Lower than max?
938+
jp nc, __PRINT_EOL1
941939
__PRINT_CONT:
942940
call __SAVE_S_POSN
943941
__PRINT_CONT2:
@@ -952,7 +950,7 @@ PRINT_EOL: ; Called WHENEVER there is no ";" at end of PRINT sentence
952950
exx
953951
__PRINT_0Dh: ; Called WHEN printing CHR$(13)
954952
call __SCROLL
955-
#line 210 "/zxbasic/src/arch/zx48k/library-asm/print.asm"
953+
#line 207 "/zxbasic/src/arch/zx48k/library-asm/print.asm"
956954
call __LOAD_S_POSN
957955
__PRINT_EOL1: ; Another entry called from PRINT when next line required
958956
ld e, 0
@@ -961,12 +959,12 @@ __PRINT_EOL2:
961959
inc a
962960
__PRINT_AT1_END:
963961
ld hl, (MAXY)
964-
cp h
962+
cp l
965963
jr c, __PRINT_EOL_END ; Carry if (MAXY) < d
966964
ld hl, __TVFLAGS
967965
set 1, (hl)
968966
dec a
969-
#line 230 "/zxbasic/src/arch/zx48k/library-asm/print.asm"
967+
#line 227 "/zxbasic/src/arch/zx48k/library-asm/print.asm"
970968
__PRINT_EOL_END:
971969
ld d, a
972970
__PRINT_AT2_END:
@@ -1164,7 +1162,11 @@ CONTINUE:
11641162
ld b, a
11651163
LOOP:
11661164
ld a, ' '
1165+
push bc
1166+
exx
11671167
call __PRINTCHAR
1168+
exx
1169+
pop bc
11681170
djnz LOOP
11691171
ret
11701172
ENDP
@@ -1179,7 +1181,7 @@ PRINT_AT: ; Changes cursor to ROW, COL
11791181
ret nc ; Return if out of screen
11801182
ld hl, __TVFLAGS
11811183
res 1, (hl)
1182-
#line 482 "/zxbasic/src/arch/zx48k/library-asm/print.asm"
1184+
#line 483 "/zxbasic/src/arch/zx48k/library-asm/print.asm"
11831185
jp __SAVE_S_POSN
11841186
LOCAL __PRINT_COM
11851187
LOCAL __BOLD
@@ -1480,7 +1482,7 @@ PRINT_TAPE_MSG:
14801482
ret
14811483
ENDP
14821484
#line 332 "/zxbasic/src/arch/zx48k/library-asm/load.asm"
1483-
#line 30 "code00.bas"
1485+
#line 31 "code00.bas"
14841486
#line 1 "/zxbasic/src/arch/zx48k/library-asm/loadstr.asm"
14851487
#line 1 "/zxbasic/src/arch/zx48k/library-asm/alloc.asm"
14861488
; vim: ts=4:et:sw=4:
@@ -1672,5 +1674,5 @@ __LOADSTR: ; __FASTCALL__ entry
16721674
ldir ; Copies string (length number included)
16731675
pop hl ; Recovers destiny in hl as result
16741676
ret
1675-
#line 31 "code00.bas"
1677+
#line 32 "code00.bas"
16761678
END

tests/functional/code01.asm

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ __CALL_BACK__:
5252
DEFW 0
5353
__LABEL0:
5454
DEFW 0000h
55+
;; --- end of user code ---
5556
#line 1 "/zxbasic/src/arch/zx48k/library-asm/load.asm"
5657
#line 1 "/zxbasic/src/arch/zx48k/library-asm/free.asm"
5758
; vim: ts=4:et:sw=4:
@@ -933,11 +934,8 @@ INVERSE_MODE: ; 00 -> NOP -> INVERSE 0
933934
ld hl, (MAXX)
934935
ld a, e
935936
dec l ; l = MAXX
936-
cp l ; Lower than max?
937-
jp c, __PRINT_CONT; Nothing to do
938-
call __PRINT_EOL1
939-
exx ; counteracts __PRINT_EOL1 exx
940-
jp __PRINT_CONT2
937+
cp l ; Lower than max?
938+
jp nc, __PRINT_EOL1
941939
__PRINT_CONT:
942940
call __SAVE_S_POSN
943941
__PRINT_CONT2:
@@ -952,7 +950,7 @@ PRINT_EOL: ; Called WHENEVER there is no ";" at end of PRINT sentence
952950
exx
953951
__PRINT_0Dh: ; Called WHEN printing CHR$(13)
954952
call __SCROLL
955-
#line 210 "/zxbasic/src/arch/zx48k/library-asm/print.asm"
953+
#line 207 "/zxbasic/src/arch/zx48k/library-asm/print.asm"
956954
call __LOAD_S_POSN
957955
__PRINT_EOL1: ; Another entry called from PRINT when next line required
958956
ld e, 0
@@ -961,12 +959,12 @@ __PRINT_EOL2:
961959
inc a
962960
__PRINT_AT1_END:
963961
ld hl, (MAXY)
964-
cp h
962+
cp l
965963
jr c, __PRINT_EOL_END ; Carry if (MAXY) < d
966964
ld hl, __TVFLAGS
967965
set 1, (hl)
968966
dec a
969-
#line 230 "/zxbasic/src/arch/zx48k/library-asm/print.asm"
967+
#line 227 "/zxbasic/src/arch/zx48k/library-asm/print.asm"
970968
__PRINT_EOL_END:
971969
ld d, a
972970
__PRINT_AT2_END:
@@ -1164,7 +1162,11 @@ CONTINUE:
11641162
ld b, a
11651163
LOOP:
11661164
ld a, ' '
1165+
push bc
1166+
exx
11671167
call __PRINTCHAR
1168+
exx
1169+
pop bc
11681170
djnz LOOP
11691171
ret
11701172
ENDP
@@ -1179,7 +1181,7 @@ PRINT_AT: ; Changes cursor to ROW, COL
11791181
ret nc ; Return if out of screen
11801182
ld hl, __TVFLAGS
11811183
res 1, (hl)
1182-
#line 482 "/zxbasic/src/arch/zx48k/library-asm/print.asm"
1184+
#line 483 "/zxbasic/src/arch/zx48k/library-asm/print.asm"
11831185
jp __SAVE_S_POSN
11841186
LOCAL __PRINT_COM
11851187
LOCAL __BOLD
@@ -1480,7 +1482,7 @@ PRINT_TAPE_MSG:
14801482
ret
14811483
ENDP
14821484
#line 332 "/zxbasic/src/arch/zx48k/library-asm/load.asm"
1483-
#line 30 "code01.bas"
1485+
#line 31 "code01.bas"
14841486
#line 1 "/zxbasic/src/arch/zx48k/library-asm/loadstr.asm"
14851487
#line 1 "/zxbasic/src/arch/zx48k/library-asm/alloc.asm"
14861488
; vim: ts=4:et:sw=4:
@@ -1672,5 +1674,5 @@ __LOADSTR: ; __FASTCALL__ entry
16721674
ldir ; Copies string (length number included)
16731675
pop hl ; Recovers destiny in hl as result
16741676
ret
1675-
#line 31 "code01.bas"
1677+
#line 32 "code01.bas"
16761678
END

tests/functional/code02.asm

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ __CALL_BACK__:
5252
DEFW 0
5353
__LABEL0:
5454
DEFW 0000h
55+
;; --- end of user code ---
5556
#line 1 "/zxbasic/src/arch/zx48k/library-asm/load.asm"
5657
#line 1 "/zxbasic/src/arch/zx48k/library-asm/free.asm"
5758
; vim: ts=4:et:sw=4:
@@ -933,11 +934,8 @@ INVERSE_MODE: ; 00 -> NOP -> INVERSE 0
933934
ld hl, (MAXX)
934935
ld a, e
935936
dec l ; l = MAXX
936-
cp l ; Lower than max?
937-
jp c, __PRINT_CONT; Nothing to do
938-
call __PRINT_EOL1
939-
exx ; counteracts __PRINT_EOL1 exx
940-
jp __PRINT_CONT2
937+
cp l ; Lower than max?
938+
jp nc, __PRINT_EOL1
941939
__PRINT_CONT:
942940
call __SAVE_S_POSN
943941
__PRINT_CONT2:
@@ -952,7 +950,7 @@ PRINT_EOL: ; Called WHENEVER there is no ";" at end of PRINT sentence
952950
exx
953951
__PRINT_0Dh: ; Called WHEN printing CHR$(13)
954952
call __SCROLL
955-
#line 210 "/zxbasic/src/arch/zx48k/library-asm/print.asm"
953+
#line 207 "/zxbasic/src/arch/zx48k/library-asm/print.asm"
956954
call __LOAD_S_POSN
957955
__PRINT_EOL1: ; Another entry called from PRINT when next line required
958956
ld e, 0
@@ -961,12 +959,12 @@ __PRINT_EOL2:
961959
inc a
962960
__PRINT_AT1_END:
963961
ld hl, (MAXY)
964-
cp h
962+
cp l
965963
jr c, __PRINT_EOL_END ; Carry if (MAXY) < d
966964
ld hl, __TVFLAGS
967965
set 1, (hl)
968966
dec a
969-
#line 230 "/zxbasic/src/arch/zx48k/library-asm/print.asm"
967+
#line 227 "/zxbasic/src/arch/zx48k/library-asm/print.asm"
970968
__PRINT_EOL_END:
971969
ld d, a
972970
__PRINT_AT2_END:
@@ -1164,7 +1162,11 @@ CONTINUE:
11641162
ld b, a
11651163
LOOP:
11661164
ld a, ' '
1165+
push bc
1166+
exx
11671167
call __PRINTCHAR
1168+
exx
1169+
pop bc
11681170
djnz LOOP
11691171
ret
11701172
ENDP
@@ -1179,7 +1181,7 @@ PRINT_AT: ; Changes cursor to ROW, COL
11791181
ret nc ; Return if out of screen
11801182
ld hl, __TVFLAGS
11811183
res 1, (hl)
1182-
#line 482 "/zxbasic/src/arch/zx48k/library-asm/print.asm"
1184+
#line 483 "/zxbasic/src/arch/zx48k/library-asm/print.asm"
11831185
jp __SAVE_S_POSN
11841186
LOCAL __PRINT_COM
11851187
LOCAL __BOLD
@@ -1480,7 +1482,7 @@ PRINT_TAPE_MSG:
14801482
ret
14811483
ENDP
14821484
#line 332 "/zxbasic/src/arch/zx48k/library-asm/load.asm"
1483-
#line 30 "code02.bas"
1485+
#line 31 "code02.bas"
14841486
#line 1 "/zxbasic/src/arch/zx48k/library-asm/loadstr.asm"
14851487
#line 1 "/zxbasic/src/arch/zx48k/library-asm/alloc.asm"
14861488
; vim: ts=4:et:sw=4:
@@ -1672,5 +1674,5 @@ __LOADSTR: ; __FASTCALL__ entry
16721674
ldir ; Copies string (length number included)
16731675
pop hl ; Recovers destiny in hl as result
16741676
ret
1675-
#line 31 "code02.bas"
1677+
#line 32 "code02.bas"
16761678
END

0 commit comments

Comments
 (0)