Wanted: How to tell if drive B is REALLY attached?

Wanted: How to tell if drive B is REALLY attached?

Post by Jeff Beadl » Mon, 02 Jul 1990 04:11:00



The title pretty well tells it all.  I need to know if drive B is attached.
The functions that I've seen thus far always report two drives, and want the
user to swap.

I would prefer a "legal" way to do this so my application will work under any
of the various TOS's.

Please reply via email, and I'll summarize to the net.

Thanks
        -Jeff
--

 
 
 

Wanted: How to tell if drive B is REALLY attached?

Post by Michael B. Vederm » Mon, 02 Jul 1990 17:37:00



>The title pretty well tells it all.  I need to know if drive B is attached.
>The functions that I've seen thus far always report two drives, and want the
>user to swap.

>I would prefer a "legal" way to do this so my application will work under any
>of the various TOS's.

>Please reply via email, and I'll summarize to the net.

>Thanks
>    -Jeff
>--


line eater
line eater
line eater
line eaters unite!

There really is no need to send to you so you can summarize, there is one way
that is WELL documented (and one not so well documented way).

WELL documented:

variable $4a6 - _nflops - number of floppy disks actually attached to the
                system (0, 1, or 2)

Not well documented: After appl_init one of the outint locations has the
                drive map (I can't remember off hand).

- mike

--
for (;;)                              : Use ATARINET, send an interactive
        do_it(c_programmers);         : message such as:
                                      : Tell UH-INFO at UHUPVM1 ATARINET HELP
University Atari Computer Enthusiasts : University of Houston UACE

 
 
 

Wanted: How to tell if drive B is REALLY attached?

Post by John Stanl » Mon, 02 Jul 1990 01:15:00


Newsgroups: comp.sys.atari.st


> The title pretty well tells it all.  I need to know if drive B is attached.
> The functions that I've seen thus far always report two drives, and want the
> user to swap.

> I would prefer a "legal" way to do this so my application will work under any
> of the various TOS's.

  The following (in C since Jeff didn't specify otherwise) should work
with any existing TOS.  I've carefully written this so it "should" also
work under any version of C that runs on the ST.  The only limitation is
that you must have the osbind.h header file available for the version of
C you use (or some other way to access the Super() function...)...:

#include <osbind.h>

nflop()  /* Returns actual number of floppy drives connected.  */
         /* (Returns:  0 = -none-,  1 = A:,  and 2 = A: + B: ) */
        {
        register char *ssp;
        register int cnt;

        ssp = (char*)Super(0L);         /* enter super mode */

        cnt = *(unsigned char*)0x04a7;  /* get value from system variable */

        (void)Super(ssp);               /* return to user mode */

        return(cnt);
        }

  Note:  The system variable is actualy a two byte word based at $4a6,
but I addressed it as an unsigned char to make the code portable across
all the various 16bit and 32bit integer versions of C that are available
on the ST.  This doesn't work for most variable bu does here because
there are only 3 possible legal values in this system variable.

        ... John STanley

---

Software Consultant / Dynasoft Systems

 
 
 

1. TECH: How to tell if drive B is REALLY attached?

I need to know if drive B is REALLY attached.  "Drvmap" (Which, by the way is
NOT my friend :-) says that there is a drive B, even if there isn't.  I'm
guessing that this is so the "logical" drive switching works.

I've seen other programs that have done this, but NOTHING in the documentation
that I have here.  Can anyone shed light on this?

C answers are perfered, but assembler will do.

Please email them to me, and I'll follow up in a week or two.

        -Jeff

--

Utek Engineering, Tektronix Inc.        +1 503 685 2568
                        SPEEA - Just say no.

2. OS/2 Files For You!

3. How to tell if Drive B is attached **SUMMARY**

4. Imac locking up

5. sorta off topic here, but not really if you see what i am trying to do.

6. DELIVERY FAILURE: No route found to domain aucklanduni.gmail.com from server SESTOLN1/ARTEMA. Check DNS configuration.

7. Can two floppy drives be attached to the internal Mega floppy connector?

8. Hardware compatibilty question

9. Attaching CHINON drive to the ST (to be continued...)

10. Attaching SCSI drives

11. Attaching a CHINON drive to the ST (the saga continues...)

12. Attaching a CHINON drive to the ST

13. (IBM) 1.44 drives - am I silly or what??