Use alternate terminal buffer.
Original patch provided by Ismael-VC. Thanks!
This commit is contained in:
parent
8082a998a5
commit
408d0267ad
2
femto
2
femto
|
@ -7,7 +7,7 @@
|
||||||
TTY=`stty -g`
|
TTY=`stty -g`
|
||||||
BASE="$HOME/w/nxu"
|
BASE="$HOME/w/nxu"
|
||||||
|
|
||||||
if [ $1 = "-r" ]; then
|
if [ "$1" = "-r" ]; then
|
||||||
shift
|
shift
|
||||||
uxnasm "$BASE/femto.tal" "$BASE/femto.rom"
|
uxnasm "$BASE/femto.tal" "$BASE/femto.rom"
|
||||||
fi
|
fi
|
||||||
|
|
10
femto.tal
10
femto.tal
|
@ -23,6 +23,10 @@
|
||||||
%cr { #0d18 DEO }
|
%cr { #0d18 DEO }
|
||||||
%crlf { cr nl }
|
%crlf { cr nl }
|
||||||
%ansi { #1b18 DEO #5b18 DEO }
|
%ansi { #1b18 DEO #5b18 DEO }
|
||||||
|
%alternate-buffer-on { ( \e[?1049h )
|
||||||
|
ansi #3f18 DEO #3118 DEO #3018 DEO #3418 DEO #3918 DEO #6818 DEO }
|
||||||
|
%alternate-buffer-off { ( \e[?1049l )
|
||||||
|
ansi #3f18 DEO #3118 DEO #3018 DEO #3418 DEO #3918 DEO #6c18 DEO }
|
||||||
|
|
||||||
( emit macros )
|
( emit macros )
|
||||||
( )
|
( )
|
||||||
|
@ -51,6 +55,7 @@
|
||||||
%emit-~ { LIT2 "~ 18 DEO }
|
%emit-~ { LIT2 "~ 18 DEO }
|
||||||
|
|
||||||
%quit! { #01 .System/halt DEO BRK }
|
%quit! { #01 .System/halt DEO BRK }
|
||||||
|
%quit-restore! { alternate-buffer-off quit! }
|
||||||
%lmargin { #0006 }
|
%lmargin { #0006 }
|
||||||
|
|
||||||
( zero page )
|
( zero page )
|
||||||
|
@ -139,6 +144,7 @@
|
||||||
( startup )
|
( startup )
|
||||||
|0100
|
|0100
|
||||||
.Console/type DEI ?{ ;messages/usage print crlf quit! }
|
.Console/type DEI ?{ ;messages/usage print crlf quit! }
|
||||||
|
alternate-buffer-on
|
||||||
|
|
||||||
( init zero page )
|
( init zero page )
|
||||||
#0050 .term/cols STZ2
|
#0050 .term/cols STZ2
|
||||||
|
@ -457,10 +463,10 @@
|
||||||
;messages/unknown-input ;tmp send-message
|
;messages/unknown-input ;tmp send-message
|
||||||
BRK
|
BRK
|
||||||
|
|
||||||
( label that calls quit! )
|
( label that calls quit-restore! )
|
||||||
( )
|
( )
|
||||||
( this definition is needed so the address can be used by JCN2. )
|
( this definition is needed so the address can be used by JCN2. )
|
||||||
@quit-now quit!
|
@quit-now quit-restore!
|
||||||
|
|
||||||
( label that calls BRK )
|
( label that calls BRK )
|
||||||
( )
|
( )
|
||||||
|
|
Loading…
Reference in New Issue