home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / useful / util / libs / fifolib / tag.a < prev    next >
Encoding:
Text File  |  1993-10-03  |  2.6 KB  |  133 lines

  1.  
  2.         ;    TAG.ASM
  3.         ;
  4.         ;    Library tag
  5.  
  6.  
  7.         section text,code
  8.  
  9.         xref    _LibInit
  10.         xref    _LibOpen
  11.         xref    _LibClose
  12.         xref    _LibExpunge
  13.         xref    _OpenFifo
  14.         xref    _CloseFifo
  15.         xref    _ReadFifo
  16.         xref    _WriteFifo
  17.         xref    _RequestFifo
  18.         xref    _BufSizeFifo
  19.  
  20.         xdef    _LibId
  21.         xdef    _LibName
  22.  
  23.         xdef    _ALibOpen
  24.         xdef    _ALibClose
  25.         xdef    _ALibExpunge
  26.         xdef    _AOpenFifo
  27.         xdef    _ACloseFifo
  28.         xdef    _AReadFifo
  29.         xdef    _AWriteFifo
  30.         xdef    _ARequestFifo
  31.         xdef    _ABufSizeFifo
  32.         xdef    _BitTestSet
  33.  
  34.         clr.l   D0
  35.         rts
  36.  
  37. InitDesc:   dc.w    $4AFC    ;RTC_MATCHWORD
  38.         dc.l    InitDesc    ;Pointer to beginning
  39.         dc.l    EndCode    ;Note sure it matters
  40.         dc.b    0        ;flags (NO RTF_AUTOINIT)
  41.         dc.b    0        ;version
  42.         dc.b    9        ;NT_LIBRARY
  43.         dc.b    0        ;priority (doesn't matter)
  44.         dc.l    _LibName    ;Name of library
  45.         dc.l    _LibId    ;ID string (note CR-LF at end)
  46.         dc.l    Init    ;Pointer to init routine
  47.  
  48. _LibName:   dc.b    'fifo.library',0
  49. _LibId:     dc.b    'fifo.library 37.4 (7 Dec 1991)',13,10,0
  50.         ds.l    0
  51.  
  52. EndCode:
  53.  
  54. Init:        move.l  A0,-(sp)
  55.         jsr     _LibInit(pc)
  56.         addq.l  #4,sp
  57.         rts
  58.  
  59. _ALibOpen
  60.         movem.l D0/A6,-(sp)
  61.         jsr     _LibOpen(pc)
  62.         addq.l  #8,sp
  63.         rts
  64.  
  65. _ALibClose
  66.         movem.l D0/A6,-(sp)
  67.         jsr     _LibClose(pc)
  68.         addq.l  #8,sp
  69.         rts
  70.  
  71. _ALibExpunge
  72.         movem.l D0/A6,-(sp)
  73.         jsr     _LibExpunge(pc)
  74.         addq.l  #8,sp
  75.         rts
  76.  
  77.         ;    ------------------------ LIBRARY CALLS -----------------
  78.         ;
  79.         ;    OpenFifo(name:D0, size:D1, flags:A0)  (size must be a power of 2)
  80. _AOpenFifo
  81.         movem.l D0/D1/A0,-(sp)
  82.         jsr     _OpenFifo(pc)
  83.         lea     12(sp),sp
  84.         rts
  85.  
  86.         ;    CloseFifo(fifo:D0, flags:D1)
  87. _ACloseFifo
  88.         movem.l D0/D1,-(sp)
  89.         jsr     _CloseFifo(pc)
  90.         addq.l  #8,sp
  91.         rts
  92.  
  93.         ;    ReadFifo(fifo:D0, buf:D1, bytes:A0)
  94. _AReadFifo
  95.         movem.l D0/D1/A0,-(sp)
  96.         jsr     _ReadFifo(pc)
  97.         lea     12(sp),sp
  98.         rts
  99.  
  100.         ;    WriteFifo(fifo:D0, buf:D1, bytes:A0)
  101. _AWriteFifo
  102.         movem.l D0/D1/A0,-(sp)
  103.         jsr     _WriteFifo(pc)
  104.         lea     12(sp),sp
  105.         rts
  106.  
  107.         ;    RequestFifo(fifo:D0, msg:D1, req:A0)
  108. _ARequestFifo
  109.         movem.l D0/D1/A0,-(sp)
  110.         jsr     _RequestFifo(pc)
  111.         lea     12(sp),sp
  112.         rts
  113.  
  114.         ;    BufSizeFifo(fifo:D0)
  115. _ABufSizeFifo
  116.         move.l  D0,-(sp)
  117.         jsr     _BufSizeFifo(pc)
  118.         addq.l  #4,sp
  119.         rts
  120.  
  121.         ;    BitTestSet(addr,bitno)
  122. _BitTestSet
  123.         move.l  4(sp),A0
  124.         move.w  10(sp),D0
  125.         bset.b  D0,(A0)
  126.         sne     D0
  127.         ext.w   D0
  128.         ext.l   D0
  129.         rts
  130.  
  131.         END
  132.  
  133.