home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 300-399 / ff330.lzh / Vt100 / RexxSamples / TestFor.rexx < prev    next >
OS/2 REXX Batch file  |  1990-03-02  |  406b  |  28 lines

  1. /* */
  2. trace R
  3.  
  4. portname = "REXX-VT100"
  5. Port = openport(portname)
  6.  
  7. if Port = '00000000'x
  8. then do
  9.     say "Couldn't open the port."
  10.     exit 20
  11. end
  12.  
  13. address VT100-serial.device-00 "FORWARD" portname
  14.  
  15. trace ?R
  16. /*  Need to getpkt(port), getarg(packet), reply(packet,0) */
  17. packet = getpkt(portname)
  18. if packet ~= '00000000'x
  19. then do
  20.     message.6 = getarg(packet)
  21.     call reply packet, 0
  22. end
  23.  
  24. call closeport port
  25.  
  26. nop
  27. exit
  28.