;*************************** AMUS Program Label ****************************** ; Filename: WYSE6V.M68 Date: 11/18/92 ; Category: TDV Hash Code: 434-077-772-277 Version: 1.0(100) ; Initials: GR/AM Name: JAMES A. JARBOE IV ; Company: EDUCATIONAL VIDEO NETWORK, INC. Telephone #: 4092955767 ; Related Files: ; Min. Op. Sys.: 1.3D Expertise Level: BEG ; Special: Get WYSEIV.LST for documentation. ; Description: Wyse 60 native mode terminal driver that supports position ; addressable status lines and AMOS function key translations. See WYSEIV.LST ; for additional information. Assembles to ACEM.TDV ;***************************************************************************** ;*; Updated on 18-Nov-92 at 4:16 AM by James A. Jarboe I V; edit time: 4:08:30 ;*************************************************************************** ; * ; WYSE-60 Terminal Driver * ; * ;*************************************************************************** ; This Wyse driver is designed to make a Wyse 60 Terminal in Wyse 60 mode ; compatible with all Alpha Micro software and third party software products. ; The Wyse-60 terminal in Wyse60 native mode is a MODE terminal. ; See WYSEIV.LST for additional information. ; ; Edit History: ; ;[101] 03-Jan-95 Modified for PC Enhanced keyboard for ASR. ; ;[100] 29-Oct-92 Took the best from all Wyse drivers and put them together ; by James A. Jarboe IV ; Original base was the DMSI Wyse driver by Brett Halle. ; Status line optimization design was by Bob Rubendunst. ; Some other insights and features are from Wyse drivers ; by Mike Lewis, Dave and Lee Pallmann, and other ideas ; taken from Alpha Micro drivers and many Wyse Manuals. ; ; * Supports AMOS function key file translations. ; Wyse function keys are reprogrammed to return same codes as AM65. ; Thus any AM65.??X function key translation file can be copied ; to a WYSE50.??X and the function keys on the Wyse50 will respond ; with appropriate AMOS translation. ; ; -NOTE- ; On the Wyse-60 terminal all function keys are programmable. Therefore ; keypad function keys will return the proper function. ; ; * Provides for an EXECUTE and Shifted-EXECUTE key: ; The INS/REPL key on the top right corner of the ASCII keypad will ; return the EXECUTE key value to programs. Shifted INS/REPL key ; will return Shifted-EXECUTE key value to programs. ; ; * Provides for a HELP and PRINT key. ; The SEND key returns Alpha Micro HELP key value. ; The Shift PRINT key returns Alpha Micro PRINT key value. ; ; * Supports normal and AMOS addressable status lines: ; Host message (top status) 80 column mode - 48 Host message. ; Unshifted bottom status 80 column mode - 80 Bottom status. ; Host message (top status) 132 column mode - 100 Host message. ; Unshifted bottom status 132 column mode - 132 Bottom status. ; Shifted status lines are ignored. ; ; -NOTE- ; In order to handle addressable status lines, this driver uses a large ; impure area. If your specific sight calls for a situation where the ; terminal driver must be changed to accomodate different terminals, such ; as a modem set up, ALWAYS use this driver as the driver attached to the ; specific TRMDEF statement at bootup time. This will allocated the larger ; impure area so that changing of drivers can occur without destroying ; memory because of initially using a smaller impure area. ; ;*************************************************************************** ; * ; S Y M B O L I C S * ; * ;*************************************************************************** ; ASMMSG "==== Wyse 60 Terminal Driver (ACEM.TDV) ====" SEARCH SYS ; System symbolics. SEARCH SYSSYM ; System symbolics. SEARCH TRM ; Terminal symbolics. OBJNAM ACEM.TDV ; Target driver name. ASMMSG " " PAGE ;*************************************************************************** ; * ; C O N S T A N T V A L U E S * ; * ;*************************************************************************** ; TDVFLG = 0 ; Terminal feature flag. STSOFF = 32. ; Top status line size offset. YES = -1 ; Logical true. NO = 0 ; Logical false. BRIGHT = YES ; Bright bottom status line attribute. DIM = NO ; Dim Bottom status line attribute. SPACE$ = 32. ; Space character. ESC = 27. ; Escape character. PAGE ;*************************************************************************** ; * ; C O N D I T I O N A L A S S E M B L Y F L A G S * ; * ;*************************************************************************** ; ; Change the following flag values for appropriate feature before assembly. ; YES will set the option. ; NO will eliminate the option. ; AMOSFK = YES ; AMOS Function key support? ; YES will provide AMOS values. ; NO will provide WYSE values. LOCKBD = YES ; Lock keyboard on bootup? TOPMSG = BRIGHT ; Top terminal field. TOPHST = BRIGHT ; Top Host field. BOTSTS = BRIGHT ; Initial bottom status attribute. PAGE ;*************************************************************************** ; * ; M A C R O ' S * ; * ;*************************************************************************** ; ; Define terminal flag values. ; DEFINE HAS FLG TDVFLG = TDVFLG+FLG ENDM ; Define terminal does not have flag values. ; DEFINE HASNO FLG TDVFLG = TDVFLG ENDM ; Define initialization string. ; DEFINE DOINI STR,SIZ MOV #SIZ, D3 ; Set size of string. LEA A6,STR ; Index string. MOV A6, D1 ; Set string address. TRMBFQ ; Output string. ENDM ; Define change any key value. ; DEFINE CHGKEY KEY, SEQ, NOESC IF NB,NOESC ; If no escape use no escape. BYTE 233,'Z,'1, KEY, SEQ,177 ; Reprogram key. IFF ; If escape use espape. BYTE 233,'Z,'1, KEY, 33, SEQ,177 ; Reprogram key. ENDC ENDM PAGE ;*************************************************************************** ; * ; T E R M I N A L C A P A B I L I T Y F L A G S * ; * ;*************************************************************************** ; Set terminal capability flags. ; HAS indicates the terminal has the feature. ; HASNO indicates the terminal does NOT have the feature. ; HAS TD$ALP ; Alternate page HAS TD$AMS ; Alpha Micro terminal (Fake it) HASNO TD$BLF ; Block Fill HAS TD$BLN ; Blink HASNO TD$BOX ; Box commands. HAS TD$CID ; Character insert/delete. HASNO TD$CLR ; Color HAS TD$DIM ; Dim HAS TD$EOL ; Erase to End of line HAS TD$EOS ; Erase to end of screen HASNO TD$EXT ; Support for 8-bit char. HASNO TD$KID ; Column insert/delete. HAS TD$LID ; Line insert/delete. HAS TD$MOD ; Mode terminal (hidden attributes) HAS TD$MLT ; Function keys. HAS TD$NSP ; No space attributes. HASNO TD$PHR ; AM70 color commands. HAS TD$PRT ; Printer support. HAS TD$RVA ; Reverse video. HAS TD$SMT ; Smooth scrolling. HAS TD$SPL ; Split screen. HAS TD$STS ; Status lines. HAS TD$UND ; Underscore. HAS TD$132 ; 132 column support. HASNO TD$GRA ; Full graphics support. HAS TD$VRC ; Variable rows/columns. HASNO TD$PRO ; Proportionally spaced text. HASNO TD$GRY ; Monochrome gray-scale capability. PAGE ;*************************************************************************** ; * ; D R I V E R I M P U R E A R E A * ; * ;*************************************************************************** ; .OFINI .OFDEF TI.WID, 2 ; Current terminal width. .OFDEF TI.ROW, 2 ; Current terminal rows. .OFDEF TI.STA, 2 ; Current output state. TO$NOR = 0 ; Normal output. TO$FLG = 2 ; Received an action state. ; The following are embedded output sub-command bytes after TI$IDC flag ; is passed via output routine. ; TO$IGN = 4 ; Ignoring status line. TO$MIN = TO$IGN ; Minimum embedded command value. TO$ADR = 6 ; Processing status line address. TO$ATF = 10 ; Processing terminal att field. TO$MAX = TO$ATF ; Max embedded command value. ; End of embedded sub-commands. ; All following states are subsequent to receiving an embedded command byte. ; TO$STS = 12 ; Processing rest of status line. TO$ATT = 14 ; Processing terminal att type. ; The following are flags to denote which status area is being processed. ; TI$BSL = 40 ; Processing bottom status line. TI$HMF = 100 ; Processing host message field. TI%BSL = 5 ; Processing bottom status line. TI%HMF = 6 ; Processing host message field. .OFDEF TI.LIN, 4 ; Pointer to leadin code to display. .OFDEF TI.PTR, 4 ; Pointer to current status line. .OFDEF TI.POS, 1 ; Current position in status line. .OFDEF TI.SLZ, 1 ; Size of current status line S..STL = 132. ; Size of status line buffer. .OFDEF TI.BSL, S..STL ; Bottom status line buffer. S..TSL = S..STL-STSOFF ; Size of top status line buffer. .OFDEF TI.TSL, S..TSL ; Top status line buffer. ; Wyse60 100 max char w/non hidden. .OFSIZ ; Size of impure area in bytes. S..IMP=&^H0FFFFE ; Even up impure area size. TI$IDC = 377 ; Indicator character value. PAGE ;*************************************************************************** ; * ; W Y S E 6 0 T E R M I N A L D R I V E R * ; * ;*************************************************************************** ;******************** ;* WYSE60 * ;******************** ;Terminal driver communications area. ; WYSE60: WORD TD$NEW!TD$TCH ; Terminal attributes. BR JMPINP ; Input routine. BR JMPOUT ; Output routine. BR ECHO ; Echo routine. BR JMPCRT ; Crt control. BR JMPINI ; INIT routine. WORD ; Impure area. ROWCNT: BYTE 24. ; Number of rows. BYTE 80. ; Number of columns. LWORD TDVFLG ; Terminal flags. BR JMPTCH ; TRMCHR routine. JMPINP: JMP INP ; Go handle input characters. JMPOUT: JMP OUT ; Go handle output characters. JMPCRT: JMP CRT ; Go handle TCRT codes JMPINI: JMP INI ; Go handle init routine. JMPTCH: JMP TCH ; Go handle TRMCHR call. PAGE ;**************** ; ECHO * ;**************** ; Special echo processing is performed here. ; Rubouts will backspace and erase the previous character. ; Control-U will erase the entire line by backspacing and erasing. ; ECHO: CMPB D1, #25 ; Control-U? BEQ CTRLU ; Yes, do it. CMPB D1,#177 ; Rubout? JNE ECHX ; Yes, do it. ; Rubouts are handled by the old backspace-and-erase game. ; Special handling must be performed if we are rubbing out a TAB. ; D6 contains the character being rubbed out. ; RUBOUT: CMPB D6, #11 ; Are we rubbing out a TAB? BEQ 20$ ; Yes, special handling required. CMPB D6, #40 ; Control character? BLO 5$ ; Yes... ; Rubout was of a printable character - queue up the backspace sequence. ; MOV #3, D3 ; Set character count. LEA A6, 10$ ; Get buffer address. MOV A6, D1 ; Set it into proper register. TRMBFQ ; Queue it up for output... 5$: RTN ; All done. 10$: BYTE 10,40,10,0 ; Rubout was of a tab... ; We must calculate how big the TAB was and backup over it. ; 20$: CLR D3 ; Preclear D3. MOVW T.POB(A5), D3 ; Set beginning position count. MOV T.ICC(A5), D2 ; Set input character count. MOV T.IBF(A5), A6 ; Set input buffer base. 30$: SUB #1, D2 ; Done with scan? BMI 70$ ; Yes. MOVB (A6)+, D1 ; Scan forward calculating position. CMPB D1, #11 ; TAB? BEQ 50$ ; Yes. CMPB D1, #15 ; Carriage return? BEQ 60$ ; Yes. CMPB D1, #33 ; Escape? BEQ 40$ ; Yes. CMPB D1, #32. ; Control character? BLO 30$ ; Yes. CMPB D1, #172 ; Non-printable character? BHI 30$ ; Yes. 40$: ADD #1, D3 ; Bump position for one character. BR 30$ ; Go process another character. 50$: ADD #8., D3 ; Adjust position for TAB. AND #^C<7>, D3 ; Adjust modulo 8. BR 30$ ; Go process some more. 60$: CLR D3 ; Clear position for CR. BR 30$ ; Go process more characters. 70$: COM D3 ; Complement value to get remainder. AND #7, D3 ; Compute for last TAB. ADD #1, D3 ; Adjust for base 0. MOV #8., D1 ; Set immediate backspace character. TRMBFQ ; Queue the backspaces. RTN ; All done. ; Echo a control-U by erasing the entire line. ; CTRLU: TST D6 ; Anything to erase? BEQ ECHX ; No. No action neccessary. CLR D3 ; Yes, preclear D3. MOVW T.POO(A5), D3 ; Get current output position. SUBW T.POB(A5), D3 ; Subtract beginning position. BEQ ECHX ; Nothing to erase. CMP D3, T.ILS(A5) ; Line to erase > terminal width? BLOS 10$ ; No, erase it. MOV T.ILS(A5), D3 ; Yes, don't erase more than width. 10$: MOV #8., D1 ; Get immediate backspace character. TRMBFQ ; Backup. ASL D1, #2 ; Clever way to get a space character. TRMBFQ ; Blank-out the line. MOV #8., D1 ; Get backspace character. TRMBFQ ; Backup. ECHX: RTN ; Return to caller - all done. PAGE ;**************** ; INP * ;**************** ; Input character processing subroutine. ; ; Return a negative flag to indicate possible multi-byte key codes. ; Detect a negative flag which indicates the multi-byte processing return. ; INP: BMI 20$ ; Skip if multi-byte processing. CMPB D1, #1 ; Function code? BEQ 10$ ; Yes - could be multi-byte sequence. CMPB D1, #33 ; Escape? BEQ 10$ ; Yes - could be multi-byte sequence. LCC #0 ; No - normal processing. RTN ; All done. 10$: LCC #PS.N ; Possible multi-byte - return N flag. RTN ; All done. ; Multi-byte processing is done here. ; This occurs when TRMSER has accumulated all bytes of a multi-byte keystroke ; D0 contains the character count and A0 indexes the data string ; A5 indexes the terminal definition block and must be preserved ; The translated character must be returned in D1 for storage ; ; This routine may destroy only A0,A3,A6,D0,D6,D7 ; 20$: MOVB (A0)+, D1 ; Get the first character. SUBB #1, D0 ; No translation if single character. BEQ 43$ ; We're done. CMPB D1, #1 ; Function sequences start with SOH. BEQ 50$ ; Function sequence. ; Escape sequences are translated directly by setting bit 7 on. ; This will cause them to map to 240-377. ; MOVB (A0)+, D1 ; Get the second character. 30$: ORB #200, D1 ; Set bit 7 on. BR 60$ ; Go do special translations. ; Finish up multi-key processing. ; Be sure to set proper flags. ; 40$: BIT #T$XLT, T.STS(A5) ; Translation active? BEQ 45$ ; No - set proper flags. 43$: LCC #0 ; Yes - set proper flags. 45$: RTN ; Return to caller. ; Function codes require additional translation so that they become 200-237. ; 50$: MOVB (A0)+, D1 ; Get the second character. SUBB #'@, D1 ; Offset so that F1 becomes 0 BR 30$ ; and go finish up. ; Come here if program is not doing translation and we must do our own. ; 60$: LEA A6, XLTTBL ; Index the translation table. 70$: MOVB (A6)+, D7 ; Get character. BEQ 40$ ; End of table - ignore the character. CMPB D1, D7 ; Is it in the table? BEQ 80$ ; Yes. ADD #1, A6 ; No - bypass translation. BR 70$ ; Loop for more. ; Come here to translate the character. ; 80$: MOVB @A6, D1 ; Translate the character. ;; BR 40$ ; We're done. CMPB D1,#200 ; Test for function key char sequence. BHI 40$ ; Yes.. test for external translation. BR 43$ ; No.. leave ^E,^R,^T,^F,^D as is. ; Translation table. ; Currently none as all Wyse60 function keys are reprogrammed for AMOS ; at INIT routine. ; XLTTBL: BYTE 000,000 PAGE ;**************** ; OUT * ;**************** ; Output character processing subroutine. ; Handle status line display processing. ; special attention has been paid to making this code as efficient as possible ; Conditional branches are designed to NOT be taken the majority of the time ; to reduce cache misses. ; ASMMSG " --> Addressable Status Line support " ASMMSG " --> Proper terminal attribute support " ; OUT: MOV T.IMP(A5), A6 ; Index the terminal impure area. MOVW TI.STA(A6),D7 ; Get output state. MOVW TOTBL[~D7],D7 ; Set offset. JMP TOTBL[~D7] ; Dispatch to proper routine. DEFINE TWORD ARG = WORD ARG-.TBASE TOTBL: .TBASE = TOTBL TWORD TO.NOR ; Normal processing. TWORD TO.FLG ; Received special processing flag. TWORD TO.IGN ; Ignore output until finished. 0 TWORD TO.ADR ; Address status line. 2 TWORD TO.ATF ; Address terminal attribute 4 TWORD TO.STS ; Process status lines. TWORD TO.ATT ; Process terminal attribute. ; Normal state - waiting for action flag byte (-1) ; TO.NOR: CMPB D1, #TI$IDC ; Special character passed? BEQ 10$ ; Yes..process it. ANDB #177,D1 ; No..strip to 7 data. LCC #PS.N ; Set normal processing. RTN ; Return. 10$: MOVW #TO$FLG,TI.STA(A6) ; Set recv'd special process flag. CLR D1 ; CC Z cleared as well. RTN ; Return. ; We are in Flag recvd state - pickup sub-offset & possible flags to process. ; TO.FLG: CLR D7 ; Pre-clear. MOVB D1,D7 ; Replicate flag & displacement. ANDB #^C<1!TI$HMF!TI$BSL>,D7 ; Toss possible field flags, ; and make it even. CMPB D7,#TO$MAX ; Is it a legal function? BHI 10$ ; No..kibosh this command! MOVW D7,TI.STA(A6) ; Yes..set new state. SUBB #TO$MIN,D7 ; Adjust embedded command value. BPL 20$ ; Data adjusted ok. 10$: MOVW #TO$NOR,TI.STA(A6) ; Else return to normal mode. RTN ; Return. 20$: CMPB D7,#TO$MAX-TO$MIN ; Are we within legal jump range? BHI 10$ ; No..back to normal mode. MOVW FLGOP[~D7],D7 ; Get offset. JMP FLGOP[~D7] ; Dispatch to it. FLGOP: .TBASE = FLGOP TWORD FLIGN ; Ignore this call. TWORD FLADR ; Set up status line buffer. TWORD FLATT ; Set up attributes command. ; Set up status line parameters and current status line size. ; FLADR: CLR D7 MOVB TI.WID(A6),D7 ; Get size of lines. BTST #TI%HMF,D1 ; Is this host message field? BEQ 10$ ; No..process bottom status. SUBB #STSOFF, D7 ; Yes..offset to top status size. PEA TI.TSL(A6) ; Push address of status line. PEA TSTLLD ; Index top status line leadin code. [103] BR 20$ ; Next process. 10$: PEA TI.BSL(A6) ; Push address of bottom status line. PEA BSTLLD ; Index bottom status line leadin. [103] 20$: MOVB D7,TI.SLZ(A6) ; Set current status line size. CLRB TI.POS(A6) ; Clear addressable position. POP TI.LIN(A6) ; Save address of leadin codes. POP TI.PTR(A6) ; Save address of status line. CLR D1 ; Throw away this character. RTN ; Return. ; These subcommands require no pre-processing other than to toss the ; embedded command byte. ; FLATT: FLIGN: CLR D1 ; Throw away this byte. RTN ; Return. ; Process addressable field for status line position output. ; TO.ADR: SUBB #32., D1 ; Adjust address parameter to index. BPL 10$ ; Positive value ? CLRB D1 ; No..Negative value, set to zero. [102] 10$: MOVB TI.SLZ(A6), D7 ; Get size of current status line. CMPB D1,D7 ; Is position within bounds? BLOS 20$ ; Yes..process it. MOVB D7,D1 ; No..set highest address. 20$: MOVB D1, TI.POS(A6) ; Set new position. MOVW #TO$STS,TI.STA(A6) ; Set to recv status line state. CLR D1 ; Toss data. RTN ; Return. ; Ignore output to terminal until CR or DEL. ; TO.IGN: ANDB #177,D1 ; Strip to ASCII. CMPB D1, #13. ; Yes, carriage return? BEQ 10$ ; Yes, we're done. CMPB D1, #177 ; No, DEL code? BEQ 10$ ; No, ignore this character. CLR D1 RTN 10$: MOVW #TO$NOR,TI.STA(A6) ; Back to normal state. CLR D1 RTN ; Buffer status line bytes to memory buffer until CR or DEL recvd. ; TO.STS: ANDB #177,D1 ; Strip to ASCII. CMPB D1, #177 ; Is this a DEL code? BEQ 30$ ; Yes..done. CMPB D1, #32. ; Outputting a control character? BHIS 10$ ; No. CMPB D1, #13. ; carriage return? BEQ 30$ ; Yes, done. CMPB D1, #30. ; Dim on or off (31.,30.)? [102] BHIS 20$ ; Yes, ignore them. [102] MOVB #32., D1 ; No, output a space instead. 10$: MOV T.IMP(A5), A6 ; Index the impure area. CLR D7 ; Preclear D7. MOVB TI.POS(A6), D7 ; Get the output position. CMPB D7,TI.SLZ(A6) ; Is position to high? BHIS 20$ ; Yes..too high. ADDB #1, TI.POS(A6) ; Bump output position. MOV TI.PTR(A6),A6 ; Index current status line. MOVB D1, 0(A6)[D7] ; Set character in proper position. 20$: CLR D1 ; Toss character. RTN ; Return. ; Output the status line buffered in memory. ; 30$: MOVW #TO$NOR,TI.STA(A6) ; Set new state. CLR D1 ; Preclear D1. MOVB TI.SLZ(A6), D1 ; Get width of terminal in chars. SAVE A0, A2, A3, D2 ; Save registers. [103] CLR D2 ; Clear space character counter. [103] ; Set up output to proper status line. (Top or bottom as set). ; MOV TI.PTR(A6),A2 ; Index the text. MOV TI.LIN(A6),A0 ; Index leadin sequence. MOV T.IMP(A5), A6 ; Index the impure area. [103] ; Start output to status line. ; Handle output backwards to use of QINS! ; ESCSEQ-text-spaces-CR becomes CR,spaces,text,ESCSEQ ; 35$: TST D1 ; Null message? BEQ 37$ ; Yes, bypass it. LEA A3, T.OQX(A5) ; Index the output queue. QINS A3 ; Insert a queue block. MOV D1, 4(A3) ; Set output count. MOV A2, 10(A3) ; Set address. 37$: LEA A3, T.OQX(A5) ; Index the output queue. QINS A3 ; Insert a queue block. MOV #S..SLD, 4(A3) ; Set output count. MOV A0, 10(A3) ; Set address. REST A0, A2, A3, D2 ; Restore registers. ;; MOV T.IDV(A5), A6 ; Index the interface driver. [102] ;; CMP -4(A6), #<[AM3]_16.>![50 ] ; Dealing with AM350? [102] ;; BNE 40$ ; No. [102] ;; CLR D0 ; Yes, make sure D0 := 0. [102] 40$: CLR D1 ; Toss any character. RTN ; Return. ; Set Wyse's terminal attribute field which is addressed different from ; standard AMOS. ; AMOS WYSE ; Text area 0 0 ; Terminal message field 1 2 <-This is recvd and translated. ; Top status line 2 3 <-This is recvd and translated. ; TO.ATF: MOV D1,D7 ; Dup the field byte. CLR D1 ; Pre-clear. SUBB #'0,D7 ; Colapse state. BMI 10$ ; Bogus field - back to normal! MOVB D7,D1 ; Get back clean 32 bit version. PUSH A6 ; Save ptr to impure. LEA A6,TFXLT ; Index field translate. MOVB 0(A6)[~D1],D1 ; Get new byte. POP A6 ; Restore impure pointer. MOVW #TO$ATT,TI.STA(A6) ; Goto next state. LCC #PS.N ; Flag normal processing. RTN ; Return. 10$: MOVW #TO$NOR,TI.STA(A6) ; Set normal state. LCC #0 ; RTN ; TO.ATT: CMPB D1,#'0 ; Is it fill area attributes? BHIS 30$ ; Yes-use as is. CMPB D1,#30. ; Is it dim or dim off? BLO 20$ ; No..do straight dif xlate. BNE 10$ ; It is dim off - use normal. MOVB #'0,D1 ; Subtract 0 for not dim. BR 30$ ; Process.. 10$: MOVB #'p,D1 ; Set WYSE's dim. BR 30$ ; Process. 20$: ADDB #'0-1,D1 ; Translate to WYSE field. 30$: MOVW #TO$NOR,TI.STA(A6) ; Goto next state. LCC #PS.N ; Flag normal processing. RTN ; Return. ; Status line leadin characters. ; BSTLLD: BYTE 233, 'z, '( ; Bottom status line leadin. TSTLLD: BYTE 0, 233, 'F ; Top status line leadin. ; ALPHA to WYSE translation tables for terminal attributes. ; TFXLT: BYTE '0,'2,'3 ; translate alpha's fields to WYSE EVEN S..SLD = 3 ; Status line leadin size. PAGE ;******************** ;* INI * ;******************** ;Handle initialization of the terminal ; INI: MOV T.IMP(A5), A6 ; Index the impure area. CMP -(A6),#<[PSE]_16.>+[UDO]; Is it the pseudo interface driver? JEQ 10$ ; Yes - no initialization wanted. CMP QFREE,#12. ; Are there at least 12 queue blocks? JLO 10$ ; No - skip the initialization. SAVE D1,D3 ; Save registers DOINI INISTR, INISIZ ; Process string. SLEEP #2500. ; Wait for reset to complete. DOINI FNTSTR, FNTSIZ ; Download font characters SLEEP #4000. ; Wait.. DOINI FNTST1, FNTSZ1 ; Download font characters. SLEEP #4000. ; Wait. DOINI INIST1, INISZ1 ; Process string. SLEEP #5000. ; Wait for reset to complete. DOINI INIST2, INISZ2 ; Process string. SLEEP #5000. ; Wait for reset to complete. DOINI INIST3, INISZ3 ; Process string. SLEEP #4000. ; Sleep, redefine takes some time. MOV SYSTEM, D7 ; Get system flags. AND #SY$UP, D7 ; Is system up? BNE 5$ ; Yes..ignore boot message. DOINI SYSBOT, SYSBSZ ; Show system bootin message. SLEEP #2500. 5$: REST D1,D3 ; Restore registers. ; Clear the top status line buffer with spaces. ; 10$: MOV T.IMP(A5),A6 ; Index impure area. LEA A6, TI.TSL(A6) ; Index top status line buffer. MOV #S..TSL-1, D6 ; Get size of status line buffer. 15$: MOVB #32., (A6)+ ; Fill with space. DBF D6, 15$ ; Do it all. ; Clear the bottom status line buffer with spaces. ; MOV T.IMP(A5), A6 ; Index the impure area. LEA A6, TI.BSL(A6) ; Index the bottom status line buffer. MOV #S..STL-1, D6 ; Get size of status line buffer. 20$: MOVB #32., (A6)+ ; Fill with space. DBF D6, 20$ ; Do it all. ; All done ; 90$: MOV T.IMP(A5), A6 ; Index the impure area. MOVW #80., TI.WID(A6) ; Reset to 80 columns. MOVW #24., TI.ROW(A6) ; Reset to 24 rows. MOVW #TO$NOR, TI.STA(A6) ; Set output state. RTN ; Return. ;Initialization string - program special characters ; INISTR: ; BYTE ESC,'~,'4 ; Ensure Wyse60. BYTE ESC,'e,'( ; Ensure 24 rows. BYTE ESC,'`,'8 ; Screen off IF NE, TOPMSG ASMMSG " --> Bright Terminal message " BYTE ESC,'A,'2,'8 ; Bright term message field. IFF ASMMSG " --> Dim Terminal message " BYTE ESC,'A,'2,'x ; Dim term message field. ENDC IF NE, TOPHST ASMMSG " --> Bright host message" BYTE ESC,'A,'3,'8 ; Bright message field. IFF ASMMSG " --> Dim Host message field" BYTE ESC,'A,'3,'x ENDC BYTE ESC,'w,'J ; Divide into two pages. IF NE, BOTSTS ASMMSG " --> Bright Bottom Status line" BYTE ESC,'A,'1,'0 ; Bright bottom status line. IFF ASMMSG " --> Dim Bottom Status line" BYTE ESC,'A,'1,'p ; Dim bottomstatus line. ENDC INISIZ=.-INISTR FNTSTR: ; End of line character. ; BYTE '[-'@ ASCII /cA111/ ASCII /000002060E1E3E7E3E1E0E0602000000/ BYTE 'Y-'@ ; Tab marker character. ; BYTE '[-'@ ASCII /cA11A/ ASCII /000002022232FAFEFA32220202000000/ BYTE 'Y-'@ ; Up arrow character. ; BYTE '[-'@ ASCII /cA118/ ASCII /000010387CFE38383838383838380000/ BYTE 'Y-'@ ; Down Arrow character. ; BYTE '[-'@ ASCII /cA119/ ASCII /003838383838383838FE7C3810000000/ BYTE 'Y-'@ ; Paragraph character. ; BYTE '[-'@ ASCII /cA114/ ASCII /00007E92929292927E12121212000000/ BYTE 'Y-'@ FNTSIZ=.-FNTSTR EVEN FNTST1: ; Tradmark character. ; BYTE '[-'@ ASCII /cA11E/ ASCII /00FE1010101010C6AA92828282000000/ BYTE 'Y-'@ ; Section character ; BYTE '[-'@ ASCII /cA115/ ASCII /007C8282407884423C0482827C000000/ BYTE 'Y-'@ ; Copyright character. ; BYTE '[-'@ ASCII /cA113/ ASCII /007C829EA2A2A2A2A2A29E827C000000/ BYTE 'Y-'@ ; Register character. ; BYTE '[-'@ ASCII /cA112/ ASCII /007C8282BAAABAB2AAAA82827C000000/ BYTE 'Y-'@ ; Dagger character. ; BYTE '[-'@ ASCII /cA117/ ASCII /00101010FE1010101010101010000000/ BYTE 'Y-'@ FNTSZ1=.-FNTST1 EVEN ; Reprogram function keys to emulate AlphaMicro AM65 function key sequence. ; This will enable the user to copy an exising AM65 function key translation ; file and have full function of the translation file. TERMINAL MUST BE ; TURNED ON FOR THE FOLLOWING TO LOAD. ; Example: ; COPY WYSE60.AMX=AM65.AMX ; Alphamicro line editor funkey file. ; COPY WYSE60.WRX=AM65.WRX ; AlphaWrite function key file. ; COPY WYSE60.DMX=AM65.DMX ; ESP function key file. ; INIST1: BYTE 233,'+ ; Clear all to spaces. BYTE 233,'`,': ; Set into 80 column mode. BYTE 200,200,200,200,200,200 ; Nulls... BYTE 233,'x,'0 ; Set into normal display format. BYTE 200,200,200,200,200,200 ; Nulls... IF NE,LOCKBD ASMMSG " --> Lock Keyboard on bootup " BYTE 233,'# ; Lock keyboard ENDC IF NE,AMOSFK ; AMOS Function key support. ASMMSG " --> AMOS Function key support" BYTE 233,'z,'@,33,'5,177 ; Set up F1 (unshifted). BYTE 233,'z,'`,33,'7,177 ; Set up F1 (shifted). BYTE 233,'z,'A,33,'4,177 ; Set up F2 (unshifted). BYTE 233,'z,'a,33,'6,177 ; Set up F2 (shifted). BYTE 233,'z,'B,33,'S,177 ; Set up F3 (unshifted). BYTE 233,'z,'b,33,'s,177 ; Set up F3 (shifted). BYTE 233,'z,'C,33,'@,177 ; Set up F4 (unshifted). BYTE 233,'z,'c,33,'P,177 ; Set up F4 (shifted). BYTE 233,'z,'D,01,'@,177 ; Set up F5 (unshifted). BYTE 233,'z,'d,01,'H,177 ; Set up F5 (shifted). BYTE 233,'z,'E,01,'A,177 ; Set up F6 (unshifted). BYTE 233,'z,'e,01,'I,177 ; Set up F6 (shifted). BYTE 233,'z,'F,01,'B,177 ; Set up F7 (unshifted). BYTE 233,'z,'f,01,'J,177 ; Set up F7 (shifted). BYTE 233,'z,'G,01,'C,177 ; Set up F8 (unshifted). BYTE 233,'z,'g,01,'K,177 ; Set up F8 (shifted). BYTE 233,'z,'H,01,'D,177 ; Set up F9 (unshifted). BYTE 233,'z,'h,01,'L,177 ; Set up F9 (shifted). BYTE 233,'z,'I,01,'E,177 ; Set up F10 (unshifted). BYTE 233,'z,'i,01,'M,177 ; Set up F10 (shifted). BYTE 233,'z,'J,01,'F,177 ; Set up F11 (unshifted). BYTE 233,'z,'j,01,'N,177 ; Set up F11 (shifted). BYTE 233,'z,'K,01,'G,177 ; Set up F12 (unshifted). BYTE 233,'z,'k,01,'O,177 ; Set up F12 (shifted). ; Not Needed for PC Enhanced Keyboard. ; ;;; BYTE 233,'z,'L,33,'E,177 ; Set up F13 (unshifted). ;;; BYTE 233,'z,'l,33,'|,177 ; Set up F13 (shifted). ;;; BYTE 233,'z,'M,33,'R,177 ; Set up F14 (unshifted). ;;; BYTE 233,'z,'m,33,'~,177 ; Set up F14 (shifted). ;;; BYTE 233,'z,'N,33,'T,177 ; Set up F15 (unshifted). ;;; BYTE 233,'z,'n,33,'t,177 ; Set up F15 (shifted). ;;; BYTE 233,'z,'O,33,'Y,177 ; Set up F16 (unshifted). ;;; BYTE 233,'z,'o,33,'y,177 ; Set up F16 (shifted). IFF ; If not using AMOS function key translation files and the user creates ; their own function key translation files to adhere to Wyse translations, ; the folllowing will clear Function keys to standard Wyse function key ; translation. Be sure and set AMOSFK = NO and then reassemble this driver. ; ASMMSG " --> Standard Wyse Function keys" BYTE 233, 'z, '@, 0, 177 ; Clear F1. BYTE 233, 'z, '`, 0, 177 ; Clear sF1. BYTE 233, 'z, 'A, 0, 177 ; Clear F2. BYTE 233, 'z, 'a, 0, 177 ; Clear sF2. BYTE 233, 'z, 'B, 0, 177 ; Clear F3. BYTE 233, 'z, 'b, 0, 177 ; Clear sF3. BYTE 233, 'z, 'C, 0, 177 ; Clear F4. BYTE 233, 'z, 'c, 0, 177 ; Clear sF4. BYTE 233, 'z, 'D, 0, 177 ; Clear F5. BYTE 233, 'z, 'd, 0, 177 ; Clear sF5. BYTE 233, 'z, 'E, 0, 177 ; Clear F6. BYTE 233, 'z, 'e, 0, 177 ; Clear sF6. BYTE 233, 'z, 'F, 0, 177 ; Clear F7. BYTE 233, 'z, 'f, 0, 177 ; Clear sF7. BYTE 233, 'z, 'G, 0, 177 ; Clear F8. BYTE 233, 'z, 'g, 0, 177 ; Clear sF8. BYTE 233, 'z, 'H, 0, 177 ; Clear F9. BYTE 233, 'z, 'h, 0, 177 ; Clear sF9. BYTE 233, 'z, 'I, 0, 177 ; Clear F10. BYTE 233, 'z, 'i, 0, 177 ; Clear sF10. BYTE 233, 'z, 'J, 0, 177 ; Clear F11. BYTE 233, 'z, 'j, 0, 177 ; Clear sF11. BYTE 233, 'z, 'K, 0, 177 ; Clear F12. BYTE 233, 'z, 'k, 0, 177 ; Clear sF12. ; Not Needed for PC Enhanced Keyboard. ; ;;; BYTE 233, 'z, 'L, 0, 177 ; Clear F13. ;;; BYTE 233, 'z, 'l, 0, 177 ; Clear sF13. ;;; BYTE 233, 'z, 'M, 0, 177 ; Clear F14. ;;; BYTE 233, 'z, 'm, 0, 177 ; Clear sF14. ;;; BYTE 233, 'z, 'N, 0, 177 ; Clear F15. ;;; BYTE 233, 'z, 'n, 0, 177 ; Clear sF15. ;;; BYTE 233, 'z, 'O, 0, 177 ; Clear F16. ;;; BYTE 233, 'z, 'o, 0, 177 ; Clear sF16. ENDC INISZ1=.-INIST1 EVEN ; These are the redefine key, sequence codes. Redefining keys appears ; to take some time. So they are divided up so they are attacked in ; Two steps with sleep time in between to load the sequences. ; INIST2: CHGKEY '5,'O ; Del Char = <317> CHGKEY '6,'K ; Del Line = <313> ; Will not work as DEL is the terminating sequence. ; and will probably screw up the next key reprogramming. ; ;;; CHGKEY '",177,NOESC ; Bck Spc = delete CHGKEY '\,'E ; End = esc/esc CHGKEY '],'| ; Shift End= <374> (shift F13) INISZ2=.-INIST2 EVEN INIST3: ;;; CHGKEY '7,130 ; Ins = EXECUTE (esc/X) CHGKEY '7,74 ; Ins = EXECUTE <330> CHGKEY '8,'> ; Sft Ins = Shift - EXECUTE CHGKEY 'r,24,NOESC ; Page Dwn = ^T CHGKEY 'w,22,NOESC ; Sft PgDn = ^R CHGKEY ':,22,NOESC ; Page Up = ^R CHGKEY '/,5, NOESC ; Sft Home = ^E BYTE 33,'e,'N ; Auto font loading off. BYTE ESC,'`,'9 ; Screen on INISZ3=.-INIST3 SYSBOT: BYTE ESC, 'F ASCII / System booting - please wait . . ./ BYTE 13. SYSBSZ=.-SYSBOT EVEN PAGE ;******************** ;* TCH * ;******************** ;Handle TRMCHR call ;A1 points to argument block, A2 indexes this TDV, D2 contains flags ; ;Can only use A1,A2,A6,D1,D2,D6,D7 ; TCH: MOV TD.FLG(A2),TC.FLG(A1) ; Return flags. MOV JOBCUR,A6 ; Index JCB. MOV JOBTRM(A6),A6 ; Index TRMDEF block. MOV T.IMP(A6),A6 ; Index impure area. CLR D6 ; Preclear register. MOVW TI.ROW(A6), TC.ROW(A1) ; Get row count. MOVW TI.WID(A6), TC.COL(A1) ; Transfer column count. CLRW TC.CLR(A1) ; no colors MOVW TI.WID(A6), D6 ; Get column count. MOVW D6, TC.USL(A1) ; Set as unshifted status length. SUBW #31., D6 ; Offset top status line size. MOVW D6, TC.TSL(A1) ; Set top status length CLRW TC.SSL(A1) ; set length of shifted status line [104] MOV D2,D7 ; get TRMCHR argument flags [104] AND #TC$BMP,D7 ; does user want bitmap? [104] BEQ 20$ ; no - skip bitmap transfer code [104] ; User has requested bitmap -- return it. ; PUSH A1 ; save argument block index [104] ADDW #TC.BMP,A1 ; index bitmap return area [104] LEA A6,TCHBMP ; index our bitmap [104] MOV #<256./16.>-1,D7 ; get amount to transfer [104] 10$: MOVW (A6)+,(A1)+ ; transfer to user [104] DBF D7,10$ ; loop until done [104] POP A1 ; restore register [104] 20$: RTN ; return to TRMCHR monitor routine [104] ;Define feature bitmap [104] ; TCHBMP: BYTE ^B11111111 ; 0 - 7 BYTE ^B11111111 ; 8 - 15 BYTE ^B11111111 ; 16 - 23 BYTE ^B11111001 ; 24 - 31 (no horiz or vert pos) BYTE ^B11111111 ; 32 - 39 BYTE ^B11111111 ; 40 - 47 BYTE ^B01111111 ; 48 - 55 BYTE ^B11100011 ; 56 - 63 (no vertical split) BYTE ^B11111111 ; 64 - 71 BYTE ^B11111111 ; 72 - 79 BYTE ^B01001111 ; 80 - 87 (no alternate page) BYTE ^B10000000 ; 88 - 95 BYTE ^B11111111 ; 96 - 103 BYTE ^B11111111 ; 104 - 111 (no non-space attributes) BYTE ^B11111111 ; 112 - 119 (no non-space attributes) BYTE ^B00001111 ; 120 - 127 (spare) BYTE ^B00000111 ; 128 - 135 (no AM-70 style color) BYTE ^B00000000 ; 136 - 143 BYTE ^B00000000 ; 144 - 151 BYTE ^B00000000 ; 152 - 159 BYTE ^B11111000 ; 160 - 167 BYTE ^B11111111 ; 168 - 175 BYTE ^B11000000 ; 176 - 183 BYTE ^B00000000 ; 184 - 191 BYTE ^B00000000 ; 192 - 199 BYTE ^B00000000 ; 200 - 207 BYTE ^B00000000 ; 208 - 215 BYTE ^B00000000 ; 216 - 223 BYTE ^B00000000 ; 224 - 231 BYTE ^B00000000 ; 232 - 239 BYTE ^B00000000 ; 240 - 247 BYTE ^B00000000 ; 248 - 255 EVEN PAGE ;******************** ;* CRT * ;******************** ;Special crt control processing. ; ; D1 contains the control code for x,t positioning or special commands. ; ; If D1 is positive, do screen positioning (hi byte = row, lo byte = col). ; If D1 is negative, do special command (low byte = code). ; CRT: TSTW D1 ; Is it cursor position? BMI CRTS ; No..process special TCRT. ; Do cursor positioning - D1 contains X,Y coordinates. ; Use short form addressing whenever possible. ; MOV T.IMP(A5),A6 ; Index the terminal impure area. CMPW TI.WID(A6),#80. ; Extended form addressing needed? JNE CRT132 ; Yes..special cursor addressing. ; Cursor positioning - D1 contains x,y coordinates. ; TTYI ; Send cursor position command. BYTE ESC,75,0,0 ; ADD #17437,D1 ; Add position offsets. ROR D1,#8. ; Send row first. TTY ROL D1,#8. ; Send column second. TTY RTN ; Return. CRT132: TTYI ; Send cursor position. BYTE ESC,'a,0 ; EVEN ; PUSHW D1 ; Save row/col CLR D1 ; Clear MOVB 1(SP), D1 ; Get row. AND #377,D1 ; Strip it. DCVT 0,OT$TRM ; Output row. MOVB #'R, D1 ; Setup row indicator. TTY ; Output row indicator. POPW D1 ; Restore row/col. AND #377,D1 ; Get just col. DCVT 0,OT$TRM ; Output row. MOVB #'C, D1 ; Set up column indicator. TTY ; Output indicator. RTN ; Return to caller. ; Special commands - D1 contains the command code in the low byte. ; CRTS: CMPW D1, #177400 ; Is it a -1 in the high byte? JLO CRTMSC ; No - must be another command. CMPB D1,#80. ; Set to wide format? BEQ CRTWID ; Yes - special handling. CMPB D1,#81. ; Set to normal format? BEQ CRTNOR ; Yes - special handling. CMPB D1,#175. ; Is it set time? JEQ SETTIM AND #377,D1 ; Strip the high byte. BNE CRTU ; and branch unless clear screen. TTYI ; Special case for clear screen. BYTE ESC,';,0 ; Clear screen. EVEN CRTZ: RTN ; Return to caller. ; Command processing per director tables. ; CRTU: PUSH A2 ; Save A2. CMP D1,#</2> ; Check for valid code. BHI CRTX ; Bypass if bad. LEA A2,CRCA-2 ; Index the table. ADD D1,A2 ; Add command code. ADD D1,A2 ; Twice. MOVW @A2,D1 ; Pick up data field offset. ADD D1,A2 ; Make absolute data address. TTYL @A2 ; Print the data field. CRTX: POP A2 ; Restore A2. RTN ; Set terminal to normal format. ; CRTNOR: TTYI BYTE 33,'`,':,0 ; Output normal screen sequence. EVEN MOV #80.,D1 ; Get the new width. BR WIDSET ; Go store it. ; Set terminal to wide format. ; CRTWID: TTYI BYTE 33,'`,';,0 ; Output wide screen sequence. EVEN MOV #132.,D1 ; Get new width. WIDSET: MOV T.IMP(A5),A6 ; Index impure area. MOVW D1,TI.WID(A6) ; Store the new width. SLEEP #5000. ; Pause while command completes. RTN ; Miscellaneous CRT settings. ; CRTMSC: CMPW D1,#-5._8. ; Is it -5? BHIS VARROW ; Yes..set variable row. BR CRTZ ; No - ignore command. ; Set variable rows. ; VARROW: LEA A6, ROWTBL ; Index available rows. 10$: MOVW (A6)+, D6 ; Get next set. BEQ 15$ ; Opps..no more in this set. CMPB D1, D6 ; Use exact wierd length? BEQ 20$ ; Yes..use it. BR 10$ ; No..try next set. 15$: MOVW (A6)+, D6 ; Get next set. CMPB D1, D6 ; Use standard long? BHIS 20$ ; Yes..set standard long. MOVW (A6)+, D6 ; Standard short is all that is left. 20$: MOVW D6, D1 ; Get argument in high byte. ANDW #^H00FF, D6 ; Mask off argument. MOV T.IMP(A5), A6 ; Index impure area. MOVW D6, TI.ROW(A6) ; Set rows into impure area. TTYI ; Output beginning sequence. BYTE 33, 'e, 0 EVEN LSRW D1, #8. ; Get next sequence character. TTY ; Output it. SLEEP #2000. ; Sleep while we switch. RTN ROWTBL: ; Since these two extra lengths disable the status line you must specifically ; ask for them. ; BYTE 43., '+ ; 43 lines per screen. BYTE 25., ') ; 25 lines per screen. BYTE 0, 0 ; End of this set. ; These two lengths are standard long and short. These will be used if ; length is equal or shorter or longer. ; BYTE 42., '* ; 42 lines per screen. BYTE 24., '( ; 24 lines per screen. BYTE 0,0 ; End of this set. EVEN ; Set Wyse clock. ; SETTIM: TTYI ; Output set time sequence. BYTE 233,'c,'8,0 GTIMES D1 ; Get current time. SWAP D1 ; Get hour minute into low word. PUSHW D1 ; Save hour minute. CLR D1 ; Clear MOVB @SP, D1 ; Get hour. DCVT 2, OT$TRM ; Output it in decimal. MOVB 1(SP), D1 ; Get minute. DCVT 2, OT$TRM ; Output it in decimal. POPW D1 ; Restore reg. RTN ; Return. ; Byte offset and data tables follow for all commands. ; CRCA: WORD C01-.,C02-.,C03-.,C04-.,C05-.,C06-.,C07-.,C08-.,C09-.,C10-. WORD C11-.,C12-.,C13-.,C14-.,C15-.,C16-.,C17-.,C18-.,C19-.,C20-. WORD C21-.,C22-.,C23-.,C24-.,C25-.,C26-.,C27-.,C28-.,C29-.,C30-. WORD C31-.,C32-.,C33-.,C34-.,C35-.,C36-.,C37-.,C38-.,C39-.,C40-. WORD C41-.,C42-.,C43-.,C44-.,C45-.,C46-.,C47-.,C48-.,C49-.,C50-. WORD C51-.,C52-.,C53-.,C54-.,C55-.,C56-.,C57-.,C58-.,C59-.,C60-. WORD C61-.,C62-.,C63-.,C64-.,C65-.,C66-.,C67-.,C68-.,C69-.,C70-. WORD C71-.,C72-.,C73-.,C74-.,C75-.,C76-.,C77-.,C78-.,C79-.,C80-. WORD C81-.,C82-.,C83-.,C84-.,C85-.,C86-.,C87-.,C88-.,C89-.,C90-. WORD C91-.,C92-.,C93-.,C94-.,C95-.,C96-.,C97-.,C98-.,C99-.,C100-. WORD C101-.,C102-.,C103-.,C104-.,C105-.,C106-.,C107-.,C108-.,C109-.,C110-. WORD C111-.,C112-.,C113-.,C114-.,C115-.,C116-.,C117-.,C118-.,C119-.,C120-. WORD C121-.,C122-.,C123-.,C124-.,C125-.,C126-.,C127-.,C128-.,C129-.,C130-. WORD C131-.,C132-.,C133-.,C134-.,C135-.,C136-.,C137-.,C138-.,C139-.,C140-. WORD C141-.,C142-.,C143-.,C144-.,C145-.,C146-.,C147-.,C148-.,C149-.,C150-. WORD C151-.,C152-.,C153-.,C154-.,C155-.,C156-.,C157-.,C158-.,C159-.,C160-. WORD C161-.,C162-.,C163-.,C164-.,C165-.,C166-.,C167-.,C168-.,C169-. WORD C170-.,C171-.,C172-.,C173-.,C174-.,C175-.,C176-.,C177-.,C178-.,C179-. WORD C180-.,C181-.,C182-.,C183-.,C184-.,C185-. CRCB: ; C01: BYTE 36,0 ; Cursor home. C02: BYTE 215,0 ; Cursor return. C03: BYTE 13,0 ; Cursor up. C04: BYTE 12,0 ; Cursor down. C05: BYTE 10,0 ; Cursor left. C06: BYTE 14,0 ; Cursor right. C07: BYTE ESC,43,0 ; Lock keyboard. C08: BYTE ESC,42,0 ; Unlock keyboard. C09: BYTE ESC,124,0 ; Erase to end of line. C10: BYTE ESC,131,0 ; Erase to end of screen. C11: BYTE ESC,51,0 ; Protect field. C12: BYTE ESC,50,0 ; Unprotect field. C13: BYTE ESC,46,0 ; Enable protected fields. C14: BYTE ESC,47,0 ; Disable protected fields. C15: BYTE ESC,'R,0 ; Del line. C16: BYTE ESC,'E,0 ; Ins line. C17: BYTE ESC,'W,0 ; Del char. C18: BYTE ESC,'Q,0 ; Ins char. C19: BYTE 233, 'b, 0 ; Read Cursor at address. C20: BYTE 233, 'M, 0 ; Read character at Current position. C21: BYTE 40,ESC,'G,'2,0,0 ; Blink on. C22: BYTE ESC,'G,'0,40,0,0 ; Blink off. C23: ; Start line Drawing. C24: ; End line Drawing. C25: ; Set horizontal position. C26: BYTE 0 ; Set vertical position. C27: BYTE 233,'A,TI$IDC,TO$ATF,0,0 ; Set terminal attributes. C28: BYTE ESC,'`,'1,0 ; Cursor on. C29: BYTE ESC,'`,'0,0 ; Cursor off. C30: BYTE 40,ESC,'G,'8,0,0 ; Underscore on. C31: BYTE ESC,'G,'0,40,0,0 ; Underscore off. C32: BYTE 40,ESC,'G,'4,0,0 ; Reverse video on. C33: BYTE ESC,'G,'0,40,0 ; Reverse video off. C34: BYTE 40,233, 'G, '6, 0,0 ; Start rev/blink. C35: BYTE 233, 'G, '0, 40,0,0 ; End rev/blink. C36: BYTE ESC,'`,'8,0 ; Screen off. C37: BYTE ESC,'`,'9,0 ; Screen on. C38: BYTE ESC,'H,'2,0 ; Top left corner. C39: BYTE ESC,'H,'3,0 ; Top right corner. C40: BYTE ESC,'H,'1,0 ; Bottom left corner. C41: BYTE ESC,'H,'5,0 ; Bottom right corner. C42: BYTE ESC,'H,'0,0 ; Top intersection. C43: BYTE ESC,'H,'9,0 ; Right intersection. C44: BYTE ESC,'H,'4,0 ; Left intersection. C45: BYTE ESC,'H,'=,0 ; Bottom intersection. C46: BYTE ESC,'H,':,0 ; Horizontal line. C47: BYTE ESC,'H,'6,0 ; Vertical line. C48: BYTE ESC,'H,'8,0 ; Center intersection. C49: BYTE ESC,'H,'7,0 ; Solid block. C50: BYTE ESC,'H,';,0 ; Slant block. C51: BYTE ESC,'H,'?,0 ; Cross-hatch block. C52: BYTE ESC,'H,'<,0 ; Double line horizontal. C53: BYTE ESC,'H,'>,0 ; Double line vertical. C54: BYTE TI$IDC, TI$BSL!, 0,0 C55: BYTE TI$IDC, TO$IGN, 0,0 C56: BYTE ESC,'x,'0,0 ; Set normal display format (no clear). C57: BYTE ESC,'x,'1,0 ; Set horiz split (follow with row). C58: ; Set vertical split (39 char columns. C59: ; Set vertical split (40 char columns. C60: BYTE 0 ; Set vertical split col to next char. C61: BYTE ESC,'],0,0 ; Activate split segment 0. C62: BYTE ESC,'},0,0 ; Activate split segment 1. C63: BYTE TI$IDC,TI$HMF!, 0,0 C64: BYTE ESC,'c,'E,ESC,'H,^H18,ESC,'c,'D,0 ; Up-arrow. C65: BYTE ESC,'c,'E,ESC,'H,^H19,ESC,'c,'D,0 ; Down-arrow. C66: BYTE ESC,'c,'E,^H79,ESC,'c,'D,0 ; Raised dot. C67: BYTE ESC,'c,'E,ESC,'H,^H11,ESC,'c,'D,0 ; End of line marker. C68: BYTE ESC,'c,'E,ESC,'H,^H1A,ESC,'c,'D,0 ; Horizontal tab symbol. C69: BYTE ESC,'c,'E,ESC,'H,^H14,ESC,'c,'D,0 ; Paragraph. C70: BYTE ESC,'c,'E,ESC,'H,^H17,ESC,'c,'D,0 ; Dagger. C71: BYTE ESC,'c,'E,ESC,'H,^H15,ESC,'c,'D,0 ; Section. C72: BYTE ESC,'c,'E,ESC,'H,^H1B,ESC,'c,'D,0 ; Cent sign. C73: BYTE ESC,'c,'E,^H2C,ESC,'c,'D,0 ; One-quarter. C74: BYTE ESC,'c,'E,^H2B,ESC,'c,'D,0 ; One-half. C75: BYTE ESC,'c,'E,^H78,ESC,'c,'D,0 ; Degree. C76: BYTE ESC,'c,'E,ESC,'H,^H1E,ESC,'c,'D,0 ; Trademark. C77: BYTE ESC,'c,'E,ESC,'H,^H13,ESC,'c,'D,0 ; Copyright. C78: BYTE ESC,'c,'E,ESC,'H,^H12,ESC,'c,'D,0 ; Registered. C79: BYTE 233,'P ; Print screen. C80: ; Reserved for set to wide mode. C81: ; Reserved for set to normal mode. C82: BYTE 33,'d,'#,0 ; Wyse60 enter transparent print mode. C83: BYTE 'T-'@,0 ; Exit transparent print mode. C84: ; Begin writing to alternate page. C85: BYTE 0 ; End writing to alternate page. C86: BYTE ESC,'K,0,0 ; Toggle page. C87: ; Copy to alternate page. C88: ; Insert column. C89: ; Delete column. C90: ; Block fill with attribute. C91: ; Block fill with character. C92: ; Draw a box. C93: ; Scroll box up one line. C94: BYTE 0 ; Scroll box down one line. C95: BYTE 233,'`,'@, 0 ; Select jump scroll. C96: BYTE 233,'`,'?, 0 ; Select fast smooth scroll. C97: BYTE 233,'`,'>, 0 ; Select med-fast smooth scroll. C98: BYTE 233,'`,'=, 0 ; Select med-slow smooth scroll. C99: BYTE 233,'`,'<, 0 ; Select slow smooth scroll. C100: BYTE 40,33,'G,':,0,0 ; Start underscore/blink. C101: BYTE 33,'G,'0,40,0,0 ; End underscore/blink. C102: BYTE 40,33,'G,'<,0,0 ; Start underscore/reverse. C103: BYTE 33,'G,'0,40,0,0 ; End underscore/reverse. C104: BYTE 40,33,'G,'>,0,0 ; Start underscore/reverse/blink. C105: BYTE 33,'G,'0,40,0,0 ; End underscore/reverse/blink. C106: BYTE 33,'G,'8,0 ; Start underscore w/o space. C107: BYTE 33,'G,'0,0 ; End underscore w/o space. C108: BYTE 33,'G,'4,0 ; Start reverse w/o space. C109: BYTE 33,'G,'0,0 ; End reverse w/o space. C110: BYTE 33,'G,'6,0 ; Start reverse/blinking w/o space. C111: BYTE 33,'G,'0,0 ; End reverse/blinking w/o space. C112: BYTE 33,'G,':,0 ; Start underscore/blinking w/o space. C113: BYTE 33,'G,'0,0 ; End underscore/blinking w/o space. C114: BYTE 33,'G,'<,0 ; Start underscore/reverse w/o space. C115: BYTE 33,'G,'0,0 ; End underscore/reverse w/o space. C116: BYTE 33,'G,'>,0 ; Start underscore/reverse/blink w/o .pace C117: BYTE 33,'G,'0,0 ; End underscore/reverse/blink w/o sp.ce C118: BYTE 33,'G,'2,0 ; Start blink w/o space. C119: BYTE 33,'G,'0,0 ; End blink w/o space. C120: BYTE ESC,'`,'5,0 ; Set cursor to blinking block. C121: BYTE ESC,'`,'2,0 ; Set cursor to steady block. C122: BYTE ESC,'`,'3,0 ; Set cursor to blinking underline. C123: BYTE ESC,'`,'4,0 ; Set cursor to steady underline. C124: ; SPARE. C125: ; SPARE. C126: ; SPARE. C127: BYTE 0 ; SPARE. C128: BYTE TI$IDC,TI$HMF!,32.,0 ; Select top status line w/o addr. C129: BYTE 177,0 ; End status line. C130: BYTE TI$IDC,TI$BSL!,32.,0 ; Select unshifted status line w/o. C131: BYTE TI$IDC,,0,0 ; Select shifted status line w/o addr. C132: ; Select black text. C133: ; Select white text. C134: ; Select blue text. C135: ; Select magenta text. C136: ; Select red text. C137: ; Select yellow text. C138: ; Select green text. C139: ; Select cyan text. C140: ; Select black reverse text. C141: ; Select white reverse text. C142: ; Select blue reverse text. C143: ; Select magenta reverse text. C144: ; Select red reverse text. C145: ; Select yellow reverse text. C146: ; Select green reverse text. C147: ; Select cyan reverse text. C148: ; Save a rectangular area. C149: ; Restore rectangular area. C150: ; Select graphics mode. C151: ; Unselect graphics mode. C152: ; Draw box w/round corners. C153: ; Draw window box. C154: ; Draw box w/double lines. C155: ; Enable bitmap font. C156: ; Disable bitmap font. C157: ; Select color palette using RGB. C158: ; Enable graphics cursor. C159: ; Disable graphics cursor. C160: ; Set graphics cursor style. C161: ; Inquire graphics cursor position. C162: BYTE 0 ; set graphics cursor region. C163: BYTE 33,'H,12.,0 ; Form feed symbol. C164: BYTE 33,'H,10.,0 ; Line feed symbol. C165: BYTE 33,'c,'E,ESC,'H,^H11,33,'c,'D,0 ; New line symbol. C166: BYTE 33,'H,11.,0 ; Vertical tab symbol. C167: BYTE 33,'c,'E,^H71,33,'c,'D,0 ; display plus or minus symbol. C168: BYTE 33,'c,'E,^H72,33,'c,'D,0 ; >= symbol. C169: BYTE 33,'c,'E,^H73,33,'c,'D,0 ; <= symbol. C170: BYTE 33,'c,'E,^H58,33,'c,'D,0 ; display not equal symbol. C171: BYTE 33,'c,'E,33,'H,^H1C,33,'c,'D,0 ; UK pound symbol. C172: BYTE 33,'c,'E,^H63,33,'c,'D,0 ; display pi symbol. C173: BYTE 'R&37,0 ; Aux print on. C174: BYTE 'T&37,0 ; Aux print off. C175: ; Reserved for set terminal clock. C176: ; Reserved for set terminal calendar. C177: ; Select color palette using HLS. C178: ; Select PC character set. C179: ; Select default char set. C180: ; Select PC emulation mode. C181: BYTE 0 ; Select normal emulation mode. C182: BYTE 33,'e,'9,0 ; Select aux interface port. C183: BYTE 33,'e,'8,0 ; Select main interface port. C184: ; Toggle interface port. C185: BYTE 0 ; Select 161 column mode. EVEN ASMMSG " " END END END .