??cr .( ** Serial line interface, drivers, xmodem, connect )
multi

fload risc_os.serial_dev
fload lib.interval
fload lib.Xmodem

\ fload lib.modem+
fload lib.connect

driver InternalPC
driver Internal

fload tools.interface

modem also
: disconnect	true is disconnect? ;

: connect	drop true ;
menu: handshake
	rts/cts		p" switch on hardware flow control"
	no-flow-control	p" switch off flow control"
	;
menu: comspeed
	38400-baud	p" set baud rate"
	19200-baud	p" set baud rate"
	9600-baud	p" set baud rate"
	2400-baud	p" set baud rate" ;
		
menu: RS-232-Quit
	disconnect	p" Disconnect from modem" ;

: quit-rs232	m-butt? 0= ?exit RS-232-Quit ?execute ;


menu: RS-232-Configure
	connect		p" Connect to the serial port"
	handshake	p" Set handshaking mode"
	comspeed	p" Set speed of RS232 interface" ;

: connect
	multi serve-hotspot
	0 0 is help-text-pos  #lines is bottom-line 
	connect#channel m-open line-modes
	0 begin RS-232-Configure ?execute dup until drop
	p" Press MENU for Quit option" ['] quit-rs232  0 0 #columns 2/ #lines  mouse-action-field
	modem> >modem
	listener sleep m-close ??cr ." disconnected" cr ;	

??cr .( --- connect --- will connect you to the modem ) cr
only forth also definitions
