jhs@MITRE-BEDFORD.ARPA (08/31/87)
The following is approximately what the Avatex modem user manual provides for a dumb ASCII terminal program to get on the air with. It may or may not work "right out of the box" for you but you should be able to get it working with a little experimentation. ------------------------------c-u-t---h-e-r-e--------------------------------- 10 GOTO 300:REM Dumb Terminal Prog. 100 STATUS #3,AVAR:IF PEEK(747)=0 THEN 200 120 GET #3,CHAR:IF CHAR=0 OR CHAR=10 THEN 200 130 PUT #4,CHAR 200 IF PEEK(764)=255 THEN 100 210 GET #2,KEY:PUT #3,KEY:GOTO 100 300 REM I/O Setup for Dumb Terminal. 310 OPEN #2,4,0,"K:" 320 OPEN #3,13,0,"R:" 330 OPEN #4,8,0,"E:" 340 XIO 34,#3,192+48+3,0,"R:" 350 XIO 40,#3,0,0,"R:" 360 GOTO 100:REM Go to it! ------------------------------c-u-t---h-e-r-e--------------------------------- The above just does a loop that checks for an incoming character (line 100) and if it gets one, slaps it on the screen (line 130), then checks the keyboard for input (line 200) and if it sees that a character was pressed (loc. 764 not = 255), slings it out to the outgoing side of the R: device. *****> If you are adventuresome, you can turn this simple program into a version that can capture a file off the modem. One way to do this would be to change line 330 to open a file "D1:YOURFILE.EXT" or whatever. Be sure to close the file first; in fact, my standard practice is NEVER to OPEN a file without CLOSING it first -- saves a whole lot of dumb error messages. The program below has this feature added. Possibly the simplest way to capture a file is to press BREAK, change line 350 to have a device:filename specification inside the quotes, and type "RUN" again. Then type the command to send the file. When it has finished being sent, press BREAK, type CLOSE #4, and that should do it. ------------------------------c-u-t---h-e-r-e--------------------------------- 10 GOTO 300:REM Dumb Terminal Prog. 100 STATUS #3,AVAR:IF PEEK(747)=0 THEN 200 120 GET #3,CHAR:IF CHAR=0 OR CHAR=10 THEN 200 130 PUT #4,CHAR 200 IF PEEK(764)=255 THEN 100 210 GET #2,KEY:IF KEY= 220 PUT #3,KEY:GOTO 100 300 REM I/O Setup for Dumb Terminal. 310 CLOSE #2:OPEN #2,4,0,"K:" 320 CLOSE #3:OPEN #3,13,0,"R:" 330 CLOSE #4:OPEN #4,8,0,"E:" <---- change E: to your Dn:FILE.EXT 340 XIO 34,#3,192+48+3,0,"R:" 350 XIO 40,#3,0,0,"R:" 360 GOTO 100:REM Go to it! ------------------------------c-u-t---h-e-r-e-------------------------------- This may or may not work without fiddling, but it ought to be reasonably easy to get it working. And it surely is the simplest way to get a downloading capability -- as well as learning a lot in the process! If you get it working, let me know and I will send you uudecode and a fancier terminal emulator or two. -John S., jhs@mitre-bedford.