home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / ccdos / ccyibm.dat < prev    next >
Text File  |  2020-01-01  |  10KB  |  209 lines

  1.  
  2.         public  term, lclyini                           ; entry points
  3.         public  prtbout, prtnout, csrtype, scrmod, scrseg, scrsync
  4.         public  scroff, scron, atsclr, vtscru, vtscrd, scrloc, trnmod, telmsy
  5.         public  chgdsp, vtroll, crt_lins, crt_cols, getflgs, tv_mode, vtclear
  6.                         ; action verb procedures for keyboard translator
  7.         public  uparrw, dnarrw, rtarr, lfarr, pf1, pf2, pf3, pf4
  8.         public  kp0, kp1, kp2, kp3, kp4, kp5, kp6, kp7, kp8, kp9
  9.         public  kpminus, kpcoma, kpenter, kpdot, chrout, cstatus, cquit
  10.         public  cquery, dmpscn, vtans52, vtinit, dnwpg, upwpg, endwnd, homwnd
  11.         public  upone, dnone, trnprs, dumpscr, modlin, modwrt, snull
  12.         public  klogon, klogof, cdos, chang, khold, vtrmac, vtsmac
  13.  
  14.         public  vtemu, crt_mode, scbattr, refresh, low_rgt      ; data
  15.         public  savescr, restscr, pntchr, pntchk, pntflsh       ; code
  16.         include ccsdef.h
  17.  
  18.  
  19. ; some definitions
  20. ; hardware
  21. crt_status equ  3dah                    ; CGA crt status port
  22. disp_enb equ    8                       ; CGA display enable bit
  23. crtmset equ     3D8H                    ; CGA CRT mode set port
  24. screen  equ     10h                     ; Bios screen interrupt
  25. biostty equ     0eh                     ; Bios screen tty write mode
  26.  
  27. ; used in  patsclr
  28. video       equ 10h
  29. pmode       equ 0
  30. setcur      equ 2
  31. readcur     equ 3
  32. readch      equ 8
  33. writeach    equ 9
  34. writech     equ 10
  35. wtty        equ 14
  36. pstate      equ 15
  37. space       equ 20h
  38.  
  39.  
  40. modfrm  struc                           ; format of mode (status) line
  41.         db      'Esc-chr: '             ; do not write in last column
  42. m_echr  db      2 dup (?)
  43.         db      '  help: '
  44. m_hlp   db      2 dup (?)
  45.         db      '?  port:'
  46. m_prt   db      1 dup (?)
  47.         db      ' speed:'
  48. m_baud  db      5 dup (?)
  49.         db      ' parity:'
  50. m_par   db      4 dup (?)
  51.         db      ' echo:'
  52. m_echo  db      3 dup (?)
  53. m_term  db      13 dup (' ')            ; 13 bytes for term type
  54. m_prn   db      3 dup (' ')             ; show PRN when printer is on
  55. modfrm  ends
  56.  
  57. cmodfrm struc                           ; format of mode (status) line
  58.         db      '═╦│÷╫╓╖√: '             ; do not write in last column
  59. cm_echr db      2 dup (?)
  60.         db      '  ░∩╓·: '
  61. cm_hlp  db      2 dup (?)
  62.         db      '?  ╢╦┐┌:'
  63. cm_prt  db      1 dup (?)
  64.         db      ' ╦┘┬╩: '
  65. cm_baud db      5 dup (?)
  66.         db      ' ╨ú╤Θ:'
  67. cm_par  db      4 dup (?)
  68.         db      ' ╗╪╧╘:'
  69. cm_echo db      4 dup (?)
  70. cm_term db      13 dup (' ')            ; 13 bytes for term type
  71. cm_prn  db      3 dup (' ')             ; show PRN when printer is on
  72. cmodfrm ends
  73.  
  74. datas   segment public 'datas'
  75.         extrn flags:byte, mar_top:byte, mar_bot:byte, portval:word
  76.         extrn filtst:byte, dmpname:byte, kbdflg:byte, rxtable:byte
  77.         extrn anspflg:byte, tekflg:byte, scroll:byte, ttyact:byte
  78.         extrn holdscr:byte, taklev:byte, takadr:word, mcctab:byte
  79.         extrn   isccdos:byte    ; Jun 25,1990
  80. ; used in  patsclr [zqf]
  81. currow      db  0   ; current cursor position
  82. curcol      db  0
  83. curtype     dw  0   ; current cursor type 
  84. activepage  db  0   ; current active page
  85.  
  86. ; used in SAVCCSCR & RSTCCSCR , Nov.28,1990 [zqf]
  87. curpos  dw      0  ; save cursor position before save and after restore screen
  88.                    ; used in proc "SAVCCSCR" and "RSTCCSCR"
  89. curtyp  dw      0  ; save cursor position before save and after restore screen
  90.                    ; used in proc "SAVCCSCR" and "RSTCCSCR"
  91.  
  92. ; stuff for screen routines
  93. yflags  db      0                       ; status flags
  94. flags1  db      0                       ; internal flags (but used in mszibm)
  95. prtscr  equ     1                       ; print screen pressed
  96. inited  equ     08h                     ; been here before
  97. vtinited db     0                       ; flag for emulator having been inited
  98. vtclear db      0                       ; nonzero to clear emulator screen
  99. cursor  dw      0
  100. esc_ch  db      0
  101. parmsk  db      0                       ; 8/7 bit parity mask, for reception
  102. argadr  dw      ?                       ; address of arg blk
  103.  
  104. vid7id  db      'VEGA BIOS Code, '      ; Video 7 Vega version string subset
  105. vid7len equ     $-vid7id                ; length of string
  106. vid7id2 db      'Video Seven BIOS Code, ' ; Video 7 VGA board
  107. vid7len2 equ    $-vid7id2
  108. atiwid  db      'ATI EGA Wonder Bios,'  ; ATI EGA wonder version string subset
  109. atilen  equ     $-atiwid                ; length of string, inc terminator
  110. tsngid  db      'Tseng'                 ; Tseng Labs EVA (& Orchid Designer)
  111. tsnglen equ     $-tsngid
  112. evrxid  db      'Everex'                ; Everex Micro Enhancer Deluxe EGA
  113. evrxlen equ     $-evrxid
  114. evgid   db      'VGA EV673'             ; Everex EVGA EV-673
  115. evglen  equ     $-evgid
  116. ega_mode db     0                       ; non-zero if IBM EGA is in use
  117. tvhere  equ     0feh                    ; Topview active query
  118. tvsynch equ     0ffh                    ; Topview resynch request
  119. tv_segs dw      ?                       ; Topview virtual screen, segment
  120. tv_sego dw      ?                       ; and offset
  121. tv_mode db      0                       ; flag, 0 = no Topview
  122. savadr  dw      2 dup (?)               ; offset then segment of saved screen
  123. savflg  dw      0                       ; low_rgt at time of screen save
  124.  
  125. ; The following are used to turn the display back on (after scrolling etc.)
  126. msets   db      2CH,28H,2DH,29H,2AH,2EH,1EH,29H
  127.  
  128.  
  129. vtemu   emulst  <>                      ; emulator flags
  130. ansflgs db      0                       ; ANSI flags
  131. trmtyp  db      0                       ; most recent terminal type
  132. mtty    db      '  TTY   '              ; no terminal type (mode line)
  133. fairness dw     0
  134. lincur  dw      ?                       ; cursor type save area
  135. scbattr db      ?                       ; Screen background attribute
  136. oldattr db      ?                       ; screen attributes at init time
  137. curattr db      ?                       ; current attribute
  138. oldsp   dw      0                       ; offset to longjmp to for i/o failure
  139. temp    dw      ?                       ; scratch storage
  140. modtemp db      0                       ; temp to hold ZUnet modeline status
  141. captrtn dw      ?                       ; routine to call for captured output
  142. dmphand dw      -1                      ; screen dump file handle
  143. dumplen equ     132
  144. dumpbuf db      dumplen dup (?), cr, lf ; 134 byte dump work buffer
  145. dumpsep db      FF,cr,lf                ; screen image separators
  146. dmperr  db      ' Cannot open file to save screen to disk $'
  147. cdmperr db      ' ╬▐╖¿┤≥┐¬╙├╙┌▒ú╗ñ╞┴─╗╡─╬─╝■$'
  148. crlf    db      cr,lf,'$'
  149. flowon  db      0                       ; flow control chars xon
  150. flowoff db      0                       ;  and xoff (or both null if none)
  151. pntmsg  db      'Printer not ready, printing request skipped.'
  152. pntmsgl equ     $-pntmsg                ; length of pntmsg
  153. cpntmsg db      '┤≥╙í╗·├╗╙╨╫╝▒╕║├, ╖┼╞·┤≥╙í╟δ╟≤.'
  154. cpntmsgl equ     $-cpntmsg                ; length of pntmsg
  155. pntptr  dw      dumpbuf                 ; pointer to next free byte in buffer
  156.  
  157. ; some static data for mode line
  158. modbuf  modfrm  <>                      ; mode line buffer
  159. cmodbuf  cmodfrm  <>                      ; mode line buffer
  160. unkbaud db      'unkwn'                 ; must be 5 chars
  161. cunkbaud db      ' ╬┤╓¬'                 ; must be 5 chars
  162. baudn   db      ' 45.5',' 50  ',' 75  ',' 110 ','134.5',' 150 ',' 300 ',' 600 '
  163.         db      ' 1200',' 1800',' 2000',' 2400',' 4800',' 9600','19200','38400'
  164.         db      '57.6K','115 K'
  165. baudnsiz  equ   18                      ; # of baud rates known (tbl size / 4)
  166. parnams db      'even','mark','none','odd ','spc '
  167. cparnams db     ' ┼╝ ','┤½║┼',' ╬▐ ',' ╞µ ','╝Σ╕⌠'
  168. lclmsg  db      'loc'
  169. clclmsg  db     '▒╛╡╪'
  170. remmsg  db      'rem'
  171. cremmsg  db     '╘╢│╠'
  172. portno  db      ?
  173.  
  174. ; storage for multi-window stuff
  175. swidth  equ     80                      ; max screen width
  176. slen    equ     24                      ; and length of text
  177. npages  equ     10                      ; # of pages of scrolling on each side
  178. crt_norm db     ?                       ; video mode for normal screen
  179. crt_mode db     ?                       ; video mode (typ 3, must be text)
  180. crt_cols db     ?                       ; number of screen columns (typ 80)
  181. crt_lins db     24                      ; number of screen rows - 1 (typ 24)
  182. low_rgt dw      ?                       ; lower right corner of text window
  183.                                         ; high = row address (typ 23)
  184.                                         ; low = column address (typ 79)
  185. inipara dw      ?                       ; initial paragraphs of scroll memory
  186. scrsav  dw      ?                       ; segment address of save area
  187. refresh db      0                       ; screen refresh (0=wait for retrace)
  188. vtroll  db      0                       ; auto roll back allowed (0 = no)
  189.  
  190. ; circular buffer for screen roll back.
  191. cbuf    struc
  192. pp      dw      ?                       ; place ptr in buffer
  193. bend    dw      ?                       ; end of buffer
  194. orig    dw      ?                       ; buffer origin
  195. lcnt    dw      0                       ; # of lines in buffer
  196. lmax    dw      ?                       ; max lines of buffer
  197. cbuf    ends
  198.  
  199. twnd    cbuf    <>                      ; top screen spill-buffer struct
  200. bwnd    cbuf    <>                      ; bottom screen spill buffer struct
  201. vtrname db      'TERMINALR'             ; a macro name, must be Upper Case
  202. vtrlen  equ     $-vtrname
  203. vtsname db      'TERMINALS'             ; a macro name, must be Upper Case
  204. vtslen  equ     $-vtsname
  205.  
  206. vtmacname dw    vtrname                 ; pointer to selected macro name
  207. vtmaclen db     vtrlen
  208. datas   ends
  209.