Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!sri-spam!ames!sdcsvax!ucbvax!BRL.ARPA!gwyn From: gwyn@BRL.ARPA.UUCP Newsgroups: comp.sys.apple Subject: Re: Changing IIgs Modem port Baud Rate from Basic Message-ID: <8705280257.aa09776@VGR.BRL.ARPA> Date: Thu, 28-May-87 02:57:53 EDT Article-I.D.: VGR.8705280257.aa09776 Posted: Thu May 28 02:57:53 1987 Date-Received: Sat, 30-May-87 01:14:18 EDT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 20 According to the 8530 SCC info I posted recently, you need to do something like the following (note: BASIC syntax may be wrong; I don't use BASIC much). 10000 REM subroutine to alter baud rate of modem port 10001 REM invoke with BR = desired baud rate then GOSUB 10000 10002 REM 10010 REM I assume a 16x clock is being used; could be 1x, 32x, 64x 10011 CX = 16 : REM clock divisor (see above note) 10012 XT = 3.6864 : REM Apple IIGS crystal oscillator frequency, in MHz 10020 TC = INT( (XT / CX) / (2 * BR) * 1000000 - 2 + 0.5 ) : REM time constant 10021 HB = INT( TC / 256 + 0.5 ) : REM high byte of TC 10022 LB = INT( TC - HB * 256 + 0.5 ) : REM low byte of TC 10030 RA = -16328 : REM modem port register adress ($C038) 10031 DA = -16326 : REM modem port data address ($C03A) 10040 POKE RA, 12 : REM prepare to write register 12 10041 POKE RA, LB : REM set low byte of time constant 10045 POKE RA, 13 : REM prepare to write register 13 10046 POKE RA, HB : REM set high byte of time constant 10050 RETURN