QBASIC Modem

Status
Not open for further replies.

sir nerdalot

In Runtime
Messages
142
Location
Wouldn't you like to know?
What I want to do is make a program that can dial people's phones using a modem in QBASIC. I basically want to make a program sort of like what the guy had in the 1983 film WarGames. I am a beginner at QBASIC but I am confident I can do this program, with a bit of help. I read the QBASIC help files on opening com ports and this is what I came up with.


OPEN "COM1: [300] [,[E] [,[7] [,1]]]] BIN" [FOR OUTPUT] AS [#]255% [LEN=128%]


What I want to know is: Is there any code to make QBASIC make a modem call a specific number? Also, what com port does a modem generally use?
 
Also, what com port does a modem generally use?
Just look in the device manager. It will tell you what com port your modem is using.

I don't know QBASIC, but the principles are the same regardless of what language you use. You need to open the appropriate serial port, and dial the number using AT commands. You can test out your commands in Hyperterminal before you code them.
For information on how to use AT commands, check here: Serial Programming:Modems and AT Commands - Wikibooks, collection of open-content textbooks
 
What if the modem is on comport 2?
Then your program should figure it out. If you want to take the easy route, prompt the user for the appropriate com port. Why do you want to know what port other people use anyway?
 
well it does, because I need to know which port to make the program open. If I say "Open comport1", but it is in fact a serial port for example, then it will send the info I tell it to send to whatever is connected to the serial port and potentially f**k up that peice of hardware.
 
Status
Not open for further replies.
Back
Top Bottom