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`
|
||||
BASE="$HOME/w/nxu"
|
||||
|
||||
if [ $1 = "-r" ]; then
|
||||
if [ "$1" = "-r" ]; then
|
||||
shift
|
||||
uxnasm "$BASE/femto.tal" "$BASE/femto.rom"
|
||||
fi
|
||||
|
|
12
femto.tal
12
femto.tal
|
@ -23,6 +23,10 @@
|
|||
%cr { #0d18 DEO }
|
||||
%crlf { cr nl }
|
||||
%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 )
|
||||
( )
|
||||
|
@ -51,6 +55,7 @@
|
|||
%emit-~ { LIT2 "~ 18 DEO }
|
||||
|
||||
%quit! { #01 .System/halt DEO BRK }
|
||||
%quit-restore! { alternate-buffer-off quit! }
|
||||
%lmargin { #0006 }
|
||||
|
||||
( zero page )
|
||||
|
@ -138,7 +143,8 @@
|
|||
|
||||
( startup )
|
||||
|0100
|
||||
.Console/type DEI ?{ ;messages/usage print crlf quit! }
|
||||
.Console/type DEI ?{ ;messages/usage print crlf quit! }
|
||||
alternate-buffer-on
|
||||
|
||||
( init zero page )
|
||||
#0050 .term/cols STZ2
|
||||
|
@ -457,10 +463,10 @@
|
|||
;messages/unknown-input ;tmp send-message
|
||||
BRK
|
||||
|
||||
( label that calls quit! )
|
||||
( label that calls quit-restore! )
|
||||
( )
|
||||
( this definition is needed so the address can be used by JCN2. )
|
||||
@quit-now quit!
|
||||
@quit-now quit-restore!
|
||||
|
||||
( label that calls BRK )
|
||||
( )
|
||||
|
|
Loading…
Reference in New Issue