                xref       _AbsExecBase
                xref       _LVOOpenLibrary
                xref       _LVOCloseLibrary
                xref       _LVOLock
                xref       _LVOCurrentDir

access_read     equ        -2

;Open Dos
                move.l     _AbsExecBase,a6          
                lea.l      dosname,a1              ;Open Dos
                clr.l      d0
                jsr        _LVOOpenLibrary(a6)
                move.l     d0,a6
                move.l     d0,dos_ptr
                tst.l      d0
                beq        bye

;Obtain Lock:  No, Lock is a pointer to $000000 for df0: device.
;CD to directory
               move.l     #0,d1                  
               jsr        _LVOCurrentDir(a6)

close_dos       move.l     _AbsExecBase,a6
                move.l     dos_ptr,a1  
                jsr        _LVOCloseLibrary(a6)
bye             rts

dos_ptr         ds.l       1
dosname         dc.b       'dos.library',0
dir_name        dc.b       'DF0:',0
