Re: Diskcopy

From: Marko Mäkelä (
Date: 2004-09-09 10:19:00

Hi Ruud,

> But what puzzles me: I send the bytes in blocks of 256 bytes. And the last
> one is received with EOI = True. And that is what I do not understand.

Have you looked at the KERNAL routines?  At least since the Vic-20, there
is a one-byte buffer for handling EOI.

> B_036A	sty	$00
> 		tya
> 		lda	($01),Y
> 		sei
> 		jsr	P_FFD2		; $FFD2
> 		cli
> ;		lda	$90
> ;		bne	B_037C
> 		ldy	$00
> 		iny
> 		bne	B_036A
> B_037C	jsr	P_FFCC		; $037C , $FFCC

> What tells $FFD2 to send the last byte with an acive EOI ????

The call to CLRCHN ($ffcc), I presume.  By the way, why do you need the "tya"
in the code?  Or the sei and cli?  I'd do the loop like this:

B_036A	ldy $00
	lda ($01),y
	inc $00
	bne B_036A

Maybe I'd just make ($01) point to a 256-byte aligned buffer and
increment $01 instead.  Or even the following:

B_036A	lda buffer
	inc B_036A+1
	bne B_036A

(Above, buffer=$xx00.  Maybe in the screen memory, to give some visual
feedback to the user, like in Fast Hack'em on the Commodore 64.  That
one also turned the cassette motor on and off rapidly when switching
memory banks.)


       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.