Re: [cc65] CBM units

From: Spiro Trikaliotis <ml-cc651trikaliotis.net>
Date: 2010-02-21 17:56:09
Hello Mark,

* On Sun, Feb 21, 2010 at 08:45:33AM -0500 Mark J. Reed wrote:
> On Sun, Feb 21, 2010 at 7:44 AM, Ullrich von Bassewitz <uz@musoftware.de> wrote:
[...] 
> > Ok, good point. But this means, just checking for zero is wrong. The code
> > would have to check if $ba is less than eight and substitute 8 in this case.
> > Right?
> 
> If the value is below 8 (or above the maximum?  Is there a ceiling on
> the serial device number range for disk drives?),

The serial device numbers on the bus can be 0-30. The higher bits are
"FLAGS", and the device number 31 is used for special cases (UNTALK,
UNLISTEN).

The KERNAL only "automatically" uses the IEC bus for 4-30, though. Thus,
for 0-3 to use the IEC bus, you have to use the IEC routines themselves
(which do not have a KERNAL jumptable entry on VIC20 and older.)

> all you know is that
> the last operation wasn't to disk.

Not even that. You can also build a disk on #4, #5, #6 or #7, for
example. You cannot rely on the device number being unique for a device
type.

Regards,
Spiro.

-- 
Spiro R. Trikaliotis                              http://opencbm.sf.net/
http://www.trikaliotis.net/                     http://www.viceteam.org/
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sun Feb 21 17:56:36 2010

This archive was generated by hypermail 2.1.8 : 2010-02-21 17:56:39 CET