Questions about 8250 and 1541

From: Baltissen, GJPAA (Ruud) <ruud.baltissen_at_apg.nl>
Date: Wed, 9 Jun 2010 13:10:36 +0200
Message-ID: <3FAF2D74FB701448B997B2CB7A0076C20F4C1306@winsv116.office01.internalcorp.net>
Hallo allemaal,


I'm busy disassembling the 8250 and I found out that the book isn't that
good commented as I thought. Fortunately lots of the 1541 is the same as
the 8250 so I could copy a lot of the comment directly from the 1541
into the 8250. But the book gets some credit as well: occasionally I
found comment missing in the equivalent parts of the 1541. 

The 1541 has this part which always had made me wonder:

;**  TALK
B_E680
		jsr	OpenChan4Read	; open channel for reading
		nop				
		nop
		nop
		bne	J_E68E

;**  LISTEN
B_E688
		jsr	OpenChan4Write	; open channel for writing
		nop				
		nop
		nop
J_E68E
		jsr	CheckREL		; verify file type
		cmp	#$04			; file type REL or
Direct access?
		bcs	B_E698		; yes, ->


The 8250 equivalent:

;**  TALK
B_F0E9					;
[F0E9]
		jsr	OpenChan4Read	;
[D83B]

		lda	PAD2
		ora	#$10			; clear DAV
		sta	PAD2
		bne	J_F103		; always ->
  
;**  LISTEN
B_F0F6					;
[F0F6]
		jsr	OpenChan4Write	;
[D856]

		lda	#$04			; clear NRFD 
		ora	PAD2
		and	#$FE			; set ATN ???
		sta	PAD2
J_F103					;
[F103]
		jsr	Check4REL		;
[D873]
		cmp	#$04			; REL or Direct access
file?
		bcs	B_F10D		; yes, ->
 

The interesting part is the line 'bne J_E68E' in the 1541 part. In the
8250 the equivalent branch will always happen due to the 'ora #$10'
instruction. But this is missing in the 1541 and that caused my to study
the 'Open a channel for writing' subroutine. The last part of the
'OpenChan4Write' subroutine:

		sec				; flag for channel
already allocated
		lda	LINTAB,X		; already in use?
		bmi	B_D106		; no, ->

		and	#$0F
		sta	CURCHN

		tax
		clc				; flag for ok
B_D106
		rts

Question: what will happen if the channel is zero ???



The book mentions a diagnostic clip that causes the 8250 to autostart a
program. I never heard of this clip, anyone of you?

;**  Check if the diagnostic clip has been connected
DiagnosticClip				;
[F1A3]
		lda	IeeeDI		; data = 0 ?
		bne	B_F19B		; no, -> no clip
  
		lda	PAD2
		ora	#$10			; clear DAV
		sta	PAD2

		lda	PBD2
		and	#$80			; NRFD (L)?
		beq	B_F19B		; yes, ->
  
		lda	PAD2
		and	#$EF			; set DAV (L)
		sta	PAD2

		lda	PBD2
		and	#$80			; NRFD (L)?
		bne	B_F19B		; no, ->

;* Clip found, start first USR program
B_F1C6					;
[F1C6]
		lda	IeeeDI
		beq	B_F1C6		; wait until clip is removed
  

IMHO the signal DAV is connected to NRFD and one or more data lines
through an inverter. Any comment is welcome!


--
     ___
    / __|__
   / /  |_/     Groetjes, Ruud
   \ \__|_\
    \___|       URL: Ruud.C64.org


 
De informatie in dit e-mailbericht is vertrouwelijk en uitsluitend bestemd voor de 
geadresseerde. Wanneer u dit bericht per abuis ontvangt, verzoeken wij u contact op te 
nemen met de afzender per kerende e-mail. Verder verzoeken wij u in dat geval dit 
e-mailbericht te vernietigen en de inhoud ervan aan niemand openbaar te maken. 
Wij aanvaarden geen aansprakelijkheid voor onjuiste, onvolledige dan wel ontijdige 
overbrenging van de inhoud van een verzonden e-mailbericht, noch voor daarbij 
overgebrachte virussen.

APG Algemene Pensioen Groep NV is gevestigd te Heerlen en is ingeschreven in het 
handelsregister van de Kamer van Koophandel Limburg onder nummer 14099617


The information contained in this e-mail is confidential and may be privileged. 
It may be read, copied and used only by the intended recipient. 
If you have received it in error, please contact the sender immediately by 
return e-mail; please delete in this case the e-mail and do not disclose it's 
contents to any person. We don't accept liability for any errors, omissions, 
delays of receipt or viruses in the contents of this message which arise as a 
result of e-mail transmission.

APG Algemene Pensioen Groep NV is registered in the trade register of the Chamber 
of Commerce Limburg, The Netherlands, registration number: 14099617


       Message was sent through the cbm-hackers mailing list
Received on 2010-06-09 12:00:03

Archive generated by hypermail 2.2.0.