home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 13 / AACD13.ISO / AACD / Utilities / ACDPlay / src / V1.6 / asmlib / ATAPI.s < prev    next >
Text File  |  1997-03-31  |  2KB  |  55 lines

  1.  
  2.  
  3. *******************************  CDUpdateA  ******************************
  4. *
  5. *  LONG CDUpdateA(register __a0 struct CDxRequest *cdx);
  6. *
  7. ATAPI_Update:   bsr     _CDTestUnitA
  8.                 tst.l   d0
  9.                 bne     .NoDisk
  10.  
  11.                 move.b  #AUDIO_STAT_STOPPED,cdx_AudioStatus(a0)
  12.                 move.b  #AUDIO_STAT_STOPPED,cdx_Active(a0)
  13.                 bra     .EXIT
  14.  
  15. .NoDisk         move.b  #AUDIO_STAT_NO_DISK,cdx_AudioStatus(a0)
  16.                 move.b  #AUDIO_STAT_NO_DISK,cdx_Active(a0)
  17.  
  18. .EXIT           rts
  19.  
  20.  
  21.  
  22.  
  23. ******************************  CDPauseA  ********************************
  24. *
  25. *  LONG CDPauseA(register __a0 struct CDxRequest *cdx, register __d0 BOOL really);
  26. *
  27. ATAPI_Pause:    moveq   #1,d1
  28.                 tst.l   d0
  29.                 bne     .goon
  30.                 moveq   #0,d1
  31. .goon           move.l  cdx_IORequest(a0),a0
  32.                 lea     IO_LENGTH(a0),a1
  33.                 move.l  d1,(a1)+                    ; IO_LENGTH
  34.                 clr.l   (a1)+                       ; IO_DATA
  35.                 clr.l   (a1)                        ; IO_OFFSET
  36.                 move.w  #CD_PAUSE,IO_COMMAND(a0)
  37.                 bsr     DoATAPI
  38.                 move.l  IO_ACTUAL(a0),d0
  39.                 rts
  40.  
  41.  
  42. ******************************  DoATAPI  *********************************
  43. *
  44. *  LONG DoATAPI(register __a0 struct IORequest *ioreq);
  45. *
  46.   CNOP 0,2
  47. DoATAPI:        movem.l d1/a0-a1/a6,-(sp)
  48.                 move.l  4.w,a6
  49.                 move.l  a0,a1
  50.                 jsr     _LVODoIO(a6)
  51. .EXIT           movem.l (sp)+,d1/a0-a1/a6
  52.                 rts
  53.  
  54.  
  55.