w( NZDEC MAC B NZWYS60 MAC | WS4PAT HEX* WS4PAT INFF2sWS4PAT TXTxJ> ; NZTCAP: VT100.MAC ; Author: Joe Wright ; Date: 12 October 87 ; Version: 1.0 ; New Z3 Termcap for the DEC VT-100 ; Data is from the DEC terminal manual ; Tested on Wyse-60 in VT-100 emulation mode ESC EQU 27 ; Escape character ; ; NEW Z TERMINAL CAPABILITIES DATA ; NZTCAP: DB 'VT-100 ' ; Name of terminal (15 chars) TRMTYP: DB 8 ; Identify ANSII (DEC) terminal ; ; No single character arrow keys on VT-100, use WordStar diamond. ; DB 'E'-'@' ; Cursor up DB 'X'-'@' ; Cursor down DB 'D'-'@' ; Cursor right DB 'S'-'@' ; Cursor left ; ; Wyse doesn't need delays ; DB 00 ; Cl delay DB 00 ; Cm delay DB 00 ; Ce delay ; ; Strings start here. ; DB ESC,'[H',ESC,'[J',0 ; CL string DB ESC,'[%I%D;%DH',0 ; CM string DB ESC,'[K',0 ; CE string DB ESC,'[0m',0 ; SO string DB ESC,'[1m',0 ; SE string DB 0 ; TI string DB 0 ; TE string ; ; Extensions to Standard TCAP ; DB ESC,'[M',0 ; Line Delete DB ESC,'[L',0 ; Line Insert DB ESC,'[%R%D;%Dm',0 ; Set Attributes DB 0 ; Read Cursor DB 0 ; Read Line ; ; FILL UNUSED SPACE WITH NULLS ; REPT 128-($-NZTCAP) DB 0 ENDM END ; ; End of NZTCAP for DEC VT-100  ; NZTCAP: NZWYS60.MAC ; Author: Joe Wright ; Date: 12 October 87 ; Version: 1.0 ; Extended Termcap Data for NZ ; This is the proposed TermCap Data for the New Z-System. ; It more fully describes the terminal and its capabilities. ; It remains compatible with VLIB but offers added features. ; This particular TCAP is used by the ON! computer. ESC EQU 27 ; ASCII escape character NZTCAP: DB 'WYSE-60 ' ; Name of terminal (15 bytes) ; ; It is often desirable to differentiate terminals with other than ; their commands. For example TeleVideo 955 has the same command ; set as Wyse 60 but takes less time to initialize (reset). ; Also, it might be interesting to know whether this is an ASCII ; or an ANSI terminal. The Terminal Type byte is implemented for ; this purpose. Current usage allows 8 ASCII terminal types and ; 8 ANSI types as follows: ; ; Type 0 TeleVideo 925/950 ; Type 1 TeleVideo 955 Requires 2 seconds for reset ; Type 2 Wyse 60 Requires 9 seconds for reset ; Type 3 ..Unassigned ; ... ; ; Type 16 DEC VT-100 ; Type 17 DEC VT-220 ; ... ; DB 2 ; Term type (Wyse 60) ; DB 'K'-'@' ; Cursor up DB 'J'-'@' ; Cursor down DB 'L'-'@' ; Cursor right DB 'H'-'@' ; Cursor left DB 00 ; Cl delay DB 00 ; Cm delay DB 00 ; Ce delay DB ESC,'+',0 ; Cl string DB ESC,'=%+ %+ ',0 ; Cm string DB ESC,'T',0 ; Ce string DB ESC,')',0 ; So string DB ESC,'(',0 ; Se string DB 0 ; Ti string DB 0 ; Te string ; ; Extensions to Standard Z3TCAP not supported by VLIB ; Full-screen editors (WordStar) can use the following three ; for speed and clarity. ; DB ESC,'R',0 ; Line Delete DB ESC,'E',0 ; Line Insert DB ESC,'G',0 ; Set Attributes ; ; Some terminals allow reading the cursor position and the screen itself. ; DB ESC,'?',0 ; Read Cursor DB ESC,'6',0 ; Read Line ; ; Fill unused space with nulls ; REPT 96-($-NZTCAP) DB 0 ENDM ; ; The ON! bios implements a filter or TRAP in the CONOUT routine to prevent ; undesirable codes from reaching the terminal. The ESC character is trapped ; and not sent immediately. The bios then looks at the following character ; and compares it to those in the following table. If a match is found, ; both the ESC and the following character are sent to the terminal. Other- ; wise the ESC is not sent. This will prevent the terminal from being ; 're-programmed' by modem noise or by 'typing' a .COM file. ; ; The TRAP itself is programmable: ; ; ESC ESC 0 Will turn the trap OFF ; ESC ESC 1 Will turn the trap ON ; ; Also, if the first character of the following string is 00h, TRAP is OFF. ; ; Second character of valid escape sequences with trap ON (15 max) ; DB '=' ; Cursor positioning DB '(' ; Write protect off DB ')' ; Write protect on DB '+' ; Clear screen DB 'E' ; Line insert DB 'R' ; Line delete DB 'T' ; Erase to end of line DB 'Y' ; Erase to end of screen DB 'G' ; Video attributes DB 0 ; End of list ; ; Fill unused space with nulls ; REPT 112-($-NZTCAP) DB 0 ENDM ; ; Similar to the ESC trap, when the bios receives a control code it will ; check for it in this table and trap it if there is no match. ; If the first character of this string is 00h or if the trap is OFF, ; all control codes will be sent. ; ; Valid control characters with trap ON (15 max) ; DB 'G'-40H ; Bell DB 'H'-40H ; Left DB 'J'-40H ; Line feed/down DB 'K'-40H ; Up DB 'L'-40H ; Right DB 'M'-40H ; Carriage return DB 'V'-40H ; Down DB 'Z'-40H ; Clear screen DB 0 ; End of list ; ; Fill unused space with nulls ; REPT 128-($-NZTCAP) DB 0 ENDM ; END ; ; End of NZTCAP ; :010295000068 :010297000165 :10029B0000010301400D020B420301410D020B4B08 :1002AB000301420D020B430301430D020B560301E5 :1002BB00440D020B590301450D0211460301460D76 :1002CB000211410301470D010C0301480D020B44C0 :1002DB000301490D020B5103014A0D061146100D86 :1002EB000D0D03014B0D081146100D0D420D0400B1 :0202FB00000001 :0B031F001850FF0014050B0344454C70 :02032C00013D91 :04033200033C423E08 :04033700033C4B3EFA :01033C002B95 :100342005A4350523320556E6976657273616C2040 :0B0352005465726D696E616C0D0A004D :03036A00021B3D36 :02036F0000008C :010374000088 :1003790000202000C353090000C90000C9031A1B4B :01038900294A :010397000065 :03039C00021B54ED :0103A100005B :0303A600021B52E5 :0303AB00021B45ED :0403B00005FF8603BC :0303B600021B28FF :1003BB00C396080000C979A847E6BB67CA090A3A81 :1003CB00500AB7CA090A1100003EBBA1CA0C043A75 :1003DB002103B7C2F0031E047CE6083E00C20C04E6 :1003EB001E07C30C047CE603CAFA033E02B35F7C10 :1003FB00E6B2CA04043E04B35F7CE608CA0C043EB2 :10040B0008B35F21510ACD4D093A2103B7CA090A36 :09041B007BC630CD8002C3090A42 :10044100FF0000D007D007E803C800C800F401325C :0A045100000000C90000C90000C946 :1006BB004A6F652057726967687420537065636968 :0E06CB00616C2031312F32302F38370D0A008C :1006E3004142434445464748494A4B4C4D4E4F507F :1006F30000200057534D53475320204F5652005765 :100703005348454C5020204F5652FF005753494EF3 :100713004445582058434C00575320202020202084 :100723004F56520057535052494E54204F56520081 :100733005753202020202020434F4D005753534828 :0B0743004F5254204F565200025457F2 :04075800FF0100009D :10075F0042414B244224244124244324434F4D4FF0 :09076F00563F52454C243F3F0067 :100784003F3F3F3F3F3F3F3F3F3F3FFFFF504153CE :1007940001FF504C4903FF43202003FF482020035E :0607A400FF000000070049 :1007BE00000000000000FFE07FFFFFE07FFFFFE092 :1007CE00000000000000FFE07FFFFFE07FFFFFE082 :1007DE00FF92FBC33F00FFDEFFFFFFFFFFFFFFFEA9 :1007EE00FF92FBC33F00FFDEFFFFFFFFFFFFFFFE99 :0107FE0000FA :100807000308420100FF1C02020708FFFF02000C59 :10081700080C0A03080141000B060B10151A1F24C8 :10082700292E33380000000000000000000000FF00 :0E0837004B00FFFF0100F40104181008081028 :10084900202020202020FF2D050000FFFFFFFFFFB3 :1008590000FF0000010200000000002C2E00000033 :1008690000FF0000FF04112D2D2C2D2D2D2C2D2DD9 :080879002D2C2D2D2D2E3939F7 :10089400640A2A09017CB5CA2B09EB218F00193E91 :1008A40010AEC2AC08322103EB1197001911860374 :1008B4000E00D513CD1A0922610ACD2409E5CD24F1 :1008C40009CD1A09E1D17912119C03CD0F09114008 :1008D4000ACD0F0911300ACD0F09CD4D0911B60308 :1008E400CD0F0911A603CD0F0911AB03CD0F0911CB :1008F400500ACD0F092A0901112C00197E21E306A3 :1009040006417023043DC2060977C9D5130E00CDF4 :100914001A09D17912C97E2312B7C8130CC31A0954 :100924007E23B7C22409C9213409CD4D09C300006F :10093400204E6F7420496E7374616C6C656420661C :100944006F72205A4350523300C5CD5709C1C9EBC9 :100954002A610AAF32600A7E23B7C8FE5CCAB609B0 :10096400FE25CA6F09CD8002C35B097E23FE61DACE :100974007D09FE7BD27D09E65FFE44CAC909FE32C9 :10098400CAC909FE33CAC909FE49CAC109FE52CA05 :10099400BB09FE2ECAAC09FE4ECAB209FE2BC25BCD :1009A400097E23835AC369093A600AC3A709AFC3FE :1009B40069097E23C369097A535FC35B09AF3C327B :1009C400600AC35B09E6073D473A600A835A160189 :1009D40005CAE20905CADD09150664CDEE09060A51 :1009E400CDEE094FCD000AC35B090E0090DAF80979 :1009F4000CC3F0098047C2000A7AB7C81479C6301C :100A0400CD800278C93E44A0C879E644CA2A0AFEC9 :100A140044CA2A0AFE40CA240A3A4104B7C22A0A2E :0F0A240021310AC34D0921410AC34D09021B2884 :030A4000021B296D :030A5000021B473F :070A60000000000A0B14570F :00000001FF  :1008E400CD0F0911A603CD0F0911AB03CD0F0911CB :1008F400500ACD0F092A0901112C This is the header section of WS4PAT.MAC. The .HEX file is released today for your use and comments. The source is not available yet. I have been reading of the problems involving the ZCPR3 shell stack. This patch does not address that at all. If we determine that WS4 could solve the problem itself, I will put the necessary code in the next WS4PAT. ; Overlay: WS4PAT.MAC ; Author: Joe Wright ; Date: 20 November 87 ; Version: 1.0 VERS EQU 10 ; Release MONTH EQU 11 ; November DAY EQU 20 ; 20th YEAR EQU 87 ; 1987 ; The purpose of this overlay is to provide a generic ZCPR3 version of ; WordStar which will not require specific terminal installation but will ; take its lead from the TCAP. NZTCAP is expanded to include all (and more) ; that WordStar requires for its operation. ; Based on PATCH.LST in the WordStar 4.0 release, this overlay installs ; all but Printer patches. All new code is at EXTRA. MORPAT and CRTPAT ; areas are unused and therefore still available for small patches. ; Assemble WS4PAT.MAC to a .HEX file with SLRMAC and overlay your current ; WS.COM with it as follows: ; MLOAD WSZ.COM=WS.COM,WS4PAT.HEX ; The overlay supports video attributes of the TeleVideo 955 and Wyse 60. ; It was tested only superficially for VT-100, using the Wyse 60 in VT-100 ; emulation mode. ; This overlay expects a ZCPR3 system with extended NZTCAP. All the code ; at VIDATT: and EXTRA: is my own. Before running WordStar with this ; overlay, you must create and install a NZTCAP for your terminal. I have ; provided an example here for TeleVideo 955 and the file NZWYS60.MAC ; as prototypes for your NZTCAP. If you run it with your normal TCAP, ; WordStar will not know how to do LINE INSERT and LINE DELETE functions ; and will slow a little and paint the screen more. ;---------------------------------------------------- ; ; NZCPR TERMINAL CAPABILITIES DATA ; In order determine specific terminals without regard to the ascii name, ; we now use the last byte of the name field as a 'type' byte. Until now, ; the types are assigned as follows: ; ; ASCII types (0-15) ; ; TeleVideo 955 00h ; TeleVideo 925 01h ; Wyse 60 02h ; Wyse 50 03h ; ; ANSI types (16-31) ; ; VT-100 10h ; ; WS4PAT simply looks at bit 4 to determine ASCII or ANSI types. ; ;NZTCAP: ; DB 'TVI-955 ' ; Name of terminal (Always 15 characters) ; DB 0 ; ASCII type (TeleVideo 955) ; DB 'K'-'@' ; Cursor up ; DB 'J'-'@' ; Cursor down (re-programmed from ^V) ; DB 'L'-'@' ; Cursor right ; DB 'H'-'@' ; Cursor left ; DB 0 ; CL delay ; DB 0 ; CM delay ; DB 0 ; CE delay ; DB ESC,'+',0 ; CL string 1st (NZTCAP+17H) ; DB ESC,'=%+ %+ ',0 ; CM string 2nd ; DB ESC,'T',0 ; CE string 3rd ; DB ESC,')',0 ; SO string 4th ; DB ESC,'(',0 ; SE string 5th ; DB 0 ; TI string 6th ; DB 0 ; TE string 7th ; ; Extensions to Standard Z3TCAP ; ; DB ESC,'R',0 ; Line Delete 8th ; DB ESC,'E',0 ; Line Insert 9th ; DB ESC,'G',0 ; Set Attributes 10th ; ; FILL UNUSED SPACE WITH NULLS ; ; REPT 128-($-NZTCAP) ; DB 0 ; ENDM ;---------------------------------------------------- ; ; WS4PAT will treat the full complement of TeleVideo functions and attributes. ; Any of the functions may be omitted (replaced with null) with the exception ; of the CM (Cursor Movement) string. WordStar will work around any other ; missing capabilities if your particular terminal doesn't support them. ; ; The custom routine POSCUR uses WordStar's cursor position in HL and sends ; the expanded CM string to the terminal. ; ; The CM string in NZTCAP is a macro of sorts. Characters in the string will ; be sent to the terminal as they appear. The special case is the COMMAND ; lead-in character '%'. The character following the '%' indicates the action ; required. Nine commands are supported as follows: ; ; %I Increment Row/Col by 1 (before D, 2, 3 or .) ; %D Send Row/Col as one, two or three ascii digits ; %2 Send Row/Col as two ascii digits ; %3 Send Row/Col as three ascii digits ; %. Send Row/Col as binary ; ; %R Send Col before Row ; %+ Add the next character to Row/Col and send it ; %N Send a NULL (00h) ; ; \ Send the next character literally (except null) ; ; The %N command, new in NZTCAP, allows a null (00h) to be sent to the ; terminal (no nulls are allowed within CM strings). ; ; The \ command permits sending a literal % or \ to the terminal. ; Use '\%' to send the percent sign or '\\' to send backslant. ; ; These commands allow virtually any terminal to be supported by WordStar. ; ; The prototype TeleVideo command is ESC = ROW COL where row and col ; are biased by the space character (20h). The CM string for this in ; assembly language: 1BH,'=%+ %+ ',0 or.. ; ; DB 1BH,'=' ; Lead-in string ; DB '%+ ' ; Send Row + 32 ; DB '%+ ' ; Send Col + 32 ; DB 0 ; Terminate the string (not sent) ; ; The prototype ANSI (VT-100) command is ESC [ ROW ; COL H where row and ; col are ascii decimal digits beginning with 1 rather than 0. The CM string ; for this is: 1BH,'[%I%D;%DH',0 or if you prefer.. ; ; DB 1BH,'[' ; Lead in string ; DB '%I' ; Row/Col begin at 1 instead of 0 ; DB '%D' ; Send Row in decimal ; DB ';' ; Send delimiter ; DB '%D' ; Send Col in decimal ; DB 'H' ; Send trailing H ; DB 0 ; Terminate the string (not sent) ; ; The Hazeltine 1500 is strange enough to demonstrate NZTCAP flexibility. ; The CM string is 7EH,11H,'%R%.%+ ',0 or.. ; ; DB 7EH,11H ; Lead-in string ; DB '%R' ; Reverse Row/Col ; DB '%.' ; Send Col in binary ; DB '%+ ' ; Send Row + 32 ; DB 0 ; Terminate the string (not sent) ; ; In order to use this powerful parser for attribute strings as well as ; CM strings, enter PARSE with HL pointing to the first character of a ; null-terminated string and DE containing the value to be parsed. ; A complex VT-200 SGR string is prototyped as: ; ;SGR: DB ESC,'[%R%D;%Dm',0 ; ; You would clear attributes with the following code. ; ; LXI H,SGR ; LXI D,0 ; CALL PARSE ; ... ; ; The resulting string to the terminal is: ; ; ESC [ 0 ; 0 m ; ; To set the VT-200 to blinking: ; ; LXI H,SGR ; LXI D,4 ; CALL PARSE ; ; The terminal gets: ; ; ESC [ 0 ; 4 m ; ; End of WS4PAT.INF  WS4PA Attribut Test b Jo Wright Thi i WordSta Document I yo ar i No-documen mode pres ^ ^ an re-ente thi fil i Documen mode. WS4PA assign variou printe contro code t termina vide attribute s tha yo ge som ide o ho th tex wil print. Typ ^ ^ t toggl th prin contro display. Bold ^ Thi i ho Bol word look. Underscore ^ Thi i you Underscore. Subscript ^ Thi i subscript. Superscript ^ Thi i superscript. Strikeout ^ Thi i strikeout. Doublestrike ^ Thi i doublestrike. Italics/Color ^ Thi i italics/color. Give TeleVide typ terminal WordSta wil displa it warning/erro message reverse an dim Th choosin o th attribute wa arbitrar Thoughtfu suggestion ar welcome. -30-