Re: KERNAL OPEN success/failure

silverdr_at_inet.com.pl
Date: 2008-02-02 17:58:52

On 2008-02-02, at 17:02, Marko Mäkelä wrote:

>> jsr OPEN
>> bcs error	; then I can decide whether I check what exactly happened
>> jmp success
>>
>>>
>>> How about using the ReadST command? its at $ffb7..
>>>
>>
>> Do you know exactly how to do this to get a boolean value of success/
>> failure after OPEN?
>
> OPEN doesn't always result in any communication.  For example, when
> no file name is specified on the serial bus, nothing will be sent.
> Try OPEN1,8,15 with nothing attached to the serial bus.  It will
> succeed.

That's acceptable as long as it is fully deterministic.

>
> Also, I seem to remember that the KERNAL doesn't do proper error
> handling either.  Try a SAVE to the 1541 with an existing file name,
> without the @: prefix.
>

I recall I was urgently needing this many years ago and since after a  
tedious research (there was no Internet at that time) I haven't found  
a reliable solution, I had to resort to "plan B", which was parsing  
the status channel's strings. Now I got back to some of my old sources  
and again had the gut feeling that I have found workaround rather than  
a solution (which should be fairly simple) there.



       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.