Always end TOSIXB with writing a 0 byte

This commit is contained in:
2026-01-11 20:40:15 +01:00
parent 8ad238fa81
commit 84ff13708e

View File

@@ -78,7 +78,8 @@ TOSLP: ILDB D,A ;Load the next character from A.
SUBI D,40 ;Convert 32..95 to 0..63 SUBI D,40 ;Convert 32..95 to 0..63
IDPB D,B ;Deposit the character in the destination. IDPB D,B ;Deposit the character in the destination.
JRST TOSLP ;Repeat with next character. 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. POPJ P, ;Return from function.
;Subroutine to print a string of text on the output. ;Subroutine to print a string of text on the output.