;****************************************************************
;* *
;* FREEDOM 100 DataVUE TERMINAL TABLE *
;* *
;* by *
;* *
;* ULTRASCIENCE DIVISION OF GIBBS LABORATORIES *
;* *
;* Copyright Ultrascience 1984 (C) *
;* *
;* 1824 WILMETTE AVE, WILMETTE, IL 60091 *
;* *
;* 312/256-0080 *
;* *
;* REV. 5.1 LAST UPDATE 01/28/85 *
;* *
;****************************************************************
;
; IMPORTANT MESSAGE:
;
; THIS PROGRAM OR ANY PART OF THIS PROGRAM MAY NOT BE COPIED FOR
; PROFIT BY ANYONE OTHER THAN ULTRASCIENCE. ANYONE WISHING TO
; USE THE PROGRAM MAY DO SO AT NO CHARGE, PROVIDED THEY NOTIFY
; ULTRASCIENCE THAT THEY ARE USING THE PROGRAM AND AGREE TO SEND
; INFORMATION ABOUT BUGS OR IMPROVEMENTS TO ULTRASCIENCE. THIS
; BUG AND IMPROVEMENT INFORMATION WILL BE AVAILABLE TO ALL USERS
; OF THE PROGRAM.
;
;
; NOTE: The FRE100.SVX generated from assembling this file must be placed
; in DVR: (DSK0:[1,6]) otherwise SuperVue cannot find it. This file
; will only work if the FRE100.TDV is version 5.1 or later.
;
;
; Edit history:
;
; 06-june-84
; modified from FRE100.M75 (SuperVUE table)
; Operates a Freedom 100 terminal (running
; under driver 5.1 or later) in DataVue.
;
OBJNAM FRE100.DVX
SEARCH SYS
SEARCH TRM
; entry points (jump table)
BR FKPROC ; function key processing
BR FKOPEN ; called on DataVUE entry
BR FKCLSE ; called on DataVUE exit
; Function key enable (set translation flag for driver and disable XON/XOFF)
FKOPEN: JOBIDX ; index our job
MOV JOBTRM(A6),A6 ; get terminal definition pointer
ORW #T$XLT,@A6 ; set translation flag
TTYI ; disable XON/XOFF
BYTE 'N-100,0 ; handshaking
RTN ; get back to DataVue
; Reset translation flag and enable XON/XOFF when DataVue is done.
FKCLSE: JOBIDX ; index our job
MOV JOBTRM(A6),A6 ; get terminal definition area
ANDW #^CT$XLT,@A6 ; clear translation flag
TTYI ; re-enable XON/XOFF
BYTE 'O-100,0 ; handshaking
RTN ; back to DataVue for exit
; on entry
; D0, D2, D3, D4, D5 and A5 must be preserved
; A4 points to impure memory
; A3 points to a routine which inputs one byte from keyboard into D1
; on exit
; D1 contains input character (possibly translated)
FKPROC: TST @A4 ; do we have char waiting for output?
BEQ KBDIT ; no, get fresh one from keyboard
MOV @A4,A1 ; yes, get pointer
TSTB @A1 ; end of string?
BEQ KBDIT ; yes, start fresh from keyboard
MOVB (A1)+,D1 ; pick up the character
JMP UPDPTR ; update string pointer
KBDIT: CALL @A3 ; input a byte
CMPB D1,#']-100 ; dummy character ?
BNE TBLOAD ; no, go process it
CLR D1 ; kill dummy
CLR @A4 ; clear out string pointer
RTN ; get back to DataVue
TBLOAD: LEA A1,FCXLT ; index translation table
FLP: TSTB @A1 ; end of table ?
BEQ KBDIT ; yes, unused function so get another
CMPB D1,(A1)+ ; have we found a match ?
BEQ XLAT ; yes, go do translation
CHKLP: TSTB (A1)+ ; skip this function
BNE CHKLP ; " " "
BR FLP ; check next table entry for match
XLAT: MOVB (A1)+,D1 ; pick up a translated byte
UPDPTR: MOV A1,@A4 ; save updated index to xlat string
RTN ; get back to DataVue