public term, lclyini ; entry points public prtbout, prtnout, csrtype, scrmod, scrseg, scrsync public scroff, scron, atsclr, vtscru, vtscrd, scrloc, trnmod, telmsy public chgdsp, vtroll, crt_lins, crt_cols, getflgs, tv_mode, vtclear ; action verb procedures for keyboard translator public uparrw, dnarrw, rtarr, lfarr, pf1, pf2, pf3, pf4 public kp0, kp1, kp2, kp3, kp4, kp5, kp6, kp7, kp8, kp9 public kpminus, kpcoma, kpenter, kpdot, chrout, cstatus, cquit public cquery, dmpscn, vtans52, vtinit, dnwpg, upwpg, endwnd, homwnd public upone, dnone, trnprs, dumpscr, modlin, modwrt, snull public klogon, klogof, cdos, chang, khold, vtrmac, vtsmac public vtemu, crt_mode, scbattr, refresh, low_rgt ; data public savescr, restscr, pntchr, pntchk, pntflsh ; code include ccsdef.h ; some definitions ; hardware crt_status equ 3dah ; CGA crt status port disp_enb equ 8 ; CGA display enable bit crtmset equ 3D8H ; CGA CRT mode set port screen equ 10h ; Bios screen interrupt biostty equ 0eh ; Bios screen tty write mode ; used in patsclr video equ 10h pmode equ 0 setcur equ 2 readcur equ 3 readch equ 8 writeach equ 9 writech equ 10 wtty equ 14 pstate equ 15 space equ 20h modfrm struc ; format of mode (status) line db 'Esc-chr: ' ; do not write in last column m_echr db 2 dup (?) db ' help: ' m_hlp db 2 dup (?) db '? port:' m_prt db 1 dup (?) db ' speed:' m_baud db 5 dup (?) db ' parity:' m_par db 4 dup (?) db ' echo:' m_echo db 3 dup (?) m_term db 13 dup (' ') ; 13 bytes for term type m_prn db 3 dup (' ') ; show PRN when printer is on modfrm ends cmodfrm struc ; format of mode (status) line db '退出字符: ' ; do not write in last column cm_echr db 2 dup (?) db ' 帮助: ' cm_hlp db 2 dup (?) db '? 端口:' cm_prt db 1 dup (?) db ' 速率: ' cm_baud db 5 dup (?) db ' 校验:' cm_par db 4 dup (?) db ' 回显:' cm_echo db 4 dup (?) cm_term db 13 dup (' ') ; 13 bytes for term type cm_prn db 3 dup (' ') ; show PRN when printer is on cmodfrm ends datas segment public 'datas' extrn flags:byte, mar_top:byte, mar_bot:byte, portval:word extrn filtst:byte, dmpname:byte, kbdflg:byte, rxtable:byte extrn anspflg:byte, tekflg:byte, scroll:byte, ttyact:byte extrn holdscr:byte, taklev:byte, takadr:word, mcctab:byte extrn isccdos:byte ; Jun 25,1990 ; used in patsclr [zqf] currow db 0 ; current cursor position curcol db 0 curtype dw 0 ; current cursor type activepage db 0 ; current active page ; used in SAVCCSCR & RSTCCSCR , Nov.28,1990 [zqf] curpos dw 0 ; save cursor position before save and after restore screen ; used in proc "SAVCCSCR" and "RSTCCSCR" curtyp dw 0 ; save cursor position before save and after restore screen ; used in proc "SAVCCSCR" and "RSTCCSCR" ; stuff for screen routines yflags db 0 ; status flags flags1 db 0 ; internal flags (but used in mszibm) prtscr equ 1 ; print screen pressed inited equ 08h ; been here before vtinited db 0 ; flag for emulator having been inited vtclear db 0 ; nonzero to clear emulator screen cursor dw 0 esc_ch db 0 parmsk db 0 ; 8/7 bit parity mask, for reception argadr dw ? ; address of arg blk vid7id db 'VEGA BIOS Code, ' ; Video 7 Vega version string subset vid7len equ $-vid7id ; length of string vid7id2 db 'Video Seven BIOS Code, ' ; Video 7 VGA board vid7len2 equ $-vid7id2 atiwid db 'ATI EGA Wonder Bios,' ; ATI EGA wonder version string subset atilen equ $-atiwid ; length of string, inc terminator tsngid db 'Tseng' ; Tseng Labs EVA (& Orchid Designer) tsnglen equ $-tsngid evrxid db 'Everex' ; Everex Micro Enhancer Deluxe EGA evrxlen equ $-evrxid evgid db 'VGA EV673' ; Everex EVGA EV-673 evglen equ $-evgid ega_mode db 0 ; non-zero if IBM EGA is in use tvhere equ 0feh ; Topview active query tvsynch equ 0ffh ; Topview resynch request tv_segs dw ? ; Topview virtual screen, segment tv_sego dw ? ; and offset tv_mode db 0 ; flag, 0 = no Topview savadr dw 2 dup (?) ; offset then segment of saved screen savflg dw 0 ; low_rgt at time of screen save ; The following are used to turn the display back on (after scrolling etc.) msets db 2CH,28H,2DH,29H,2AH,2EH,1EH,29H vtemu emulst <> ; emulator flags ansflgs db 0 ; ANSI flags trmtyp db 0 ; most recent terminal type mtty db ' TTY ' ; no terminal type (mode line) fairness dw 0 lincur dw ? ; cursor type save area scbattr db ? ; Screen background attribute oldattr db ? ; screen attributes at init time curattr db ? ; current attribute oldsp dw 0 ; offset to longjmp to for i/o failure temp dw ? ; scratch storage modtemp db 0 ; temp to hold ZUnet modeline status captrtn dw ? ; routine to call for captured output dmphand dw -1 ; screen dump file handle dumplen equ 132 dumpbuf db dumplen dup (?), cr, lf ; 134 byte dump work buffer dumpsep db FF,cr,lf ; screen image separators dmperr db ' Cannot open file to save screen to disk $' cdmperr db ' 无法打开用于保护屏幕的文件$' crlf db cr,lf,'$' flowon db 0 ; flow control chars xon flowoff db 0 ; and xoff (or both null if none) pntmsg db 'Printer not ready, printing request skipped.' pntmsgl equ $-pntmsg ; length of pntmsg cpntmsg db '打印机没有准备好, 放弃打印请求.' cpntmsgl equ $-cpntmsg ; length of pntmsg pntptr dw dumpbuf ; pointer to next free byte in buffer ; some static data for mode line modbuf modfrm <> ; mode line buffer cmodbuf cmodfrm <> ; mode line buffer unkbaud db 'unkwn' ; must be 5 chars cunkbaud db ' 未知' ; must be 5 chars baudn db ' 45.5',' 50 ',' 75 ',' 110 ','134.5',' 150 ',' 300 ',' 600 ' db ' 1200',' 1800',' 2000',' 2400',' 4800',' 9600','19200','38400' db '57.6K','115 K' baudnsiz equ 18 ; # of baud rates known (tbl size / 4) parnams db 'even','mark','none','odd ','spc ' cparnams db ' 偶 ','传号',' 无 ',' 奇 ','间隔' lclmsg db 'loc' clclmsg db '本地' remmsg db 'rem' cremmsg db '远程' portno db ? ; storage for multi-window stuff swidth equ 80 ; max screen width slen equ 24 ; and length of text npages equ 10 ; # of pages of scrolling on each side crt_norm db ? ; video mode for normal screen crt_mode db ? ; video mode (typ 3, must be text) crt_cols db ? ; number of screen columns (typ 80) crt_lins db 24 ; number of screen rows - 1 (typ 24) low_rgt dw ? ; lower right corner of text window ; high = row address (typ 23) ; low = column address (typ 79) inipara dw ? ; initial paragraphs of scroll memory scrsav dw ? ; segment address of save area refresh db 0 ; screen refresh (0=wait for retrace) vtroll db 0 ; auto roll back allowed (0 = no) ; circular buffer for screen roll back. cbuf struc pp dw ? ; place ptr in buffer bend dw ? ; end of buffer orig dw ? ; buffer origin lcnt dw 0 ; # of lines in buffer lmax dw ? ; max lines of buffer cbuf ends twnd cbuf <> ; top screen spill-buffer struct bwnd cbuf <> ; bottom screen spill buffer struct vtrname db 'TERMINALR' ; a macro name, must be Upper Case vtrlen equ $-vtrname vtsname db 'TERMINALS' ; a macro name, must be Upper Case vtslen equ $-vtsname vtmacname dw vtrname ; pointer to selected macro name vtmaclen db vtrlen datas ends