arkie@m-net.UUCP (Joseph Wisdom) (02/05/89)
I am looking for modem routines for the reading of, and the writing to the modem output port for a Model 4 computer, in BASIC. All help would be greatly appreciated. Please send any mail to ...uunet.uu.net!cardiology.ummc.umich.edu!m-net!arkie. Thanks in advance! - j
pa1044@sdcc15.ucsd.edu (pa1044) (02/06/89)
In article <2807@m2-net.UUCP> arkie@m-net.UUCP (Joseph Wisdom) writes: >I am looking for modem routines for the reading of, and the writing >to the modem output port for a Model 4 computer, in BASIC. If you mean in Model 4 mode, that would be pretty difficult. The two best ways to monitor the RS-232C (that's the modem port) are: 1) To use the RS-232 interrupt. This requires machine language to set up. 2) To use the COM/DVR driver to set up its own interrupt. This requires that you make supervisor calls to receive and send characters, which also require some minimal machine code. If the reason you want this is for some BASIC application in Model 4 mode, and you don't want to fool around with assembly language, I strongly suggest that you look around for a Model 4 host program. This interfaces with the normal screen and keyboard routines so that anything normally sent to the screen is also sent to the RS-232, and anything coming from the RS-232 is treated as if it came from the keyboard. If you can't find a host program, you can easily simulate one by using the COM/DVR, and using the TRSDOS/LS-DOS command LINK. I imagine that it is possible to use the RS-232 port using only BASIC commands (I KNOW it's possible in Model III mode, so it's probably possible in Model 4 mode). This would just involve regular INP and OUT commands to various ports. However, considering the speed of BASIC, the fastest you'll be able to go is about 110 baud, and even less if you want to do something besides display the characters on the screen and send keyboard output to the RS-232. -- John C. Fowler, pa1044@iugrad2.UCSD.EDU (I could list others, but why?) Disclaimer: Could you imagine the ramifications if the Regents of the University of California held MY opinions? --
heath@aplcen.apl.jhu.edu (David Heath) (02/07/89)
For low baud rates, this should be easy. I've never tried this, but: Install the com/dvr driver from DOS (set *cl com/dvr), and set up the port with setcom. Then, in basic, do something like: open"i",1,"*cl" open"o",2,"*cl" Then use input#, line input#, or input$() on file 1 to read the rs232 port and use print# or write# on file 2 to write to the rs232 port. See manual on basic file io; it's been years. ------- Dave Heath (heath@aplcen.apl.jhu.edu) Newsgroups: comp.sys.tandy Subject: Re: Modem routines for the Model 4? Summary: Expires: References: <2807@m2-net.UUCP> <1041@sdcc15.ucsd.edu> Sender: Reply-To: heath@aplcen.apl.jhu.edu (David Heath) Followup-To: Distribution: usa Organization: Johns Hopkins University Keywords: model 4, trs80, modem routines For low baud rates, this should be easy. I've never tried this, but: Install the com/dvr driver from DOS (set *cl com/dvr), and set up the port with setcom. Then, in basic, do something like: open"i",1,"*cl" open"o",2,"*cl" Then use input#, line input#, or input$() on file 1 to read the rs232 port and use print# or write# on file 2 to write to the rs232 port. See manual on basic file io; it's been years. ------- Dave Heath (heath@aplcen.apl.jhu.edu)