diff --git a/library-asm/print.asm b/library-asm/print.asm index a046027bb..5d3d531a0 100644 --- a/library-asm/print.asm +++ b/library-asm/print.asm @@ -50,6 +50,12 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 @@ -60,9 +66,16 @@ __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord @@ -196,7 +209,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a diff --git a/tests/functional/astore16.asm b/tests/functional/astore16.asm index 4e8f85bbd..cd121703a 100644 --- a/tests/functional/astore16.asm +++ b/tests/functional/astore16.asm @@ -730,14 +730,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -841,7 +853,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/code00.asm b/tests/functional/code00.asm index 812a7cff1..5382e3829 100644 --- a/tests/functional/code00.asm +++ b/tests/functional/code00.asm @@ -979,14 +979,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -1090,7 +1102,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/code01.asm b/tests/functional/code01.asm index 38e215c83..483defd58 100644 --- a/tests/functional/code01.asm +++ b/tests/functional/code01.asm @@ -979,14 +979,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -1090,7 +1102,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/code02.asm b/tests/functional/code02.asm index ac53d20a8..a9f04c24c 100644 --- a/tests/functional/code02.asm +++ b/tests/functional/code02.asm @@ -979,14 +979,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -1090,7 +1102,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/einarattr.asm b/tests/functional/einarattr.asm index c1ce32951..8fb19e096 100644 --- a/tests/functional/einarattr.asm +++ b/tests/functional/einarattr.asm @@ -545,14 +545,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -656,7 +668,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/einarshift.asm b/tests/functional/einarshift.asm index df30ea720..039ce75c3 100644 --- a/tests/functional/einarshift.asm +++ b/tests/functional/einarshift.asm @@ -581,14 +581,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -692,7 +704,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/fact.asm b/tests/functional/fact.asm index cf8bef6cf..c15cfc6c8 100644 --- a/tests/functional/fact.asm +++ b/tests/functional/fact.asm @@ -738,14 +738,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -849,7 +861,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/for0.asm b/tests/functional/for0.asm index 20138fed9..72a54668a 100644 --- a/tests/functional/for0.asm +++ b/tests/functional/for0.asm @@ -618,14 +618,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -729,7 +741,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/ifelse1.asm b/tests/functional/ifelse1.asm index 5fefe837c..c83ad4c7c 100644 --- a/tests/functional/ifelse1.asm +++ b/tests/functional/ifelse1.asm @@ -594,14 +594,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -705,7 +717,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/ifwhilex.asm b/tests/functional/ifwhilex.asm index b8b3198be..8c407a84e 100644 --- a/tests/functional/ifwhilex.asm +++ b/tests/functional/ifwhilex.asm @@ -609,14 +609,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -720,7 +732,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/inkey.asm b/tests/functional/inkey.asm index 7beba1414..cc6d400b0 100644 --- a/tests/functional/inkey.asm +++ b/tests/functional/inkey.asm @@ -892,14 +892,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -1003,7 +1015,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/lcd3.asm b/tests/functional/lcd3.asm index 84ef31a14..ae0fd6bcc 100644 --- a/tests/functional/lcd3.asm +++ b/tests/functional/lcd3.asm @@ -1301,14 +1301,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -1412,7 +1424,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/lcd7.asm b/tests/functional/lcd7.asm index 7ca98de44..821f97083 100644 --- a/tests/functional/lcd7.asm +++ b/tests/functional/lcd7.asm @@ -1082,14 +1082,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -1193,7 +1205,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/lcd8.asm b/tests/functional/lcd8.asm index 203070ccd..b785000bc 100644 --- a/tests/functional/lcd8.asm +++ b/tests/functional/lcd8.asm @@ -1084,14 +1084,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -1195,7 +1207,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/lcd9.asm b/tests/functional/lcd9.asm index ff73f1595..c6f63697a 100644 --- a/tests/functional/lcd9.asm +++ b/tests/functional/lcd9.asm @@ -1072,14 +1072,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -1183,7 +1195,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/load02.asm b/tests/functional/load02.asm index 6783e2abc..4eda8a566 100644 --- a/tests/functional/load02.asm +++ b/tests/functional/load02.asm @@ -984,14 +984,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -1095,7 +1107,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/load03.asm b/tests/functional/load03.asm index db6c387bb..e244ba04e 100644 --- a/tests/functional/load03.asm +++ b/tests/functional/load03.asm @@ -983,14 +983,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -1094,7 +1106,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/loadu16ii.asm b/tests/functional/loadu16ii.asm index a10cb9d04..140a289e8 100644 --- a/tests/functional/loadu16ii.asm +++ b/tests/functional/loadu16ii.asm @@ -617,14 +617,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -728,7 +740,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/ltee1.asm b/tests/functional/ltee1.asm index d18c8c228..77befaef3 100644 --- a/tests/functional/ltee1.asm +++ b/tests/functional/ltee1.asm @@ -1097,14 +1097,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -1208,7 +1220,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/memcpytest.asm b/tests/functional/memcpytest.asm index 6019c5c5c..105882259 100644 --- a/tests/functional/memcpytest.asm +++ b/tests/functional/memcpytest.asm @@ -703,14 +703,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -814,7 +826,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/noheap.asm b/tests/functional/noheap.asm index d5310b4c7..06b1d672e 100644 --- a/tests/functional/noheap.asm +++ b/tests/functional/noheap.asm @@ -570,14 +570,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -681,7 +693,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/ongoto.asm b/tests/functional/ongoto.asm index c2e7f5555..2f8a9c5f6 100644 --- a/tests/functional/ongoto.asm +++ b/tests/functional/ongoto.asm @@ -709,14 +709,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -820,7 +832,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/opt1_dim_arr_global.asm b/tests/functional/opt1_dim_arr_global.asm index bb4c0edf3..43630633a 100644 --- a/tests/functional/opt1_dim_arr_global.asm +++ b/tests/functional/opt1_dim_arr_global.asm @@ -704,14 +704,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -815,7 +827,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/opt1_dim_arr_global2.asm b/tests/functional/opt1_dim_arr_global2.asm index 6c3c25cfc..bca0df8dd 100644 --- a/tests/functional/opt1_dim_arr_global2.asm +++ b/tests/functional/opt1_dim_arr_global2.asm @@ -570,14 +570,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -681,7 +693,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/opt1_dim_arr_global3.asm b/tests/functional/opt1_dim_arr_global3.asm index 3aabf247d..bff67ce8f 100644 --- a/tests/functional/opt1_dim_arr_global3.asm +++ b/tests/functional/opt1_dim_arr_global3.asm @@ -571,14 +571,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -682,7 +694,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/opt1_dim_arr_global4.asm b/tests/functional/opt1_dim_arr_global4.asm index c38b6a95e..4ef2d9346 100644 --- a/tests/functional/opt1_dim_arr_global4.asm +++ b/tests/functional/opt1_dim_arr_global4.asm @@ -709,14 +709,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -820,7 +832,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/opt1_dim_arr_local2.asm b/tests/functional/opt1_dim_arr_local2.asm index 77be2f3e2..292d0dbb1 100644 --- a/tests/functional/opt1_dim_arr_local2.asm +++ b/tests/functional/opt1_dim_arr_local2.asm @@ -1122,14 +1122,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -1233,7 +1245,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/opt3_data2.asm b/tests/functional/opt3_data2.asm index 3621a2e1f..e573dfb50 100644 --- a/tests/functional/opt3_data2.asm +++ b/tests/functional/opt3_data2.asm @@ -823,14 +823,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -934,7 +946,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/opt3_einar.asm b/tests/functional/opt3_einar.asm index ffe66d3cc..6a44957c4 100644 --- a/tests/functional/opt3_einar.asm +++ b/tests/functional/opt3_einar.asm @@ -605,14 +605,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -716,7 +728,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/optconst.asm b/tests/functional/optconst.asm index 8cd9a24ff..1e4f3d608 100644 --- a/tests/functional/optconst.asm +++ b/tests/functional/optconst.asm @@ -595,14 +595,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -706,7 +718,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/param0.asm b/tests/functional/param0.asm index 6b3006060..12f6659f7 100644 --- a/tests/functional/param0.asm +++ b/tests/functional/param0.asm @@ -1063,14 +1063,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -1174,7 +1186,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/param1.asm b/tests/functional/param1.asm index 724d38180..1fa542d91 100644 --- a/tests/functional/param1.asm +++ b/tests/functional/param1.asm @@ -603,14 +603,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -714,7 +726,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/param2.asm b/tests/functional/param2.asm index fb40879e2..5e4c02ace 100644 --- a/tests/functional/param2.asm +++ b/tests/functional/param2.asm @@ -1063,14 +1063,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -1174,7 +1186,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/parambyref1.asm b/tests/functional/parambyref1.asm index eda1f31f1..091e34f34 100644 --- a/tests/functional/parambyref1.asm +++ b/tests/functional/parambyref1.asm @@ -608,14 +608,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -719,7 +731,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/print.asm b/tests/functional/print.asm index 502d156ec..bd470851b 100644 --- a/tests/functional/print.asm +++ b/tests/functional/print.asm @@ -604,14 +604,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -715,7 +727,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/print_arrstr.asm b/tests/functional/print_arrstr.asm index 760812a67..21fbfadf9 100644 --- a/tests/functional/print_arrstr.asm +++ b/tests/functional/print_arrstr.asm @@ -888,14 +888,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -999,7 +1011,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/read10.asm b/tests/functional/read10.asm index 19c78e186..467e4cf92 100644 --- a/tests/functional/read10.asm +++ b/tests/functional/read10.asm @@ -784,14 +784,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -895,7 +907,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/read12.asm b/tests/functional/read12.asm index ba1ea1143..998ac45ea 100644 --- a/tests/functional/read12.asm +++ b/tests/functional/read12.asm @@ -902,14 +902,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -1013,7 +1025,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/read5.asm b/tests/functional/read5.asm index dcaa122b1..5ef30b290 100644 --- a/tests/functional/read5.asm +++ b/tests/functional/read5.asm @@ -741,14 +741,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -852,7 +864,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/read8.asm b/tests/functional/read8.asm index 4b9ad516a..61fd5b775 100644 --- a/tests/functional/read8.asm +++ b/tests/functional/read8.asm @@ -732,14 +732,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -843,7 +855,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/read9.asm b/tests/functional/read9.asm index e46171989..d5c926266 100644 --- a/tests/functional/read9.asm +++ b/tests/functional/read9.asm @@ -902,14 +902,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -1013,7 +1025,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/readokdown.asm b/tests/functional/readokdown.asm index dc55d4127..36c3798b9 100644 --- a/tests/functional/readokdown.asm +++ b/tests/functional/readokdown.asm @@ -645,14 +645,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -756,7 +768,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/readokup.asm b/tests/functional/readokup.asm index 718a56a54..80eb8279f 100644 --- a/tests/functional/readokup.asm +++ b/tests/functional/readokup.asm @@ -644,14 +644,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -755,7 +767,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/simple.asm b/tests/functional/simple.asm index 22845dccd..bfed9eb17 100644 --- a/tests/functional/simple.asm +++ b/tests/functional/simple.asm @@ -587,14 +587,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -698,7 +710,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/str0.asm b/tests/functional/str0.asm index 37b6626f5..c2869b5d4 100644 --- a/tests/functional/str0.asm +++ b/tests/functional/str0.asm @@ -877,14 +877,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -988,7 +1000,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/strbase2.asm b/tests/functional/strbase2.asm index bbaf8a39c..b2f4d3f83 100644 --- a/tests/functional/strbase2.asm +++ b/tests/functional/strbase2.asm @@ -1192,14 +1192,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -1303,7 +1315,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/stringparam.asm b/tests/functional/stringparam.asm index 260162aaf..12b12c9b3 100644 --- a/tests/functional/stringparam.asm +++ b/tests/functional/stringparam.asm @@ -1063,14 +1063,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -1174,7 +1186,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/strlocal0.asm b/tests/functional/strlocal0.asm index 2d3f1b318..5ad848c9d 100644 --- a/tests/functional/strlocal0.asm +++ b/tests/functional/strlocal0.asm @@ -875,14 +875,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -986,7 +998,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/strparam0.asm b/tests/functional/strparam0.asm index e61d6bf64..1eab5e483 100644 --- a/tests/functional/strparam0.asm +++ b/tests/functional/strparam0.asm @@ -1093,14 +1093,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -1204,7 +1216,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/strparam2.asm b/tests/functional/strparam2.asm index 65482676f..d6cf87f23 100644 --- a/tests/functional/strparam2.asm +++ b/tests/functional/strparam2.asm @@ -625,14 +625,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -736,7 +748,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/strparam3.asm b/tests/functional/strparam3.asm index 9563ad518..55e9487cd 100644 --- a/tests/functional/strparam3.asm +++ b/tests/functional/strparam3.asm @@ -1087,14 +1087,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -1198,7 +1210,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/subrec.asm b/tests/functional/subrec.asm index b4aaae062..cc6a71e86 100644 --- a/tests/functional/subrec.asm +++ b/tests/functional/subrec.asm @@ -745,14 +745,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -856,7 +868,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: diff --git a/tests/functional/tap_00.tap b/tests/functional/tap_00.tap index e9e6f0963..a0a7d9e9a 100644 Binary files a/tests/functional/tap_00.tap and b/tests/functional/tap_00.tap differ diff --git a/tests/functional/tzx_00.tzx b/tests/functional/tzx_00.tzx index 7bfbcdea7..87d03a34e 100644 Binary files a/tests/functional/tzx_00.tzx and b/tests/functional/tzx_00.tzx differ diff --git a/tests/functional/usr0.asm b/tests/functional/usr0.asm index caa431ffe..353630c75 100644 --- a/tests/functional/usr0.asm +++ b/tests/functional/usr0.asm @@ -578,14 +578,26 @@ __PRINTCHAR: ; Print character store in accumulator (A register) LOCAL __PRINT_UDG LOCAL __PRGRAPH LOCAL __PRINT_START + LOCAL __NO_SCROLL + LOCAL __ROM_SCROLL_SCR + LOCAL __TVFLAGS + __ROM_SCROLL_SCR EQU 0DFEh + __TVFLAGS EQU 5C3Ch PRINT_JUMP_STATE EQU __PRINT_JUMP + 1 __PRINT_JUMP: jp __PRINT_START ; Where to jump. If we print 22 (AT), next two calls jumps to AT1 and AT2 respectively __PRINT_START: cp ' ' jp c, __PRINT_SPECIAL ; Characters below ' ' are special ones - exx ; Switch to alternative registers + exx ; Switch to alternative registers ex af, af' ; Saves a value (char to print) for later + ld hl, __TVFLAGS + bit 1, (hl) + jp z, __NO_SCROLL + call __ROM_SCROLL_SCR + ld hl, __TVFLAGS + res 1, (hl) +__NO_SCROLL: call __LOAD_S_POSN ; At this point we have the new coord ld hl, (SCREEN_ADDR) @@ -689,7 +701,9 @@ __PRINT_AT1_END: ld hl, (MAXY) cp l jr c, __PRINT_EOL_END ; Carry if (MAXY) < d - xor a + ld hl, __TVFLAGS + set 1, (hl) + ld a, d __PRINT_EOL_END: ld d, a __PRINT_AT2_END: