[comp.sys.apple] Configuring Serial Ports ...

ugfelong@cs.Buffalo.EDU (Edward Felong) (11/01/88)

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 ?

I just thought I'd stop lurking in comp.sys.apple and
vote "for the good old days" of appleII+ec  :^)

(by the way my news reader lets me "/GS/j"  which junk's
all of those unsightly IIgs articles, or in other words
I vote YES to comp.sys.gs )

				Ed

matthew@sunpix.UUCP ( Sun NCAA) (11/03/88)

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     |

ugfelong@cs.Buffalo.EDU (Edward Felong) (11/10/88)

In article <257@greens.UUCP> matthew@sunpix.UUCP ( Sun NCAA) writes:
>In article <2340@cs.Buffalo.EDU>, ugfelong@cs.Buffalo.EDU (Edward Felong) writes:
>> 
>> What exactly happens when the serial ports are configured ?
>> 
>The serial port configurations are stored in auxilary memory as follows:

[much deleted ...]

>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
		^^^
should be	$3E


>	LDA	#$03
>	STA	$43	#SET DESTINATION HIGH
>	LDA	#$00
>	STA	$42	#SET DESTINATION LOW
>	SEC		#FLAG A MOVE FROM AUX MEMORY
	^^^
	CLC  moved bytes FROM AUX


>	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
                ^^^
should be       $3E

>	LDA	#$04
>	STA	$43	#SET DESTINATION HIGH
>	LDA	#$78
>	STA	$42	#SET DESTINATION LOW
>	CLC		#FLAG A MOVE TO AUX MEMORY
	^^^
	SEC  moved bytes TO AUX


>	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     |




I got the printer to work fine with the changes I indicated.
Could someone recommend some reference material for what the
"Applesoft BASIC Programmer's Reference Manual" lists as:

	$C000   $CFFF   Hardware I/O addresses

Just getting the "ProDos Techincal Reference Manual" from the
dealer I bought my //c from was like pulling teeth, and I haven't
seen any ads for books in any magazines.

Please e-mail since this appears to be of NO interest to anyone else
in this newsgroup.  (wouldn't want to get in the way of those GS articles :)


                                               Ed Felong


   'ugfelong@cs.buffalo.EDU'  or maybe 'v095gzmx@sunybcs.BITNET'

aash@ms.uky.edu ( Aashi Deacon ) (11/11/88)

In article <2569@cs.Buffalo.EDU> ugfelong@sunybcs.UUCP (Edward Felong) writes:
>
>Please e-mail since this appears to be of NO interest to anyone else
>in this newsgroup.  (wouldn't want to get in the way of those GS articles :)
>

There IS interest here for technical "other apple" information.
I have an apple //c and, for instance, would like to know of
some good reference books (not the wimpy books that came with it).
I would also like a good assembly language book, and 
some good information about C compilers.

AND (haha, i want everthing no? :-)  how about some information
on how to upgrade memory?  add a hard drive?  modem?  external
keyboard?  will an extended keyboard (like for Mac II) work?

is this a good start?