home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
324.lha
/
rexxserdev.library_v2.00
/
testsend.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1989-12-05
|
1KB
|
38 lines
/* part of another serial port test program. */
/* works best when connected to another computer via a null modem. */
/* first run testrecv in a one CLI; then run testsend in another CLI. */
/* open the Rexx support library */
signal on break_c
if ~show('L',"rexxsupport.library") then do
if addlib('rexxsupport.library',0,-30,0) then
say 'added rexxsupport.library'
else do;
say 'support library not available'
exit 10
end
end
if ~show( 'L', "rexxserdev.library" ) then do
if addlib( 'rexxserdev.library', 0, -30, 0 ) then
say 'added rexxserdev.library'
else do;
say 'support library not available'
exit 10
end
end
libaddr = serlibbase()
say 'serial library base =' libaddr
dh = seropen( 'serial.device', 0 )
if dh = 0 then say 'serial device not opened'
text = 'send stuff out port again and again.' || '0d'x
say 'calling SerWrite'
do for 500
if ~serwrite( dh, text, length( text ) ) then say 'nothing written'
end
break_c:
say 'back from SerWrite'
if serclose( dh ) then say 'serial device closed'