Path: utzoo!utgpu!watmath!clyde!att!rutgers!ucsd!sdcsvax!ucsdhub!hp-sdd!ncr-sd!crash!pro-charlotte.cts.com!steelie
From: steelie@pro-charlotte.cts.com (Jim Howard)
Newsgroups: comp.sys.amiga
Subject: \
Message-ID: <3615@crash.cts.com>
Date: 2 Dec 88 06:41:36 GMT
Sender: news@crash.cts.com
Lines: 62

Im working on a little low level drive access, using the exec.library
SendIo routine to access the disk drive, and read a few tracks
into memory..  The only problem is, when I use SendIo with my request
block, I have to use WaitIO in conjunction, to make sure my program
doesnt trample all over itself..  On the other hand, I could just
use DoIo, but it doesnt work any better in this case either... Anyway,
here's a short listing of what Im doing.. (pardon my assembly) :-)
 

        movea.l 4,a6                    ;execbase
        lea     diskio,a1               ;address of our IoRequestblock
        move.l  #reply,14(a1)           ;pointer for reply messages?
        clr.l   d0                      ;unit # (0 for df0:, 1 for df1:)
        clr.l   d1                      ;flags.. none
        lea     tdevice,a0              ;location of text name for device
        jsr     -444(a6)                ;_LVOOpenDevice  (trackdisk.device)

        movea.l 4,a6                    ;execbase, of course
        lea     diskio,a1               ;now, point to our IoRequestblock
        move    #2,28(a1)               ;command RW_READ 
        move.l  #4*512*11*2,36(a1)      ;length of data  (4 tracks)
        move.l  #$40000,40(a1)          ;buffer for data
        move.l  #0,44(a1)               ;Offset for start of read in bytes
        jsr     -462(a6)                ;_LVOSendIo  (read it in!)

        movea.l 4,a5                    ;execbase
        lea     diskio,a1               ;pointer to request
        jsr     -474(a6)                ;_LVOWaitIo   (wait for disk)

        movea.l 4,a6                    ;execbase
        lea     diskio,a1               ;pointer to request
        jsr     -450(a6)                ;close the trackdisk.device
        rts


diskio
        ds.l    20 
reply
        ds.l    8 
tdevice
        dc.b    'trackdisk.device',0
        cnop    0,2
 
 
Now, the problem lies that the WaitIo routine never returns.. I assume
it is because the SendIo routine never completes itself.. But I cannot
for the life of me find out why it wont finish.. I can even hear
the disk heads step 4 times, as it is reading the data, and I can
reboot the machine and look in the memory where I sent the data, and
it made it through ok.   But the #@!#!^ SendIo routine never
finishes!       
 
What could possibly be causing this?   Also, I TRIED using DoIo instead
of SendIo, but the only thing that does, is the DoIo routine
never finishes its task, and therefore (unlike SendIo) doesnt let
me program continue..
 
Thanks,

   UUCP:  ....!crash!pro-charlotte!steelie    | Pro-Charlotte - (704) 567-0029
   ARPA:  crash!pro-charlotte!steelie@nosc.mil| 300/1200/2400 baud  24 hrs/day
   INET:  steelie@pro-charlotte.cts.com       | Log in as "register"