[comp.sys.apple] Changing IIgs Modem port Baud Rate from Basic

gwyn@BRL.ARPA.UUCP (05/28/87)

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

delaney@wnre.aecl.CDN.UUCP (05/28/87)

Can anyone give me some help on changing the baud rate of the IIgs modem
port from BASIC or other than from the desk top which requires you to 
reboot.  I need this so I can go from one system to another in DECOM and
I really don't want to have to keep rebooting
Thanks in advance
Grant

ranger@ecsvax.UUCP (05/30/87)

In article <710*delaney@wnre.aecl.cdn>, delaney@wnre.aecl.CDN (Grant Delaney) writes:
> Can anyone give me some help on changing the baud rate of the IIgs modem
> port from BASIC or other than from the desk top which requires you to 
> reboot.  I need this so I can go from one system to another in DECOM and
It works the same as the Super Serial Card from Basic, ie

PRINT CHR$(4);"PR#2"
PRINT CHR$(9);"8B"

This sets the output to slot 2, prints a Control-A to the slot followed
by a baud command of the form nB where n is from 0 to 15 and represent
the binary value of the 4 switch settings (off=1).  0 is not defined
1 = 50, 2=75 baud, 6=300 baud, 8=1200, 10=2400 baud, 14= 9600baud,
15=19,200 baud.

Rick Fincher
ranger@ecsvax
> I really don't want to have to keep rebooting