Re: [cc65] Uniform mass storage device discovery and file locations

From: Spiro Trikaliotis <ml-cc651trikaliotis.net>
Date: 2012-08-23 20:28:41
Hello Oliver,

* On Thu, Aug 23, 2012 at 03:25:06PM +0200 Oliver Schmidt wrote:

> >> - Is it correct that $90 must be saved before calling unlstn ?
> >
> > No, not really
> >
> > [...]
> 
> I was afraid that unlstn would set $90 to zero because "there wasn't a
> communication channel opened successfully in the first place so
> closing it is a nop and therefore by definition successful". But if
> this isn't the case i'll just LDA $90 after all operations. Dit I
> understand you right that this is reasonable?

Yes, this is correct. You can just test $90 afterwards.

BTW: JSR $FFB7 (READST) is the "official" way to read the I/O status
word at $90, that would also work on other machines but the C64.

But:

- You cannot clear $90 directly by a KERNAL call (but, you must use
  another function like CLOSE that resets it. You can close an unopened
  file number, thus, this might be an option)

- The LISTEN and UNLISTEN functions are not presnet in a CBM KERNAL
  before C64 (yep, even the VIC20, which is extremely similar to the C64
  did not have them).
  Thus, only the C128 (what about C16, Plus/4?) would be other
  candidates where this might work.

So, using READST and the option above to clear the status word might be
an option for C64 and later machines, but not for machines before that.

Regards,
Spiro.

-- 
Spiro R. Trikaliotis
http://www.trikaliotis.net/
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Aug 23 20:29:34 2012

This archive was generated by hypermail 2.1.8 : 2012-08-23 20:29:40 CEST