From 84ff13708eb22677d9820bc6e2fdd2a9cf41b801 Mon Sep 17 00:00:00 2001 From: Jali Date: Sun, 11 Jan 2026 20:40:15 +0100 Subject: [PATCH] Always end TOSIXB with writing a 0 byte --- src/sudoku.s | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sudoku.s b/src/sudoku.s index 063b49f..eb33d79 100644 --- a/src/sudoku.s +++ b/src/sudoku.s @@ -78,7 +78,8 @@ TOSLP: ILDB D,A ;Load the next character from A. SUBI D,40 ;Convert 32..95 to 0..63 IDPB D,B ;Deposit the character in the destination. JRST TOSLP ;Repeat with next character. -TOSEN: POP P,D ;Restore the D register. +TOSEN: IDPB D,[000] ;Make sure the last char is 0 + POP P,D ;Restore the D register. POPJ P, ;Return from function. ;Subroutine to print a string of text on the output.