From 8e170bfa7fafc7d855f7c8f750ab532b1ce52f97 Mon Sep 17 00:00:00 2001 From: d6 Date: Thu, 2 Feb 2023 17:16:50 -0500 Subject: [PATCH] fix bug --- term.tal | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/term.tal b/term.tal index 8a04526..757db17 100644 --- a/term.tal +++ b/term.tal @@ -142,7 +142,7 @@ ;on-read .Console/vect DEO2 ( set up stdin ) ( set to 01 to enable debug log ) - #01 .debug STZ + #00 .debug STZ .debug LDZ ?&continue BRK &continue #99 #010e DEO @@ -345,7 +345,6 @@ DUP LIT "9 GTH ?end-arg !add-to-arg - @debug-arg ( n* -> ) &short SWP debug-arg/byte &byte DUP #04 SFT debug-arg/char @@ -393,6 +392,15 @@ &!2004 POP2 debug-priv BRK &change SWP LIT "h EQU SWP STZ BRK ( h is set, l is unset ) +@debug-read ( c^ -> ) + .debug LDZ ?&continue POP JMP2r &continue + reset-scratch + debug-arg/byte + #0a scratch-write + scratch-len .File1/len DEO2 + ;scratch .File1/w DEO2 + JMP2r + @debug-csi ( c^ -> ) .debug LDZ ?&continue POP JMP2r &continue reset-scratch @@ -595,7 +603,7 @@ @start-csi ( c^ -> ) POP reset-args ;on-read-csi .Console/vect DEO2 BRK -@on-read +@on-read ( -> ) .Console/r DEI DUP ?&ok POP BRK &ok ( #42 .tint STZ ) @@ -622,7 +630,7 @@ clear-cursor #0001 back-n draw-cursor - JMP2r + BRK @read-esc ( 1b -> ) POP ;on-read-esc .Console/vect DEO2 BRK @@ -654,6 +662,7 @@ at-max-y ?scroll down BRK @read-printable ( c -> ) +( DUP debug-read ) .tint LDZ SWP DUP2 cur-addr STA2 draw-cell forward BRK