This program opens a modem as a device, sends it AT commands and prints whatever the modem sends back until it times out. It shows the basic pattern for talking to a serial device from Basic.
! Example of how to get information from a modem00005 BEGIN00010 OPEN (1) "TY"00020 REM PRINT (1) "ATDTEOQ1&C2"00030 PRINT (1) "ATDT135,94350003"00035 WAIT 500040 INPUT (1,TIM=60,ERR=00100) R$; PRINT R$; GOTO 0004000050 PRINT "HIT ctrl-x TO BREAK"00055 PRINT (1) "+++",00056 PRINT (1) "ATH"00100 PRINT "Timed out waiting for a response"00999 ENDNotes
The modem is opened as device TY. Use the device name and dial string for your own system.