Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!utcsri!utegc!utai!garfield!john13 From: john13@garfield.UUCP Newsgroups: comp.sys.cbm Subject: Re: opening modem Message-ID: <3624@garfield.UUCP> Date: Mon, 4-May-87 13:25:30 EDT Article-I.D.: garfield.3624 Posted: Mon May 4 13:25:30 1987 Date-Received: Wed, 6-May-87 03:54:27 EDT References: <135NU020520@NDSUVM1> <1406@msudoc.UUCP> Organization: CS Dept., Memorial U. of Newfoundland, St. John's Lines: 51 There are 2 popular kinds of modems on the C-64, the "Mitey-Mo" kind and the "16XX" kind. Hayes compatible modems use the same kind of serial protocol as the 16XX modems. First of all, when you open the modem as a file, you must specify a filename that determines baud rate, word size, etc. Back when I was terminalizing on the 64, the usual format was open 2,2,2,chr$(6)+chr$(0) You will need to get hold of a copy of the C-64 Programmer's Reference Guide to determine what bits (in the first character) need to be set for your preferred baud rate. After that, the Hayes compatibles work by just printing "AT" commands - note that you should try both upper and lower case "AT"'s, since the modem may or may not know about Petscii. Other auto-dial modems, Mitey-mo's, 1650's, etc must be dialed by diddling the hardware bits on the serial port. Sorry, I no longer have my 64, but I wrote stuff to do this for both types of modems, lessee if I can remember... (as he cheats and digs out a memory map). poke 56579, (6 or 0, not sure) to set serial configuration poke 56577, 32 or 4 to pick up and hang up. Mitey-mo and 16XX use opposite signals, which accounts for the incompatibility of their software. Mitey-mo needs to be set explicitly to originate by setting one of the other bits in 56577. For 16XX, originate is the default. You will be able to tell the answer/originate bit by the carrier the modem will send when you set it to answer. I'm not 100% sure about the 32/4 bits being right...however you will quickly determine the right ones through trial and error and listening to see when the phone is being picked up. To write an autodial routine, you need to leave pauses 1) after picking up the phone to let dial tone kick in 2) short pauses between clicks within the same number 3) medium length pauses between distinct numbers Of course, the best solution is a 1670 or other Hayes-type modem which accepts AT commands. Watch out for the auto-answer of the 1670, though... I used to have to run a program to turn it off when I didn'y want to unplug it! ( open 2,2,2,chr$(6)+chr$(0) print#2,"ATS0=0" close2 ) John