home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / forth / compiler / fpc / tcom / debugger / smonitor.seq < prev    next >
Text File  |  1990-09-11  |  859b  |  25 lines

  1. \ MONITOR.SEQ
  2.  
  3. \ *******************************************************************
  4. \
  5. \    MONITOR
  6. \    a program which emulates an ordinary terminal
  7. \
  8. \ -------------------------------------------------------------------
  9.  
  10. : monitor ( -- ) \ behave like a "dumb terminal"
  11.         ?comminit
  12.         cr ." << press Esc to stop >>" cr
  13.         begin   com-cnt 0<> if  com-get femit   \ display what's received
  14.                                 at? drop 79 >= if cr then
  15.                             then
  16.                 key? if   key dup               \ send what's typed
  17.                           control [ <> if    com-out false
  18.                                        else  drop true  \ exit on <esc>
  19.                                        then
  20.                      else false
  21.                      then
  22.                 until
  23.         cr ;
  24.  
  25.