From 33842ca31f1a6b11b037ffb08766167f57fdde59 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Sat, 27 Mar 2021 20:57:03 -0400 Subject: [PATCH] apple III terminal. not usable since 0 is needed for position, which interferes with C-strings. --- Makefile | 4 +++- appleIII.ti | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++ bashrc | 11 +++++++++++ 3 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 appleIII.ti diff --git a/Makefile b/Makefile index 2a69f54..b9f8332 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -SRC = appleIIgs.ti gno-console.ti gsos-console.ti proterm-special.ti +SRC = appleIIgs.ti gno-console.ti gsos-console.ti proterm-special.ti apppleIII.ti .PHONY : install .PHONY : test @@ -9,12 +9,14 @@ test : tic -v10 -N -c gno-console.ti tic -v10 -N -c gsos-console.ti tic -v10 -N -c proterm-special.ti + tic -v10 -N -c appleIII.ti install : tic -v10 -N -s appleIIgs.ti tic -v10 -N -s gno-console.ti tic -v10 -N -s gsos-console.ti tic -v10 -N -s proterm-special.ti + tic -v10 -N -s appleIII.ti all.ti : $(SRC) cat $^ > $@ diff --git a/appleIII.ti b/appleIII.ti new file mode 100644 index 0000000..be0fbfc --- /dev/null +++ b/appleIII.ti @@ -0,0 +1,57 @@ +appleIII|Apple III Console Driver:\ + :co#80:li#24:\ + :NP:am:bw:eo:mi:ms:bs:\ +#beep + :bl=^G:\ +#clear + :cl=^\:\ + :cd=^]:\ + :ce=^_:\ +#cursor motion + :cm=%r^Z%.%.:\ + :ho=^L:\ + :ll=^Z\000\030:\ + :cr=^M:\ +# cursor movement - up, down, left, right. + :up=^K:\ + :do=^J:\ + :le=^H:\ + :nd=^I:\ +# arrow keys + :kl=^H:\ + :kr=^U:\ + :kd=^J:\ + :ku=^K:\ +#inverse/normal + :mb=^R:\ + :md=^R:\ + :me=^Q:\ + :mh=^R:\ + :mr=^R:\ + :so=^R:\ + :se=^Q:\ + :us=^R:\ + :ue=^Q:\ +#initialize / reset +# normal text, cursor visible, reset viewport, 80-column, cursor control, clear + :r1=^Q^E^A^P\002^U=^\:\ + :i1=^Q^E^A^P\002^U=^\:\ +# cursor visibility + :ve=^E:\ + :vi=^F:\ +# backspace key + :kb=\177: +# +# \0 will produce \200, which does not terminate a string but +# behaves as a null character on most terminals, providing CS7 is +# specified. See stty(1). +# +# The reason for this quirk is to maintain binary compatibility of +# the compiled terminfo files with other implementations, e.g., the +# SVr4 systems, which document this. Compiled terminfo files use +# null-terminated strings, with no lengths. Modifying this would +# require a new binary format, which would not work with other +# implementations. +# +# +# ^^^ this interferes with cursor positioning for 0. diff --git a/bashrc b/bashrc index b34fdda..0e3d7ef 100644 --- a/bashrc +++ b/bashrc @@ -40,3 +40,14 @@ if [ _$TERM = "_appleIIe" ]; then bind Control-K:previous-history bind Control-X:unix-line-discard fi + +if [ _$TERM = "_appleIII" ]; then + stty kill ^X # default line kill char is ^U (right arrow) + stty oxtabs cs7 # expand tabs to spaces, 7-bit text. + + bind Control-H:backward-char + bind Control-U:forward-char + bind Control-J:next-history + bind Control-K:previous-history + bind Control-X:unix-line-discard +fi