diff --git a/femto.tal b/femto.tal index ea6be2c..f1724cd 100644 --- a/femto.tal +++ b/femto.tal @@ -1221,7 +1221,7 @@ !abs-line @draw-regex-matches ( -> ) - emit-color-reverse-bold ( ) + emit-color-reverse ( ) screen-limit .buffer/offset LDZ2 ( limit pos ) &loop ( limit pos ) GTH2k #00 EQU ( limit pos limit>pos=0? ) @@ -1245,7 +1245,7 @@ ( return if not searching ) .searching/active LDZ #00 EQU ?&return ( ) .searching/regex LDZ2 ORA ?draw-regex-matches - emit-color-reverse-bold + emit-color-reverse lmargin ,&x STR2 #0000 ,&y STR2 ( x <- 0, y <- 0 ) .buffer/offset LDZ2 DUP2 screen-limit SUB2 STH2 ( offset [-count] ) diff --git a/regex.tal b/regex.tal index 6a124d3..136524a 100644 --- a/regex.tal +++ b/regex.tal @@ -80,10 +80,7 @@ ( 4. we also need to store "last started subgroup" on the stack ) ( 5. when backtracking we must rewind to "last started" subgroup ) -%debug { #ff #0e DEO } %emit! { #18 DEO } -%space { #20 emit! } -%newline { #0a emit! } ( now that uxnasm throws errors about writing into the zero page ) ( we have to do something like this to be able to compile library ) @@ -98,10 +95,10 @@ ( using error! will print the given message before causing ) ( the interpreter to halt. ) @errorm ( msg* -> ) - LIT "! emit! space + LIT "! emit! #20 emit! &loop LDAk #00 EQU ?&done LDAk emit! INC2 !&loop - &done POP2 newline #ff0e DEO #010f DEO BRK + &done POP2 #0a emit! #ff0e DEO #010f DEO BRK ( error messages ) @unknown-node-type "unknown 20 "node 20 "type 00