Re: KERNAL OPEN success/failure

silverdr_at_inet.com.pl
Date: 2008-02-02 11:36:35

On 2008-02-02, at 04:53, Jeremy wrote:

> silverdr@inet.com.pl wrote:
>> Hello! I recall in the good old days, whenever I OPENed a file (of
>> course after SETLFSing and SETNAMming), I checked the status  
>> channel to
>> verify whether the file opened properly and I vaguely recall that I  
>> was
>> doing it because even if I expected OPEN to return some error
>> conditions, I always had problems with it and resorted to the status
>> channel. Do you know a better way to check for OPEN success/failure?
>>
>> P.S. I was using C64/1541 but I believe the same is applicable to  
>> most
>> if not all CBM CPU/drive combinations
>
> How about reading the Error Channel off open15,8,15?

Well - that's what I have always been doing. But I always had a  
feeling that it should be more straightforward than reading strings  
off the status channel, parsing them and then deciding what's the  
condition.

Something like:

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?


       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.