home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / computervision / kermit.bufemp < prev    next >
Text File  |  2020-01-01  |  1KB  |  35 lines

  1. ; 18 jly 85 esj converted
  2. ;;;;;;;;;;;;;;;;;;;;;;;;;; BUFEMP ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  3.       E'F A:S(NWLS)
  4.       E'O BUFEMP.(BUFFER,LEN)
  5.  
  6. ;     write out the content of the buffer out to the receiving disk file
  7. ;     BUFFER is an integer array which holds the data
  8. ;     LEN tells how many bytes are there in this buffer array
  9. ;
  10. ; NOTE -- the following /INCLUDES refer to files that are included below
  11. ; without the "BYU.PROG." prefix.  There are many /INCLUDES for these files,
  12. ; so watch out!
  13.  
  14. /INCLUDE BYU.PROG.KERMIT.SYM.EQU.KERCOM
  15. /INCLUDE BYU.PROG.KERMIT.SYM.EQU.KERDEF
  16.  
  17.       I'R BUFFER(132),LEN,CH,I,T
  18.  
  19. #     E'E HEXDMPP.(0,LEN,0,BUFFER)
  20.  
  21.       I=0                           ;start with the very first charact
  22.       W'E (I.L.LEN)                 ;put LEN characters into disk file
  23.          T=BUFFER(I)                ;get the next character from buffe
  24.          W'R (T.EQ.MYQUOTE)         ;is this my quote character
  25.             I=I+1                   ;increment the counter
  26.             T=BUFFER(I)             ;get next character from buffer
  27.             W'R (T.NE.MYQUOTE), T=CTL.(T)  ;is this quote character the
  28.                                     ;actual QUOTE character
  29.          E'L
  30.          W'R (T.NE.LF), E'E DPUTCH.(T,FD) ;filter out LF
  31.          I=I+1
  32.       E'W
  33.       F'N
  34.       E'N
  35.