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

From: Oliver Schmidt <ol.sc1web.de>
Date: 2012-08-20 14:08:25
Hi,

Just for the records - here's again the code snipet and my questions -
which the answer below refers to...

lda <device>
jsr $ffb1 ; listen
lda #$00
sta $90   ; necessary ?
lda #$ff  ; or rather #$6f ?
jsr $ff93 ; lstnsa
ldy $90
jsr $ffae ; unlstn
tya
bpl <present>
<not present>

However I have several questions:
- Is it really necessary to initialize $90
- What is the right high nibble for "opening" the cmd channel here $F or $6 ?
- Is it correct to assume that unlstn doesn't trash Y ?
- Is it correct that $90 must be saved before calling unlstn ?

> P. S. Unless someone replies earlier, I would need a few days (travelling now) to check my stuff at home to answer the questions about status ($90) byte. My bet is that answer to both is "yes" but have to double check the reasons, which I sort of only recall now - so don't take them as true and correct. [*]
>
> * - 1) to start afresh, 2) to allow particular bits to be affected without losing previous information from the other ones

As noone else has answered yet I'd for sure appreciate if you would
take the time after your return to re-check !

The code linked to a few posting back
(http://codebase64.org/doku.php?id=base:detect_drives_on_iec_bus) sets
the status to zero before calling LISTEN while mine above does it
after that call. I'm not sure if this is of significance. Could LISTEN
already fail (and set the status ?). Would LSTNSA probably even reset
the status back to zero? ...?

It would be great to know the really correct sequence here!

Regards,
Oliver
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Aug 20 14:08:53 2012

This archive was generated by hypermail 2.1.8 : 2012-08-20 14:08:56 CEST