Handle ASCII control character echo using caret notation
authorRobert Pengelly <robertapengelly@hotmail.com>
Sun, 18 Oct 2026 09:29:05 +0000 (10:29 +0100)
committerRobert Pengelly <robertapengelly@hotmail.com>
Sun, 18 Oct 2026 09:29:05 +0000 (10:29 +0100)
interrupts.c

index 0d4c43dcc83472f83653670ab8d0f66a30742e8a..aa2fe0125c100edf57dd01d83a1b990aca0ca3a4 100644 (file)
@@ -2133,7 +2133,14 @@ static void dos_buffered_line_input (CPU8086 *cpu) {
             count++;
             
             /* echo */
-            dos_write_console_char (stdout, (uint8_t) c);
+            if (c < 0x20) {
+            
+                putchar ('^');
+                putchar (c + 0x40);
+            
+            } else {
+                dos_write_console_char (stdout, (uint8_t) c);
+            }
         
         }