Site hosted by Angelfire.com: Build your free website today!
NAME
  COM, ON COM Statements

SYNOPSIS
  COM(n%) ON
  COM(n%) OFF
  COM(n%) STOP
  ON COM(n%) GOSUB line
      o n%              The number of a COM (serial) port (1 or 2).
      o COM(n%) ON      Enables trapping of a communications event.
      o COM(n%) OFF     Disables communications event trapping.
      o COM(n%) STOP    Suspends communications event trapping. Events are
                        processed once event trapping is enabled by COM ON.
      o line            The label or number of the first line of the
                        event-trapping subroutine.

DESCRIPTION
  COM enables, disables, or suspends event trapping on a communications port.
  If event trapping is enabled, ON COM branches to a subroutine whenever
  characters are received at the port.

  Example:
      COM(1) ON       'Enable event trapping on port 1.
      ON COM(1) GOSUB ComHandler
      DO : LOOP WHILE INKEY$ = ""
      COM(1) OFF
      END
      ComHandler:
          PRINT "Something was typed at the terminal attached to COM1."
          RETURN

SEE ALSO
  OPEN COM