home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / PRG / LOBE.src.sit / LOBE.src / cdev.a < prev    next >
Text File  |  1991-10-14  |  824b  |  45 lines

  1.  
  2.                 include 'ToolEqu.a'
  3.                 include 'SysEqu.a'
  4.                 include 'QuickEqu.a'
  5.                 include 'Traps.a'
  6.                 
  7. ; C style, takes no parameters
  8.  
  9. GetCommonStorage PROC    EXPORT
  10.                 IMPORT    BusTask:DATA
  11.                 IMPORT    BusVars:DATA
  12.                 IMPORT    MyTag:DATA
  13.                 
  14.                 movem.l    a2,-(sp)
  15.                 
  16.                 lea        MyTag,a2
  17.                 lea        BusTask,a1        ; get tag offset
  18.                 sub.l    a1,a2
  19.                 move.l    a2,d0
  20.  
  21.                 move.l    VBLQueue+qHead,a0
  22. GCSSearchLoop
  23.                 move.l    a0,d1
  24.                 beq.s    GCSDone
  25.                 move.l    (a0,d0),d1        ; get from where tags should be
  26.                 cmp.l    #'CR91',d1
  27.                 beq.s    GCSFound
  28.                 move.l    qLink(a0),a0
  29.                     ; strip address : d0 in, d0 out - might need
  30.                 bra.s    GCSSearchLoop
  31.                                 
  32. GCSFound        
  33.                 lea        BusVars,a2
  34.                 lea        BusTask,a1
  35.                 sub.l    a1,a2
  36.                 add.l    a2,a0
  37. GCSDone
  38.                 move.l    a0,d0            ; place return result
  39.                 movem.l    (sp)+,a2
  40.                 rts
  41.                 ENDP
  42.                 
  43.                 END
  44.                 
  45.