Skip to content

Commit d1d73ac

Browse files
authored
Merge pull request #438 from boriel/bugfix/print_tab_misposition
Fix TAB codes glitch
2 parents 6cc7b33 + 2229208 commit d1d73ac

57 files changed

Lines changed: 172 additions & 172 deletions

Some content is hidden

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

src/arch/zx48k/library-asm/print.asm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,13 +249,13 @@ __PRINT_COM:
249249

250250
__PRINT_TAB:
251251
ld hl, __PRINT_TAB1
252-
jp __PRINT_SET_STATE
252+
jr __PRINT_SET_STATE
253253

254254
__PRINT_TAB1:
255-
ld (MEM0), a
255+
ld (MEM0), a
256+
exx
256257
ld hl, __PRINT_TAB2
257-
ld (PRINT_JUMP_STATE), hl
258-
ret
258+
jr __PRINT_SET_STATE
259259

260260
__PRINT_TAB2:
261261
ld a, (MEM0) ; Load tab code (ignore the current one)

src/arch/zxnext/library-asm/print.asm

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,12 @@ __PRINT_EOL2:
218218

219219
__PRINT_AT1_END:
220220
ld hl, (MAXY)
221-
cp l
221+
cp h
222222
jr c, __PRINT_EOL_END ; Carry if (MAXY) < d
223223
#ifndef DISABLE_SCROLL
224224
ld hl, __TVFLAGS
225225
set 1, (hl)
226-
ld a, d
226+
dec a
227227
#else
228228
xor a
229229
#endif
@@ -249,13 +249,13 @@ __PRINT_COM:
249249

250250
__PRINT_TAB:
251251
ld hl, __PRINT_TAB1
252-
jp __PRINT_SET_STATE
252+
jr __PRINT_SET_STATE
253253

254254
__PRINT_TAB1:
255-
ld (MEM0), a
255+
ld (MEM0), a
256+
exx
256257
ld hl, __PRINT_TAB2
257-
ld (PRINT_JUMP_STATE), hl
258-
ret
258+
jr __PRINT_SET_STATE
259259

260260
__PRINT_TAB2:
261261
ld a, (MEM0) ; Load tab code (ignore the current one)
@@ -273,7 +273,7 @@ __PRINT_TAB2:
273273
__PRINT_NOP:
274274
__PRINT_RESTART:
275275
ld hl, __PRINT_START
276-
jp __PRINT_SET_STATE
276+
jr __PRINT_SET_STATE
277277

278278
__PRINT_AT:
279279
ld hl, __PRINT_AT1
@@ -288,7 +288,7 @@ __PRINT_AT1: ; Jumps here if waiting for 1st parameter
288288
ld hl, __PRINT_AT2
289289
ld (PRINT_JUMP_STATE), hl ; Saves next entry call
290290
call __LOAD_S_POSN
291-
jp __PRINT_AT1_END
291+
jr __PRINT_AT1_END
292292

293293
__PRINT_AT2:
294294
exx
@@ -297,7 +297,7 @@ __PRINT_AT2:
297297
call __LOAD_S_POSN
298298
ld e, a
299299
ld hl, (MAXX)
300-
cp (hl)
300+
cp l
301301
jr c, __PRINT_AT2_END
302302
jr __PRINT_EOL1
303303

tests/functional/astore16.asm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -932,12 +932,12 @@ __PRINT_COM:
932932
ret
933933
__PRINT_TAB:
934934
ld hl, __PRINT_TAB1
935-
jp __PRINT_SET_STATE
935+
jr __PRINT_SET_STATE
936936
__PRINT_TAB1:
937937
ld (MEM0), a
938+
exx
938939
ld hl, __PRINT_TAB2
939-
ld (PRINT_JUMP_STATE), hl
940-
ret
940+
jr __PRINT_SET_STATE
941941
__PRINT_TAB2:
942942
ld a, (MEM0) ; Load tab code (ignore the current one)
943943
push hl

tests/functional/code00.asm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -985,12 +985,12 @@ __PRINT_COM:
985985
ret
986986
__PRINT_TAB:
987987
ld hl, __PRINT_TAB1
988-
jp __PRINT_SET_STATE
988+
jr __PRINT_SET_STATE
989989
__PRINT_TAB1:
990990
ld (MEM0), a
991+
exx
991992
ld hl, __PRINT_TAB2
992-
ld (PRINT_JUMP_STATE), hl
993-
ret
993+
jr __PRINT_SET_STATE
994994
__PRINT_TAB2:
995995
ld a, (MEM0) ; Load tab code (ignore the current one)
996996
push hl

tests/functional/code01.asm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -985,12 +985,12 @@ __PRINT_COM:
985985
ret
986986
__PRINT_TAB:
987987
ld hl, __PRINT_TAB1
988-
jp __PRINT_SET_STATE
988+
jr __PRINT_SET_STATE
989989
__PRINT_TAB1:
990990
ld (MEM0), a
991+
exx
991992
ld hl, __PRINT_TAB2
992-
ld (PRINT_JUMP_STATE), hl
993-
ret
993+
jr __PRINT_SET_STATE
994994
__PRINT_TAB2:
995995
ld a, (MEM0) ; Load tab code (ignore the current one)
996996
push hl

tests/functional/code02.asm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -985,12 +985,12 @@ __PRINT_COM:
985985
ret
986986
__PRINT_TAB:
987987
ld hl, __PRINT_TAB1
988-
jp __PRINT_SET_STATE
988+
jr __PRINT_SET_STATE
989989
__PRINT_TAB1:
990990
ld (MEM0), a
991+
exx
991992
ld hl, __PRINT_TAB2
992-
ld (PRINT_JUMP_STATE), hl
993-
ret
993+
jr __PRINT_SET_STATE
994994
__PRINT_TAB2:
995995
ld a, (MEM0) ; Load tab code (ignore the current one)
996996
push hl

tests/functional/einarattr.asm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -707,12 +707,12 @@ __PRINT_COM:
707707
ret
708708
__PRINT_TAB:
709709
ld hl, __PRINT_TAB1
710-
jp __PRINT_SET_STATE
710+
jr __PRINT_SET_STATE
711711
__PRINT_TAB1:
712712
ld (MEM0), a
713+
exx
713714
ld hl, __PRINT_TAB2
714-
ld (PRINT_JUMP_STATE), hl
715-
ret
715+
jr __PRINT_SET_STATE
716716
__PRINT_TAB2:
717717
ld a, (MEM0) ; Load tab code (ignore the current one)
718718
push hl

tests/functional/einarshift.asm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -745,12 +745,12 @@ __PRINT_COM:
745745
ret
746746
__PRINT_TAB:
747747
ld hl, __PRINT_TAB1
748-
jp __PRINT_SET_STATE
748+
jr __PRINT_SET_STATE
749749
__PRINT_TAB1:
750750
ld (MEM0), a
751+
exx
751752
ld hl, __PRINT_TAB2
752-
ld (PRINT_JUMP_STATE), hl
753-
ret
753+
jr __PRINT_SET_STATE
754754
__PRINT_TAB2:
755755
ld a, (MEM0) ; Load tab code (ignore the current one)
756756
push hl

tests/functional/fact.asm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -902,12 +902,12 @@ __PRINT_COM:
902902
ret
903903
__PRINT_TAB:
904904
ld hl, __PRINT_TAB1
905-
jp __PRINT_SET_STATE
905+
jr __PRINT_SET_STATE
906906
__PRINT_TAB1:
907907
ld (MEM0), a
908+
exx
908909
ld hl, __PRINT_TAB2
909-
ld (PRINT_JUMP_STATE), hl
910-
ret
910+
jr __PRINT_SET_STATE
911911
__PRINT_TAB2:
912912
ld a, (MEM0) ; Load tab code (ignore the current one)
913913
push hl

tests/functional/for0.asm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -782,12 +782,12 @@ __PRINT_COM:
782782
ret
783783
__PRINT_TAB:
784784
ld hl, __PRINT_TAB1
785-
jp __PRINT_SET_STATE
785+
jr __PRINT_SET_STATE
786786
__PRINT_TAB1:
787787
ld (MEM0), a
788+
exx
788789
ld hl, __PRINT_TAB2
789-
ld (PRINT_JUMP_STATE), hl
790-
ret
790+
jr __PRINT_SET_STATE
791791
__PRINT_TAB2:
792792
ld a, (MEM0) ; Load tab code (ignore the current one)
793793
push hl

0 commit comments

Comments
 (0)