home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / mskermit / msxapr.asm < prev    next >
Assembly Source File  |  2020-01-01  |  44KB  |  1,167 lines

  1.         name msxapr
  2. ; File MSXAPR.ASM          ** current version, needs work **
  3. ; Kermit system dependent module for ACT Apricot
  4. ; Last edit: 25 April 1988 [rwtc]
  5. ; Version 2.30
  6. ; This version runs ok on the FP portable and hopefully on the xi/pc
  7. ; I have removed all the microscreen stuff to reduce the size of the filew
  8. ; for editing convenience, it could be replaced if anyone feels the need
  9. ; of it. Other mods that were necessary were to the SENDBR command this
  10. ; now seems to work ok, also the log session command had got scrambled
  11. ; somewhere along the line this now works. 
  12. ; MSUAPR.ASM this works as a basic keyboard translator only, 
  13. ; work is still needed to provide comlete terminal emulation facilities.
  14. ;
  15. ; [rwtc] = Dick Carlton Department of Earth Sciences, The Open University
  16. ; Walton Hall, Milton Keynes MK7 6AA
  17. ;
  18. ; 27 May 1987 Add keyboard translator and input translation table rxtable,
  19. ; remove references to register bp, minor cleanups here and there. [jrd]
  20. ; ASSUMPTION: This module can use something like the Generic keyboard
  21. ;  translator MSUGEN.asm. Work needed to make MSUAPR.asm!
  22. ;
  23. ; 28 Sept 1986 Revise procedure Term to permit capturing, printer ready
  24. ;  testing, debug display. Revised other port procedures too. [jrd]
  25. ; 4 Sept 1986 Add Bob Goeke's change to move comms port table to a system
  26. ;  dependent module (typ msx---) to allow 3+ ports and localized idents. [jrd]
  27.  
  28. ; Added global entry point vtstat for use by Status in mssset.
  29. ; Added register save/restore in getbaud procedure.
  30. ; Also trimmed off trailing commas in publics. Joe R. Doupnik 12 March 1986
  31. ; Add global procedures ihosts and ihostr to handle host initialization
  32. ; when packets are to be sent or received by us,resp. 24 March 1986
  33. ; Add global procedure dtrlow (without worker serhng) to force DTR and RTS low
  34. ; in support of Kermit command Hangup. Says Not Yet Implemented. [jrd]
  35. ; Add global procedure Dumpscr, called by Ter in file msster, to dump screen
  36. ;  to a file. Just does a beep for now. 13 April 1986 [jrd]
  37. ; Move Hangup message out from middle of Show Key area (my goof).
  38. ;  23 April 1986 [jrd]
  39.         public  serini, serrst, clrbuf, outchr, coms, vts, vtstat, dodel
  40.         public  ctlu, cmblnk, locate, lclini, prtchr, dobaud, clearl
  41.         public  dodisk, getbaud, beep, trnprs, pcwait, termtb ;[rwtc]
  42.         public  count, xofsnt, puthlp, putmod, clrmod, poscur, shomodem
  43.         public  sendbr, sendbl, term, machnam, setktab, setkhlp, showkey
  44.         public  ihosts, ihostr, dtrlow, serhng, dumpscr, comptab ; [jrd]
  45.         public  chrout, cstatus, cquit, cquery, chang          ; kbd action verbs
  46.         public  snull, kdos, klogof, klogon, modlin, cpyktab, lng_br
  47.  
  48.         include a:\mssdef.h
  49.  
  50. if1
  51.     %out [Beginning pass 1]
  52. else
  53.     %out [Beginning pass 2]
  54. endif
  55.  
  56. false   equ     0
  57. true    equ     1
  58. instat  equ     6
  59. print_out equ   05h                     ; dos function to print to printer
  60. prtscr  equ     80h                     ; print screen pressed
  61. rddev   equ     3FH
  62. open    equ     3DH
  63. control equ     0FCH                    ; System Control Device
  64.  
  65. ; external variables used:
  66. ; drives - # of disk drives on system
  67. ; flags - global flags as per flginfo structure defined in pcdefs
  68. ; trans - global transmission parameters, trinfo struct defined in pcdefs
  69. ; portval - pointer to current portinfo structure (currently either port1
  70. ;           or port2)
  71. ; port1, port2 - portinfo structures for the corresponding ports
  72.  
  73. ; global variables defined in this module:
  74. ; xofsnt, xofrcv - tell whether we saw or sent an xoff.
  75.  
  76. modfrm  struc                           ; Format of mode line
  77.         db      'Esc chr: '
  78. m_echr  db      2 dup (?)
  79.         db      ', Speed: '
  80. m_baud  db      4 dup (?)
  81.         db      ', Parity: '
  82. m_par   db      4 dup (?)
  83.         db      ', Echo: '
  84. m_echo  db      3 dup (?)
  85.         db      ', Log: '
  86. m_log   db      3 dup (?)
  87.         db      ', Type '
  88. m_hlp   db      2 dup (?)
  89.         db      '? for Help$'
  90. modfrm  ends
  91.  
  92. datas   segment public  'datas'
  93.         extrn   drives:byte,  flags:byte, trans:byte
  94.         extrn   portval:word, port1:byte, port2:byte
  95.         extrn   comand:byte, dmpname:byte                       ; [jrd]
  96.         extrn   kbdflg:byte, rxtable:byte
  97.  
  98.  
  99. ;
  100. machnam db      'ACT Apricot$'
  101. erms20  db      cr,lf,'?Warning: System has no disk drives$'
  102. erms40  db      cr,lf,'?Warning: Unrecognized baud rate$'
  103. erms41  db      cr,lf,'?Warning: Cannot open com port$'
  104. erms50  db      cr,lf,'Error reading from device$'
  105. badbd   db      cr,lf,'Unimplemented baud rate$'
  106. noimp   db      cr,lf,'Command not implemented.$'
  107. shkmsg  db      'Not implemented.'
  108. shkmln  equ     $-shkmsg
  109. setktab db      0
  110. setkhlp db      0
  111. hngmsg  db      cr,lf,' The phone should have hungup.',cr,lf,'$' ; [jrd]
  112. hnghlp  db      cr,lf,' The modem control lines DTR and RTS for the current'
  113.         db      ' port are forced low (off)'
  114.         db      cr,lf,' to hangup the phone. Normally, Kermit leaves them'
  115.         db      ' high (on) when it exits.'
  116.         db      cr,lf,'$'                                       ; [jrd]
  117. rdbuf   db      80 dup (?)      ; temp buf [jrd]
  118. crlf    db      cr,lf,'$'
  119. delstr  db      BS,BS,' ',BS,'$'        ; Delete string.
  120. clrlin  db      cr,escape,'K$'             ; Clear line.
  121. clreol  db      escape,'K$'                ; Clear line.
  122. clrscr  db      escape,'H',escape,'J$'        ; Home and clear screen.
  123. ; Set High/Low intensity and/or Inverse video/Normal video
  124. ; rwtc 26.06.87.
  125. invseq  db      escape,'p$'                ; Inverse video mode.
  126. nrmseq  db      escape,'q$'                ; Normal video mode.
  127. hinton  db      escape,'($'                ; High intensity mode.
  128. hintof  db      escape,')$'                ; Low intensity mode.
  129. on25    db      escape,'j',escape,';$'        ; Save cursor posn, move to line 25
  130. off25   db      escape,'k$'                ; Restore cursor to saved position
  131. offmscr db      escape,'/',0,escape,'s$'      ; Turn off lights, clear, clock on
  132. onmscr  db      escape,'U',escape,'W'         ; Direct output to microscreen
  133.         db      escape,'c',escape,'B'         ; Disable scrolling, cursor down
  134.         db      'Break Close  Status  '
  135.         db      'Push   Help   Log'
  136.         db      escape,'V'                 ; Revert to normal screen
  137.         db      escape,'/',3FH             ; Turn on all keypad lights
  138.         db      '$'
  139. xofsnt  db      0                       ; Say if we sent an XOFF.
  140. count   dw      0                       ; Number of chars in int buffer.
  141. portin  db      0                       ; Port initialization flag
  142.  
  143. inited  db      0                       ; Terminal handler init flag
  144. argadr  dw      ?               ; address of arg blk from msster.asm
  145. parmsk  db      ?               ; 8/7 bit parity mask, for reception
  146. flowoff db      ?               ; flow-off char, Xoff or null (if no flow)
  147. flowon  db      ?               ; flow-on char, Xon or null
  148. captrtn dw      ?               ; routine to call for captured output
  149. tmp     db      ?,'$'
  150. temp    dw      0
  151. temp1   dw      ?                       ; Temporary storage.
  152. temp2   dw      ?                       ; Temporary storage.
  153.  
  154. ; Added from msxibm.asm [rwtc] 22.03.88 this is here just to make the
  155. ; status display look nicer (at the moment) [rwtc]
  156.                                         ; begin Terminal emulator data set
  157.  
  158. termtb  db      tttypes                 ; entries for Status, not Set
  159.         mkeyw   'Heath-19',ttheath
  160.         mkeyw   'none',ttgenrc
  161.         mkeyw   'Tek4010',tttek
  162.         mkeyw   'VT102',ttvt100
  163.         mkeyw   'VT52',ttvt52
  164.  
  165. ; shomodem messages from msxibm.asm [rwtc] 18.03.88 (just for show at present)
  166.  
  167. mdstreg db    0
  168. msmsg1  db      cr,lf,' Modem is not ready: DSR is off$'
  169. msmsg2  db      cr,lf,' Modem is ready:     DSR is on$'
  170. msmsg3  db      cr,lf,' no Carrier Detect:  CD  is off$'
  171. msmsg4  db      cr,lf,' Carrier Detect:     CD  is on$'
  172. msmsg5  db      cr,lf,' no Clear To Send:   CTS is off$'
  173. msmsg6  db      cr,lf,' Clear To Send:      CTS is on$'
  174.  
  175.  
  176. ; This character string is used to program various keys to return
  177. ; the correct ASCII characters.
  178.  
  179. kbdesc  db      escape,'43',44,'['-100O    ; Program CTRL-[ key
  180.         db      escape,'43',45,']'-100O    ; Program CTRL-] key
  181.         db      '$'
  182.  
  183. ;  This table is indexed by the baud rate definitions given in msdefs.h.
  184. ;  Unsupported baud rates should contain FF.
  185. bddat   label   word
  186.         dw      0FFH                    ;    45.5  Unsupported
  187.         dw      1                       ;    50
  188.         dw      2                       ;    75
  189.         dw      3                       ;   110
  190.         dw      4                       ;   134.5
  191.         dw      5                       ;   150
  192.         dw      6                       ;   300
  193.         dw      7                       ;   600
  194.         dw      8                       ;  1200
  195.         dw      9                       ;  1800
  196.         dw      0FFH                    ;  2000    Unsupported
  197.         dw      10                      ;  2400
  198.         dw      12                      ;  4800    (Have to skip 3600)
  199.         dw      14                      ;  9600    (Have to skip 7200)
  200.         dw      15                      ; 19200
  201.         dw      0FFH                    ; 38400    Unsupported
  202.  
  203. comptab db      2                       ; communciations port options [jrd]
  204.         mkeyw   '1',1
  205.         mkeyw   'COM1',1                ; no choice here
  206.  
  207. ourarg  termarg <>
  208. modbuf  modfrm  <>                      ; Mode line buffer
  209.  
  210. ; Some static data for the mode line.
  211. unkbaud db      'Unk '
  212. baudn   db      '45.5'
  213.         db      '  50'
  214.         db      '  75'
  215.         db      ' 110'
  216.         db      ' 135'
  217.         db      ' 150'
  218.         db      ' 300'
  219.         db      ' 600'
  220.         db      '1200'
  221.         db      '1800'
  222.         db      '2000'
  223.         db      '2400'
  224.         db      '4800'
  225.         db      '9600'
  226.         db      ' 19K'
  227.         db      ' 38K'
  228.  
  229. parnams db      'Even'
  230.         db      'Mark'
  231.         db      'None'
  232.         db      'Odd '
  233.         db      'Spc '
  234. offmsg  db      'Off'
  235. onmsg   db      'On '
  236. lclmsg  db      'Lcl'
  237. remmsg  db      'Rem'
  238. keyoff  dw      0
  239. keyseg  dw      0
  240.  
  241. datas   ends
  242.  
  243. code    segment public 'code'
  244.         extrn   comnd:near, dopar:near, prserr:near, atoi:near, prompt:near
  245.         extrn   sleep:near, msuinit:near, keybd:near            ; [jrd]
  246.         assume  cs:code,ds:datas
  247.  
  248. ; Produce a short beep.  The PC DOS bell is long enough to cause a loss
  249. ; of data at the port.  Returns normally.
  250.  
  251. BEEP    PROC    NEAR
  252.         mov     dl,bell
  253.         mov     ah,dconio
  254.         int     dos
  255.         ret
  256. BEEP    ENDP
  257.  
  258. ; Clear to the end of the current line.  Returns normally.
  259.  
  260. CLEARL  PROC    NEAR
  261.         mov     dx,offset clreol
  262.         jmp     tmsg                    ; Send terminal message
  263. CLEARL  ENDP
  264.  
  265. ; Clear the input buffer. This throws away all the characters in the
  266. ; serial interrupt buffer.  This is particularly important when
  267. ; talking to servers, since NAKs can accumulate in the buffer.
  268. ; Returns normally.
  269.  
  270. CLRBUF  PROC    NEAR
  271.         push    bx                      ; save regs. [jrd]
  272.         push    cx
  273.         mov     bx,34H                  ; Serial Device Driver
  274.         mov     cx,2                    ; Read serial port
  275. clrbf1: int     control                 ; Call System Control Device
  276.         cmp     ax,-1                   ; Read anything ?
  277.         jne     clrbf1                  ; Yes, try again
  278.         pop     cx                      ; [jrd]
  279.         pop     bx
  280.         ret
  281. CLRBUF  ENDP
  282.  
  283. ; clear the mode line written by putmod.  Returns normally.
  284.  
  285. CLRMOD  PROC    NEAR
  286.         mov     dx,offset on25          ; Move to line 25
  287.         call    tmsg
  288.         call    clearl                  ; Clear to end of line.
  289.         mov     dx,offset off25         ; Restore cursor position
  290.         call    tmsg
  291.         ret
  292. CLRMOD  ENDP
  293.  
  294. ; This routine blanks the screen.  Returns normally.
  295.  
  296. CMBLNK  PROC    NEAR
  297.         mov     dx,offset clrscr
  298.         jmp     tmsg                    ; Send terminal message.
  299. CMBLNK  ENDP
  300.  
  301. ; Set the current port.
  302.  
  303. COMS    PROC    NEAR
  304.         jmp     notimp
  305. COMS    ENDP
  306.  
  307. ; Make a copy of the keyboard table so that we can redefine some keys
  308. ; when we go into CONNECT state.
  309.  
  310.  
  311. CPYKTAB PROC    NEAR
  312.         push    ds
  313.         mov     ax,0
  314.         mov     es,ax                   ; ES -> lowest page in memory
  315.         mov     ax,es:[0712H]
  316.         mov     keyoff,ax               ; Save offset to keytable
  317.         mov     si,ax                   ; For the copy
  318.         mov     ax,es:[0714H]
  319.         mov     keyseg,ax               ; Save segment of keytable
  320. ;
  321.         mov     ds,ax                   ; DS:SI -> system keyboard table
  322.     call    keybd
  323.         mov     es,ax
  324.         mov     di,0                    ; ES:DI -> our keyboard table
  325. ;
  326.         mov     cx,0400H                ; Length of table
  327.         cld
  328.         rep     movsb                   ; Copy table
  329. ;
  330.     call    keybd
  331.     jmp    notimp
  332.         mov     ds,ax                   ; Point to our keyboard segment
  333. ;
  334.         mov     cx,12
  335.         cld
  336.         rep     movsb                   ; copy pointers
  337.         pop     ds                      ; restore DS
  338.         ret
  339. CPYKTAB ENDP
  340.  
  341.  
  342. ; Move the cursor to the left margin, then clear to end of line.
  343. ; Returns normally.
  344.  
  345. CTLU    PROC    NEAR
  346.         mov     dx,offset clrlin
  347.         jmp     tmsg
  348. CTLU    ENDP
  349.  
  350. ; Set the baud rate for the current port, based on the value
  351. ; in the portinfo structure.  Returns normally.
  352.  
  353. DOBAUD  PROC    NEAR
  354.         push    ax                      ; save regs. [jrd]
  355.         push    bx
  356.         push    cx
  357.         mov     bx,portval
  358.         mov     temp1,ax                ; Save new rate, don't zap old rate yet
  359.         mov     ax,[bx].baud            ; Check if new rate is valid.
  360.         mov     tmp,2
  361.         mul     tmp                     ; Get index into baud table.
  362.         mov     bx,offset bddat         ; Start of table.
  363.         add     bx,ax
  364.         mov     ax,[bx]                 ; The data to output to the port
  365.         cmp     ax,0FFH                 ; Unimplemented baud rate.
  366.         jne     dobd0
  367.         mov     ax,temp1                ; Get back original value.
  368.         mov     bx,portval
  369.         mov     [bx].baud,ax            ; Leave rate as is.
  370.         mov     dx,offset badbd         ; Give an error message.
  371.         call    tmsg
  372.         pop     cx
  373.         pop     bx
  374.         pop     ax
  375.         ret
  376. ;
  377. dobd0:  mov     dx,ax
  378.         mov     bx,34H                  ; Serial Device Driver
  379.         mov     cx,4                    ; Set transmit baud rate
  380.         int     control
  381.         mov     cx,5                    ; Set receive baud rate
  382.         int     control
  383.         mov     dx,1                    ; Turn on XON/XOFF just in case...
  384.         mov     cx,10                   ; Transmit XON/XOFF
  385.         int     control
  386.         mov     cx,11                   ; Receive XON/XOFF
  387.         int     control
  388.         mov     cx,3                    ; Install changes, zap line, etc...
  389.         int     control
  390.         mov     inited,0                ; Need to re-init on CONNECT
  391.         pop     cx
  392.         pop     bx
  393.         pop     ax
  394.         ret
  395. DOBAUD  ENDP
  396.  
  397. ; Delete a character from the terminal.  This works by printing
  398. ; backspaces and spaces.  Returns normally.
  399.  
  400. DODEL   PROC    NEAR
  401.         mov     dx,offset delstr        ; Erase weird character.
  402.         jmp     tmsg
  403. DODEL   ENDP
  404.  
  405. ; This is called by Kermit initialization.  It checks the
  406. ; number of disks on the system, sets the drives variable
  407. ; appropriately.  Returns normally.
  408.  
  409. DODISK  PROC    NEAR
  410.         mov     ah,gcurdsk              ; Current disk value to AL.
  411.         int     dos
  412.         mov     dl,al                   ; Put current disk in DL.
  413.         mov     ah,seldsk               ; Select current disk.
  414.         int     dos                     ; Get number of drives in AL.
  415.         mov     drives,al
  416.         ret
  417. DODISK  ENDP
  418.  
  419. ; Get the current baud rate from the serial card and set it
  420. ; in the portinfo structure for the current port.  Returns normally.
  421. ; This is used during initialization.
  422.  
  423. GETBAUD PROC    NEAR
  424.         push    ax                      ; save some regs [jrd]
  425.         push    bx
  426.         push    cx                      ; [jrd]
  427.         push    dx                      ; [jrd]
  428.         mov     bx,34H                  ; Serial Device Driver
  429.         mov     cx,4                    ; Transmit baud rate
  430.         mov     dx,-1                   ; Fetch data
  431.         int     control                 ; Go speak to Control Device Driver
  432.         mov     bx,offset bddat         ; -> baud rate table
  433.         mov     cl,0                    ; Keep track of index
  434. getb0:  cmp     ax,[bx]
  435.         je      getb1
  436.         inc     cl
  437.         cmp     cl,baudsiz              ; At the end of the list
  438.         jge     getb2
  439.         add     bx,2
  440.         jmp     getb0
  441. getb1:  mov     ch,0
  442.         mov     bx,portval
  443.         mov     [bx].baud,cx            ; Save rate index in port structure
  444.         jmp     getb3                   ; [jrd]
  445. getb2:  mov     dx,offset erms40
  446.         call    tmsg
  447. getb3:  pop     dx                      ; restore regs [jrd]
  448.         pop     cx                      ; [jrd]
  449.         pop     bx                      ; [jrd]
  450.         pop     ax                      ; [jrd]
  451.         ret
  452. GETBAUD ENDP
  453.  
  454. ; Initialize local variables and communications port.
  455.  
  456. LCLINI  PROC    NEAR
  457.         mov     flags.vtflg,0           ; Don't do terminal emulation.
  458.         mov     bx,34H                  ; Control Device Driver
  459.         mov     cx,0                    ; Initialise driver
  460.         mov     dx,0
  461.         int     control
  462.         mov     cx,6                    ; Set transmit bits per character
  463.         mov     dx,8                    ; to 8-bit bytes
  464.         int     control
  465.         mov     cx,8                    ; Set receive bits per character
  466.         mov     dx,7                    ; to 8-bit bytes
  467.         int     control
  468.         mov     cx,8                    ; Set number of stop bits
  469.         mov     dx,1                    ; to 1 stop bit
  470.         int     control
  471.         mov     cx,9                    ; Set parity type
  472.         mov     dx,0                    ; Parity handled by DOPAR.
  473.         int     control
  474.         mov     cx,10                   ; Transmit XON/XOFF
  475.         mov     dx,1                    ; Enabled
  476.         int     control
  477.         mov     cx,11                   ; Receive XON/XOFF
  478.         mov     dx,1                    ; Enabled
  479.         int     control
  480.         mov     cx,3                    ; Install changes
  481.         int     control
  482.         mov     dx,offset kbdesc
  483.         call    tmsg                    ; Re-program keyboard
  484.         call    msuinit                 ; init keyboard translator
  485.         ret
  486. LCLINI  ENDP
  487.  
  488. ; Homes the cursor.  Returns normally.
  489.  
  490. LOCATE  PROC    NEAR
  491.         mov     dx,0000H                ; Go to top left corner of screen.
  492.         jmp     poscur
  493. LOCATE  ENDP
  494.  
  495. ; Display mode line.
  496.  
  497. MODLIN  PROC    NEAR
  498.         mov     al,ourarg.escc
  499.         mov     modbuf.m_echr,' '
  500.         mov     modbuf.m_hlp,' '
  501.         cmp     al,32                   ; ESC char printable ?
  502.         jnb     modl1                   ; Yes, keep going
  503.         add     al,40H                  ; Convert to printable
  504.         mov     modbuf.m_echr,'~'       ; Note control char
  505.         mov     modbuf.m_hlp,'~'
  506. modl1:  mov     modbuf.m_echr+1,al      ; Fill in character
  507.         mov     modbuf.m_hlp+1,al
  508. ;
  509.         mov     al,ourarg.baudb         ; Get baud rate
  510.         mov     si,offset unkbaud       ; Just in case it falls out of range
  511.         cmp     al,baudsiz              ; Too big ?
  512.         jnb     modl2                   ; Yes, use default
  513.         mov     cl,2                    ; Each entry is 4 bytes
  514.         shl     al,cl
  515.         mov     ah,0
  516.         add     ax,offset baudn         ; ax -> baud rate string
  517.         mov     si,ax
  518. modl2:  mov     cx,size m_baud          ; length of baud space
  519.         mov     di,offset modbuf.m_baud
  520.         push    es                      ; save es
  521.         push    ds
  522.         pop     es                      ; set es to datas segment
  523.         cld
  524.         rep     movsb                   ; Copy over baud rate
  525. ;
  526.         mov     al,ourarg.parity        ; Get parity code
  527.         mov     cl,2                    ; Each entry is 4 bytes long
  528.         shl     al,cl
  529.         mov     ah,0
  530.         add     ax,offset parnams       ; ax -> parity setting
  531.         mov     si,ax
  532.         mov     cx,4
  533.         mov     di,offset modbuf.m_par
  534.         rep     movsb                   ; Copy over parity setting string
  535. ;
  536.         mov     si,offset remmsg        ; Assume remote echoing
  537.         test    ourarg.flgs,lclecho
  538.         jz      modl3
  539.         mov     si,offset lclmsg        ; Doing local echo
  540. modl3:  mov     cx,3
  541.         mov     di,offset modbuf.m_echo
  542.         rep     movsb
  543. ;
  544.         mov     si,offset offmsg        ; Assume not logging
  545.         test    ourarg.flgs,capt
  546.         jz      modl4
  547.         mov     si,offset onmsg         ; Logging input
  548. modl4:  mov     cx,3
  549.         mov     di,offset modbuf.m_log
  550.         rep     movsb
  551.         pop     es                      ; restore es
  552. ;
  553.         mov     dx,offset modbuf
  554.         call    putmod                  ; Print mode line
  555.         ret
  556. MODLIN  ENDP
  557.  
  558. ; Clear microscreen, redisplay time and revert to system keyboard table.
  559.  
  560. NOTIMP: mov     dx,offset noimp
  561.         call    tmsg
  562.         jmp     prserr
  563.  
  564. ; Put the number in ax into the buffer pointed to by di.  di is updated.
  565.  
  566. NOUT    PROC    NEAR
  567.         mov     dx,0
  568.         mov     bx,10
  569.         div     bx
  570.         push    dx
  571.         or      ax,ax
  572.         jz      nout1
  573.         call    nout
  574. nout1:  pop     ax
  575.         add     al,'0'
  576.         stosb
  577.         ret
  578. NOUT    ENDP
  579.  
  580. ; Put the char in AH to the serial port.  This assumes the
  581. ; port has been initialized.  XON/XOFF are handled by the port
  582. ; driver.  Skip returns on success, returns normally if the
  583. ; character cannot be written.
  584.  
  585. OUTCHR  PROC    NEAR
  586.         push    bx
  587.         push    cx
  588.         push    dx                      ; Save register.
  589.         sub     cx,cx
  590.         mov     al,ah                   ; Parity routine works on AL.
  591.         call    dopar                   ; Set parity appropriately.
  592.         mov     dl,al
  593.         mov     dh,0
  594.         mov     cx,1                    ; Transmit char
  595.         mov     bx,34H                  ; Serial Device Driver
  596.         int     control                 ; System Control Device
  597.         pop     dx
  598.         pop     cx
  599.         pop     bx
  600.         jmp     rskp
  601. OUTCHR  ENDP
  602.  
  603. ;  Position the cursor according to contents of DX:
  604. ;  DH contains row, DL contains column.  Origin (top left) = 0, 0
  605. ;  Returns normally. Revised 28 Sept 1986 by [jrd]
  606.  
  607. POSCUR  PROC    NEAR
  608.         push    ax                      ; [jrd]
  609.         mov     ah,conout               ; display on console
  610.         push    dx                      ; Save row & column position
  611.         mov     dl,escape                  ; Start cursor positioning sequence
  612.         int     dos                     ; [jrd]
  613.         mov     dl,'Y'
  614.         int     dos                     ; [jrd]
  615.         pop     dx                      ; Retrieve row position
  616.         push    dx                      ; save again [jrd]
  617.         mov     dl,dh
  618.         add     dl,' '                  ; add ascii bias [jrd]
  619.         int     dos
  620.         pop     dx
  621.         push    dx
  622.         add     dl,' '
  623.         int     dos
  624.         pop     dx
  625.         pop     ax                      ; [jrd]
  626.         ret
  627. POSCUR  ENDP
  628.  
  629. ; Use for DOS 2.0 and above.  Check the port status.  If no data, skip
  630. ; return.  Else, read in a char and return.
  631. ; Revised 28 Sept 1986 by [jrd]
  632. PRTCHR  PROC    NEAR
  633.         push    bx
  634.         push    cx
  635.         push    si
  636.         mov     bx,34H
  637.         mov     cx,2
  638.         int     control                 ; Read serial port
  639.         pop     si
  640.         pop     cx
  641.         pop     bx
  642.         cmp     ax,-1                   ; Character there ?
  643.         jne     prtch1                  ; Yes, process it...
  644.         jmp     rskp                    ; No character, skip return.
  645. prtch1: ret
  646. PRTCHR  ENDP
  647.  
  648. ; IHOSTS - Initialize the host by sending XON, or equivalent, and enter the
  649. ; cycle of clear input buffer, wait 1 second, test if buffer empty then exit
  650. ; else repeat cycle. Requires that the port be initialized before hand.
  651. ; Ihosts is used by the local send-file routine just after initializing
  652. ; the serial port.
  653. ; 22 March 1986 [jrd]
  654.  
  655. IHOSTS  PROC    NEAR
  656.         push    ax              ; save the registers
  657.         push    bx
  658.         push    cx
  659.         push    dx
  660.         mov     bx,portval      ; port indicator
  661.         mov     ax,[bx].flowc   ; put Go-ahead flow control char in ah
  662.         or      ah,ah           ; don't send null if flow = none
  663.         jz      ihosts1         ; z = null
  664.         call    outchr          ; send it (release Host's output queue)
  665.          nop                    ; outchr can do skip return
  666.          nop
  667.          nop
  668. ihosts1:call    clrbuf          ; clear out interrupt buffer
  669.         mov     ax,1            ; sleep for 1 second
  670.         call    sleep           ; procedure sleep is in msscom.asm
  671.         call    prtchr          ; check for char at port
  672.          jmp    ihosts1         ; have a char in al, repeat wait/read cycle
  673.          nop                    ; prtchr does skip return on empty buffer
  674.         pop     dx              ; empty buffer. we are done here.
  675.         pop     cx
  676.         pop     bx
  677.         pop     ax
  678.         ret
  679. IHOSTS  ENDP
  680.  
  681. ; IHOSTR - initialize the remote host for our reception of a file by
  682. ; sending the flow-on character (XON typically) to release any held
  683. ; data. Called by receive-file code just after initializing the serial
  684. ; port.         22 March 1986 [jrd]
  685. IHOSTR  PROC    NEAR
  686.         push    ax              ; save regs
  687.         push    bx
  688.         push    cx
  689.         mov     bx,portval      ; port indicator
  690.         mov     ax,[bx].flowc   ; put Go-ahead flow control char in ah
  691.         or      ah,ah           ; don't send null if flow = none
  692.         jz      ihostr1         ; z = null
  693.         call    outchr          ; send it (release Host's output queue)
  694.          nop                    ; outchr can do skip return
  695.          nop
  696.          nop
  697. ihostr1:pop     cx
  698.         pop     bx
  699.         pop     ax
  700.         ret
  701. IHOSTR  ENDP
  702.  
  703. DTRLOW  PROC    NEAR            ; Global proc to Hangup the Phone by making
  704.                                 ; DTR and RTS low.
  705.         mov ah,cmtxt            ; allow text to be able to display help
  706.         mov bx,offset rdbuf     ; dummy buffer
  707.         mov dx,offset hnghlp    ; help message
  708.         call comnd              ; get a confirm
  709.          jmp r
  710. ; not yet imp.  call serhng             ; drop DTR and RTS
  711.         mov ah,prstr            ; give a nice message
  712. ; not yet imp.  mov dx,offset hngmsg
  713.         mov dx,offset noimp     ; for now
  714.         int dos
  715.         jmp rskp
  716. DTRLOW  ENDP
  717.  
  718. ; Hang up the Phone. Similar to SERRST except it just forces DTR and RTS low
  719. ; to terminate the connection. 29 March 1986 [jrd]
  720. ; Calling this twice without intervening calls to serini should be harmless.
  721. ; Returns normally.
  722. ; SERHNG is Not Yet Implemented.
  723. SERHNG  PROC    NEAR
  724.         ret
  725. SERHNG  ENDP
  726.  
  727. ; Wait for the # of milliseconds in ax, for non-IBM compatibles.
  728. ; Based on 4.77 Mhz 8088 processor speeds.
  729. ; Thanks to Bernie Eiben for this one.
  730. pcwait  proc    near
  731.         mov     cx,240          ; inner loop counter for 1 millisecond
  732. pcwai1: sub     cx,1            ; inner loop takes 20 clock cycles
  733.         jnz     pcwai1
  734.         dec     ax              ; outer loop counter
  735.         jnz     pcwait          ; wait another millisecond
  736.         ret
  737. pcwait  endp
  738.  
  739.  
  740. ; Put a help message on the screen.
  741. ; Pass the message in ax, terminated by a null.  Returns normally.
  742.  
  743. PUTHLP  PROC    NEAR
  744.         push    ax                      ; preserve this
  745.         mov     dx,offset crlf
  746.         call    tmsg
  747.         mov     dx,offset hinton        ; Turn on high intensity
  748.         call    tmsg
  749.         pop     si                      ; point to string again
  750.         cld
  751. puthl3: lodsb                           ; get a byte
  752.         cmp     al,0                    ; end of string?
  753.         je      puthl4                  ; yes, stop
  754.         mov     dl,al
  755.         mov     ah,dconio
  756.         int     dos                     ; else write to screen
  757.         jmp     puthl3                  ; and keep going
  758. puthl4: mov     dx,offset hintof        ; Back to normal
  759.         call    tmsg
  760.         mov     dx,offset crlf
  761.         call    tmsg
  762.         ret
  763. PUTHLP  ENDP
  764.  
  765. ; Write a line in high intensity on line 25.  The line is pointed to by
  766. ; ds:dx, terminated by a $.  Returns normally.
  767.  
  768. PUTMOD  PROC    NEAR
  769.         push    dx                      ; preserve message pointer.
  770.         mov     dx,offset on25          ; Move down to line 25
  771.         call    tmsg
  772.         mov     dx,offset invseq        ; Turn on high intensity
  773.         call    tmsg
  774.         pop     dx                      ; get message back
  775.         call    tmsg                    ; write it out
  776.         mov     dx,offset nrmseq        ; Normal (low) intensity again
  777.         call    tmsg
  778.         mov     dx,offset off25         ; Restore cursor position
  779.         call    tmsg
  780.         ret                             ; and return
  781. PUTMOD  ENDP
  782.  
  783. ; Jumping here is the same as a ret.
  784.  
  785. R       PROC    NEAR
  786.         ret
  787. R       ENDP
  788.  
  789. ; Jumping to this location is like retskp.  It assumes the instruction
  790. ;   after the call is a jmp addr.
  791.  
  792. RSKP    PROC    NEAR
  793.         pop     bp
  794.         add     bp,3
  795.         push    bp
  796.         ret
  797. RSKP    ENDP
  798.  
  799. ; Send a break out to the serial port.  Returns normally.
  800. ; Need to handle port directly since ACT's Control Device doesn't
  801. ; have a 'send break' facility.
  802. ; altered the SIO port address from 62HEX to 1AHEX this works for FP
  803. ; I'm not sure about the XI/PC [rwtc] 25.04.88
  804.  
  805. SENDBR  PROC    NEAR
  806.         push    ax
  807.         push    bx
  808.         mov     al,5
  809.         out     1ah,al                  ; Select SIO write register 5
  810.         mov     al,0FAH
  811.         out     1ah,al                  ; Start break
  812.         mov     al,2
  813. sendb0: mov     bx,-1
  814. sendb1: dec     bx                      ; Delay for a while...
  815.         jnz     sendb1
  816.         dec     al
  817.         jnz     sendb0
  818.         mov     al,5
  819.         out     1ah,al                  ; Select SIO write register 5
  820.         mov     al,0EAH
  821.         out     1ah,al                  ; Finished sending break
  822.         pop     bx
  823.         pop     ax
  824.         clc
  825.         ret
  826. SENDBR  ENDP
  827. SENDBL  PROC    NEAR                    ; Send a long break
  828.         call    sendbr                  ; simulate long
  829.         call    sendbr
  830.         call    sendbr
  831.         call    sendbr
  832.         clc
  833.         ret
  834. SENDBL  ENDP
  835.  
  836. ; Initialization for using serial port.  XON/XOFF has already been set by
  837. ; the local initialization routine.  Returns normally.
  838. ; Revised 28 Sept 1986 by [jrd]
  839. SERINI  PROC    NEAR
  840.         cmp     portin,0                ; Initialized already ?
  841.         jne     serin0                  ; Yes, forget it.
  842.         cld                             ; Do increments in string operations
  843. ; Some day we may have an interrupt handler to install...
  844.         call    clrbuf                  ; Clear input buffer.
  845.         push bx
  846.         mov bx,portval          ; get port [jrd]
  847.         mov parmsk,0ffh         ; parity mask, assume parity is None. [jrd]
  848.         cmp [bx].parflg,parnon  ; is it None?
  849.         je serin1               ; e = yes
  850.         mov parmsk,07fh         ; no, pass lower 7 bits as data
  851. serin1: mov bx,[bx].flowc       ; get flow control chars
  852.         mov flowoff,bl          ; xoff or null
  853.         mov flowon,bh           ; xon or null
  854.         pop bx
  855.         mov     portin,1                ; Say we've been through once
  856. serin0: ret                             ; We're done.
  857. SERINI  ENDP
  858.  
  859. ; Reset the serial port.  This is the opposite of serini.  Calling
  860. ; this twice without intervening calls to serini should be harmless.
  861. ; Returns normally.
  862.  
  863. SERRST  PROC    NEAR
  864.         cmp     portin,0                ; Reset already ?
  865.         je      srst1                   ; Yes, forget it
  866. ; One day soon we may want to restore the interrupt handler, I hope...
  867.         mov     portin,0
  868. srst1:  ret                             ; All done.
  869. SERRST  ENDP
  870.  
  871. SHOWKEY PROC    NEAR
  872.         mov     ax,offset shkmsg
  873.         mov     cx,shkmln
  874.         ret
  875. SHOWKEY ENDP
  876.  
  877.  
  878. ; Dumb terminal emulator.
  879. ; Revised 28 Sept 1986 by [jrd]
  880. TERM    PROC    NEAR
  881.         mov     si,ax                   ; this is source
  882.         mov     di,offset ourarg        ; place to store arguments
  883.         push    es                      ; save es
  884.         push    ds
  885.         pop     es                      ; address destination segment
  886.         mov     cx,size termarg
  887.         cld
  888.         rep     movsb                   ; copy into our arg blk
  889.         pop     es                      ; recover es
  890.         and ourarg.flgs,not (prtscr)    ; no screen printing at startup [jrd]
  891.         mov ax,ourarg.captr
  892.         mov captrtn,ax                  ; buffer capture routine
  893.         mov parmsk,0ffh                 ; parity mask, assume parity = None
  894.         cmp ourarg.parity,parnon        ; is parity None?
  895.         je term0a                       ; e = yes, keep all 8 bits
  896.         mov parmsk,07fh                 ; else keep lower 7 bits
  897. term0a: test flags.remflg,d8bit         ; keep 8 bits for displays?
  898.         jnz term0b                      ; nz = yes, 8 bits if possible
  899.         mov parmsk,07fh                 ; else keep lower 7 bits
  900. term0b:
  901.         call    clrmod                  ; Clear mode line
  902.         test    ourarg.flgs,modoff      ; Is mode line disabled ?
  903.         jnz     term0                   ; Yes, skip this
  904.         call    modlin
  905. ;
  906. term0: 
  907.         cmp     inited,0                ; inited yet ?
  908.         jnz     term1                   ; yes, skip this bit...
  909.         mov     bx,34H
  910.         mov     dx,1
  911.         mov     cx,12                   ; Turn on RTS
  912.         int     control
  913.         mov     cx,13                   ; Turn on DTR
  914.         int     control
  915.         mov     inited,1                ; Remember we've inited
  916.  
  917. term1:  call portchr            ; get char from port, apply parity mask
  918.         jnc short term2         ; nc = no char, go on
  919.         call outtty             ; display and capture char
  920. term2:  call    keybd           ; read keyboard and send via translator
  921.         jnc     term1           ; nc = stay in Connect mode
  922.  
  923. term4:  call    clrmod
  924.         ret
  925. term    endp
  926.  
  927. ; put the character in al to the screen, do capture and printing,
  928. ; does translation for Set Input command.
  929. ; Adapted from msyibm.asm [jrd]
  930. outtty  proc    near
  931.         test    flags.remflg,d8bit      ; keep 8 bits for displays?
  932.         jnz     outnp9                  ; nz = yes, 8 bits if possible
  933.         and     al,7fh                  ; remove high bit
  934. outnp9: cmp     rxtable+256,0           ; translation turned off?
  935.         je      outnp7                  ; e = yes, no translation
  936.         push    bx
  937.         mov     bx,offset rxtable       ; address of translate table [jrd]
  938.         xlatb                           ; new char is in al
  939.         pop     bx
  940. outnp7: test    ourarg.flgs,prtscr      ; should we be printing?
  941.         jz      outnop                  ; no, keep going
  942.         push    ax
  943.         mov     ah,lstout               ; write to system printer device
  944.         mov     dl,al
  945.         int     dos
  946.         pop     ax
  947.         jnc     outnop                  ; nc = successful print
  948.         push    ax
  949.         call    beep                    ; else make a noise and
  950.         call    trnprs                  ;  turn off printing
  951.         pop     ax
  952. outnop: test    ourarg.flgs,capt        ; capturing output?
  953.         jz      outnoc                  ; no, forget this part
  954.         push    ax                      ; save char
  955.         call    captrtn                 ; give it captured character
  956.         pop     ax                      ; restore character and keep going
  957. outnoc: test    ourarg.flgs,trnctl      ; debug? if so use Bios tty mode
  958.         jz      outnp4                  ; z = no
  959.         mov     ah,print_out            ; Bios tty screen write
  960.         cmp     al,7fh                  ; Ascii Del char or greater?
  961.         jb      outnp1                  ; b = no
  962.         je      outnp0                  ; e = Del char
  963.         push    ax                      ; save the char
  964.         mov     dl,7eh                  ; output a tilde for 8th bit
  965.         int     dos
  966.         pop     ax                      ; restore char
  967.         and     al,7fh                  ; strip high bit
  968. outnp0: cmp     al,7fh                  ; is char now a DEL?
  969.         jne     outnp1                  ; ne = no
  970.         and     al,3fH                  ; strip next highest bit (Del --> '?')
  971.         jmp     outnp2                  ; send, preceded by caret
  972. outnp1: cmp     al,' '                  ; control char?
  973.         jae     outnp3                  ; ae = no
  974.         add     al,'A'-1                ; make visible
  975. outnp2: push    ax                      ; save char
  976.         mov     dl,5eh                  ; caret
  977.         int     dos                     ; display it
  978.         pop     ax                      ; recover the non-printable char
  979. outnp3: mov     dl,al
  980.         int     dos
  981.         ret
  982. outnp4: cmp     al,bell                 ; bell (Control G)? [jrd]
  983.         jne     outnp5                  ; ne = no
  984.         jmp     beep                    ; use short beep, avoid char loss.
  985. outnp5: or      al,al                   ; catch nulls
  986.         jz      outnp6                  ; z = null, ignore it
  987.         cmp     al,del                  ; catch dels
  988.         je      outnp6                  ; e = del, ignore it
  989.         mov     dl,al                   ; write without intervention.
  990.         mov     ah,conout
  991.         int     dos                     ; else let dos display char
  992. outnp6: ret                             ; and return
  993. outtty  endp
  994.  
  995. ; send the character in al out to the serial port; handle echoing.
  996. ; Can send an 8 bit char while displaying only 7 bits locally.
  997. outprt  proc    near
  998.         test    ourarg.flgs,lclecho     ; echoing?
  999.         jz      outpr1                  ; z = no, forget it
  1000.         push    ax                      ; save char
  1001.         call    outtty                  ; print it
  1002.         pop     ax                      ; restore
  1003. outpr1: mov     ah,al                   ; this is where outchr expects it
  1004.         call    outchr                  ; output to the port
  1005.          nop
  1006.          nop
  1007.          nop                            ; skip returns...
  1008.         ret
  1009. outprt  endp
  1010.  
  1011. ; Get a char from the serial port manager
  1012. ; returns with carry on if a character is available
  1013. portchr proc    near
  1014.         call    prtchr                  ; character at port?
  1015.          jmp    short portc1            ; yes, go handle
  1016.          nop                            ; skip return is stupid...
  1017. portc0: clc                             ; no carry -> no character
  1018.         ret                             ; and return...
  1019. portc1: and     al,parmsk               ; apply 8/7 bit parity mask [jrd]
  1020.         push    bx                      ; Translate incoming char [jrd]
  1021.         mov     bx,offset rxtable       ; address of translate table [jrd]
  1022.         xlat                            ; new char is in al
  1023.         pop     bx
  1024.         or      al,al                   ; catch nulls
  1025.         jz      portc0                  ; z = null, ignore it
  1026.         cmp     al,del                  ; catch dels
  1027.         je      portc0                  ; e = del, ignore it
  1028.         stc                             ; have a character
  1029.         ret                             ; and return
  1030. portchr endp
  1031.  
  1032.  
  1033. ;; keyboard translator action routines, system dependent, called from msugen.
  1034. ; These are invoked by a jump instruction. Return carry clear for normal
  1035. ; processing, return carry set for invoking Quit (kbdflg has transfer char).
  1036.  
  1037. chrout: call    outprt                  ; put char in al to serial port
  1038.         clc                             ; stay in Connect mode
  1039.         ret
  1040.  
  1041. trnprs: push    ax                      ; toggle Copy screen to printer
  1042.         test    ourarg.flgs,prtscr      ; are we currently printing?
  1043.         jnz     trnpr2                  ; nz = yes, its on and going off
  1044.         mov     ah,ioctl
  1045.         mov     al,7                    ; get output status of printer
  1046.         push    bx
  1047.         mov     bx,4                    ; file handle for system printer
  1048.         int     dos
  1049.         pop     bx
  1050.         jc      trnpr1                  ; c = printer not ready
  1051.         cmp     al,0ffh                 ; Ready status?
  1052.         je      trnpr2                  ; e = Ready
  1053. trnpr1: call    beep                    ; Not Ready, complain
  1054.         jmp     trnpr3                  ; and ignore request
  1055. trnpr2: xor     ourarg.flgs,prtscr      ; flip the flag
  1056. trnpr3: pop     ax
  1057.         clc
  1058.         ret
  1059.  
  1060.  
  1061. klogon  proc    near                    ; resume logging (if any)
  1062.         test    flags.capflg,logses     ; session logging enabled?
  1063.         jz      klogn                   ; z = no, forget it
  1064.         or      ourarg.flgs,capt        ; turn on capture flag
  1065. klogn:  clc
  1066.         ret
  1067. klogon  endp
  1068.  
  1069. klogof  proc    near                    ; suspend logging (if any)
  1070.         and     argadr.flgs,not capt    ; stop capturing
  1071. klogo:  clc
  1072.         ret
  1073. klogof  endp
  1074.  
  1075. snull:  mov     ah,0                    ; send a null
  1076.         call    outchr                  ; send without echo or logging
  1077.          nop
  1078.          nop
  1079.          nop
  1080.         clc
  1081.         ret
  1082.  
  1083. lng_br    proc    near
  1084.     call    sendbl
  1085. lng_br    endp
  1086.  
  1087. kdos:   mov     al,'P'                  ; Push to DOS
  1088.         jmp     short cmdcom
  1089. cstatus:mov     al,'S'                  ; these commands exit Connect mode
  1090.         jmp     short cmdcom
  1091. cquit:  mov     al,'C'
  1092.         jmp     short cmdcom
  1093. chang:    mov    al,'H'            ; Hangup drop DTR & RTS
  1094.         jmp     short cmdcom
  1095. cquery: mov     al,'?'
  1096.         jmp     short cmdcom
  1097. cmdcom: mov     kbdflg,al               ; pass char to msster.asm via kbdflg
  1098.         stc                             ; say exit Connect mode
  1099.         ret
  1100.                                         ;; end of action routines
  1101.  
  1102. ; Print a message to the screen.  Returns normally.
  1103.  
  1104. TMSG    PROC    NEAR
  1105.         push    ax
  1106.         push    bx
  1107.         push    cx
  1108.         push    dx              ; dx has offset of message.
  1109.         mov     ah,prstr
  1110.         int     dos
  1111.         pop     dx
  1112.         pop     cx
  1113.         pop     bx
  1114.         pop     ax
  1115.         ret
  1116. TMSG    ENDP
  1117.  
  1118. SHOMODEM PROC   NEAR
  1119.         mov     ah,cmcfm                ; get a confirm
  1120.         call    comnd
  1121.          jmp    r                       ; no confirm
  1122.          nop
  1123.         call    serini                  ; activate port to get status
  1124.         call    serrst                  ; turn off port again
  1125.         mov     ah,prstr
  1126.         mov     dx,offset msmsg1        ; modem ready msg
  1127.         test    mdstreg,20h             ; is DSR asserted?
  1128.         jz      shomd1                  ; z = no
  1129.         mov     dx,offset msmsg2        ; say not asserted
  1130. shomd1: int     dos
  1131.         mov     dx,offset msmsg3        ; CD asserted msg
  1132.         test    mdstreg,80h             ; CD asserted?
  1133.         jz      shomd2                  ; z = no
  1134.         mov     dx,offset msmsg4        ; say not asserted
  1135. shomd2: int     dos
  1136.         mov     dx,offset msmsg5        ; CTS asserted msg
  1137.         test    mdstreg,10h             ; CTS asserted?
  1138.         jz      shomd3                  ; z = no
  1139.         mov     dx,offset msmsg6        ; say not asserted
  1140. shomd3: int     dos
  1141.         jmp     rskp
  1142. SHOMODEM ENDP
  1143.  
  1144. ; Set heath emulation on/off.
  1145.  
  1146. VTS     PROC    NEAR
  1147.         jmp     notimp
  1148. VTS     ENDP
  1149.  
  1150. VTSTAT  PROC    NEAR                    ; For use by Status in mssset [jrd]
  1151.         ret                             ; no emulator status to report
  1152. VTSTAT  ENDP
  1153.  
  1154. ; Save the screen to a buffer and then append buffer to a disk file. [jrd]
  1155. ; Default filename is Kermit.scn; actual file can be a device too. Filename
  1156. ; is determined by mssset and is passed as pointer dmpname.
  1157.  
  1158. DUMPSCR PROC    NEAR    ; Dumps screen contents to a file. Just Beeps here
  1159.         call beep       ; [jrd]
  1160.         ret
  1161. DUMPSCR ENDP
  1162.  
  1163.  
  1164. CODE    ENDS
  1165.         END
  1166.