From 26d5c36d95c103915c2116be0a3a4e109a0c3abb Mon Sep 17 00:00:00 2001 From: at-eee Date: Sat, 16 May 2026 15:15:40 +0200 Subject: [PATCH] Simple display fix to make last char of last line empty instead of last line empty! Details: Added last_char global byte variable. Added print_last_char procedure (emit function's variant). Feel free to edit as you wish Tanuki --- automaton/bootsector.asm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/automaton/bootsector.asm b/automaton/bootsector.asm index 8fe1690..6b80428 100644 --- a/automaton/bootsector.asm +++ b/automaton/bootsector.asm @@ -33,6 +33,7 @@ call scan ; print former row call pass ; update to latter row call copy ; fill former with latter call sleep +call print_last_char ; Prints last character in line jmp main sleep: @@ -97,7 +98,7 @@ cell: scan: mov di, former - mov si, former + 80 + mov si, former + 79 ; 79 and not 80 to emit last character just after sleep and not in this procedure. .loop: mov al, [di] call ascii @@ -105,6 +106,7 @@ scan: inc di cmp di, si jb .loop + mov [last_char], al ; Last character stored in last_char byte variable ret ascii: @@ -117,6 +119,8 @@ ascii: .done: ret +print_last_char: + mov al, [last_char] ; copying from last_char if print_last_char was called instead of emit emit: mov ah, 0x0e ; write char in teletype mode ; al = char @@ -145,6 +149,7 @@ db 0, 1, 0, 0, 0, 0, 1, 0, 0, 0 db 0 latter: times 80 db 0 +last_char db 0 ; pad with zeros until magic number times 510 - ($ - $$) db 0