home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 073.lha / cd0.asm < prev    next >
Assembly Source File  |  1987-06-02  |  1KB  |  32 lines

  1.                 xref       _AbsExecBase
  2.                 xref       _LVOOpenLibrary
  3.                 xref       _LVOCloseLibrary
  4.                 xref       _LVOLock
  5.                 xref       _LVOCurrentDir
  6.  
  7. access_read     equ        -2
  8.  
  9. ;Open Dos
  10.                 move.l     _AbsExecBase,a6          
  11.                 lea.l      dosname,a1              ;Open Dos
  12.                 clr.l      d0
  13.                 jsr        _LVOOpenLibrary(a6)
  14.                 move.l     d0,a6
  15.                 move.l     d0,dos_ptr
  16.                 tst.l      d0
  17.                 beq        bye
  18.  
  19. ;Obtain Lock:  No, Lock is a pointer to $000000 for df0: device.
  20. ;CD to directory
  21.                move.l     #0,d1                  
  22.                jsr        _LVOCurrentDir(a6)
  23.  
  24. close_dos       move.l     _AbsExecBase,a6
  25.                 move.l     dos_ptr,a1  
  26.                 jsr        _LVOCloseLibrary(a6)
  27. bye             rts
  28.  
  29. dos_ptr         ds.l       1
  30. dosname         dc.b       'dos.library',0
  31. dir_name        dc.b       'DF0:',0
  32.