Path: utzoo!utgpu!attcan!uunet!peregrine!elroy!ames!mailrus!ncar!gatech!mcnc!rti!sunpix!matthew From: matthew@sunpix.UUCP ( Sun NCAA) Newsgroups: comp.sys.apple Subject: Re: Configuring Serial Ports ... Keywords: help Message-ID: <257@greens.UUCP> Date: 2 Nov 88 21:59:51 GMT References: <2340@cs.Buffalo.EDU> Organization: Sun Microsystems, Research Triangle Park, NC Lines: 90 In article <2340@cs.Buffalo.EDU>, ugfelong@cs.Buffalo.EDU (Edward Felong) writes: > > What exactly happens when the serial ports are configured ? > Some of my software doesn't recognize a 4800 baud printer > in slot 1 unless I turn the computer on with system utilities first. > Can I just BSAVE a section of memory and BLOAD it with startup > program ? > The serial port configurations are stored in auxilary memory as follows: $0478 thru $047B - Serial Port #1 ================================= $0478 ACIA control register $0479 ACIA command register $047A Flags bit 7: echo output on display ( 0 = no echo ) bit 6: generate LF after CR ( 0 = no LF ) bit 5: always 0 bit 4: always 0 bit 3: always 0 bit 2: always 0 bit 1: always 0 bit 0: 1 = communications port; 0 = printer port $047B max line length bit 7 - 1: line length ( 0 = do not insert CR ) $047C thru $047F - Serial Port #1 ================================= $047C ACIA control register $047D ACIA command register $047E Flags bit 7: echo output on display ( 0 = no echo ) bit 6: generate LF after CR ( 0 = no LF ) bit 5: always 0 bit 4: always 0 bit 3: always 0 bit 2: always 0 bit 1: always 0 bit 0: 1 = communications port; 0 = printer port $047F max line length bit 7 - 1: line length ( 0 = do not insert CR ) to capture these values using machine language do the following: LDA #$04 STA $3D #SET SOURCE START HIGH STA $3F #SET SOURCE END HIGH LDA #$78 STA $3C #SET SOURCE START LOW LDA #$7F STA $3D #SET SOURCE END LOW LDA #$03 STA $43 #SET DESTINATION HIGH LDA #$00 STA $42 #SET DESTINATION LOW SEC #FLAG A MOVE FROM AUX MEMORY JSR $C311 #DO THE ACTUAL MOVE RTS #MAIN MEMORY $0300-$0307 NOW HAVE VALUES and this to set all of them: LDA #$03 STA $3D #SET SOURCE START HIGH STA $3F #SET SOURCE END HIGH LDA #$00 STA $3C #SET SOURCE START LOW LDA #$07 STA $3D #SET SOURCE END LOW LDA #$04 STA $43 #SET DESTINATION HIGH LDA #$78 STA $42 #SET DESTINATION LOW CLC #FLAG A MOVE TO AUX MEMORY JSR $C311 #DO THE ACTUAL MOVE RTS #AUX MEMORY $0478-$047F NOW HAS #MAIN MEMORY $0300-$0307 VALUES -- Matthew Lee Stier (919) 469-8300| Sun Microsystems --- RTP, NC 27560| "Wisconsin Escapee" uucp: {sun, rti}!sunpix!matthew |