[cc65] Re: cbm_read blocks on empty rs232 buffer

From: Payton Byrd <plbyrd1gmail.com>
Date: 2013-11-01 14:13:52
OK, more info.

I've put in the following code:

 result = cbm_open(2,2,3,file);

if(result == 240)
{

	POKE(53281, 0);

	cbm_k_chkin(2);
	key = cbm_k_basin();
	status = cbm_k_readst();
	lastx = wherex();
	lasty = wherey();
	gotoxy(31, 24);
	printf("[%02X][%02X]", key, status);
	gotoxy(lastx, lasty);

}

The screen turns black, so I know the RS232 channel is opened, but the
display code at the bottom never executes until the RS232 buffer
receives at least one incoming byte, so it appears that cbm_k_basin is
doing the blocking.



On Fri, Nov 1, 2013 at 7:27 AM, Payton Byrd <plbyrd@gmail.com> wrote:

> On the C64, if you open the RS232 channel via cbm_open(2,2,3,options) then
> the calls to cbm_read block the program if the inbound RS232 buffer is
> empty.
>
> Is this intentional, a side-effect of intended behavior, or a bug?  If
> it's a bug, is there another way for me to read the data.  There is no
> kernal wrapper for CHRIN, so I would need to write my own wrapper to do it
> that way.
>
> --
> Payton Byrd
> <http://www.paytonbyrd.com>
> <http://it.toolbox.com/blogs/paytonbyrd>
>



-- 
Payton Byrd
<http://www.paytonbyrd.com>
<http://it.toolbox.com/blogs/paytonbyrd>

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Nov 1 14:14:29 2013

This archive was generated by hypermail 2.1.8 : 2013-11-01 14:14:31 CET