IECHost fast transfer finished

I had a chance to finish the first iteration of the fast two-bit protocol to quickly transfer data between IECHost and a Commodore drive over the IEC bus!

Here’s a snippet of my drive code (the “Hello World server”):

; Main loop on the drive
mloop
	jsr readbyte
	cmp #'h'
	bne mloop

	lda #hmsge-hellomsg	; number of bytes that we'll be sending
	jsr sendbyte

	ldx #hmsge-hellomsg
	stx $06

sendhello
	ldx $06
	lda hellomsg-1,x	; send message to IECHost using the fast protocol
	jsr sendbyte
	dec $06
	bne sendhello

	beq mloop

hellomsg
	.text "!DLROW OLLEH"
hmsge

And here’s my code on the IECHost side (the “Hello World client”):

	fastaccess_send_byte('h');		/* Send the 'h' command */

	n = fastaccess_receive_byte();	/* Read the length of the message */

	do {							/* Read the message */
		putc(fastaccess_receive_byte());
	} while (--n);

	putc('\n');

As IECHost is significantly faster than a Commodore 64 I can achieve even faster transfer speeds than the ones I am getting during this first iteration, which uses a pretty standard two-bit protocol over the IEC bus.

We shall see how it goes 🙂

This entry was posted in Retrocomputing, Technical and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s