home *** CD-ROM | disk | FTP | other *** search
-
- ; TAG.ASM
- ;
- ; Library tag
-
-
- section text,code
-
- xref _LibInit
- xref _LibOpen
- xref _LibClose
- xref _LibExpunge
- xref _OpenFifo
- xref _CloseFifo
- xref _ReadFifo
- xref _WriteFifo
- xref _RequestFifo
- xref _BufSizeFifo
-
- xdef _LibId
- xdef _LibName
-
- xdef _ALibOpen
- xdef _ALibClose
- xdef _ALibExpunge
- xdef _AOpenFifo
- xdef _ACloseFifo
- xdef _AReadFifo
- xdef _AWriteFifo
- xdef _ARequestFifo
- xdef _ABufSizeFifo
- xdef _BitTestSet
-
- clr.l D0
- rts
-
- InitDesc: dc.w $4AFC ;RTC_MATCHWORD
- dc.l InitDesc ;Pointer to beginning
- dc.l EndCode ;Note sure it matters
- dc.b 0 ;flags (NO RTF_AUTOINIT)
- dc.b 0 ;version
- dc.b 9 ;NT_LIBRARY
- dc.b 0 ;priority (doesn't matter)
- dc.l _LibName ;Name of library
- dc.l _LibId ;ID string (note CR-LF at end)
- dc.l Init ;Pointer to init routine
-
- _LibName: dc.b 'fifo.library',0
- _LibId: dc.b 'fifo.library 37.4 (7 Dec 1991)',13,10,0
- ds.l 0
-
- EndCode:
-
- Init: move.l A0,-(sp)
- jsr _LibInit(pc)
- addq.l #4,sp
- rts
-
- _ALibOpen
- movem.l D0/A6,-(sp)
- jsr _LibOpen(pc)
- addq.l #8,sp
- rts
-
- _ALibClose
- movem.l D0/A6,-(sp)
- jsr _LibClose(pc)
- addq.l #8,sp
- rts
-
- _ALibExpunge
- movem.l D0/A6,-(sp)
- jsr _LibExpunge(pc)
- addq.l #8,sp
- rts
-
- ; ------------------------ LIBRARY CALLS -----------------
- ;
- ; OpenFifo(name:D0, size:D1, flags:A0) (size must be a power of 2)
- _AOpenFifo
- movem.l D0/D1/A0,-(sp)
- jsr _OpenFifo(pc)
- lea 12(sp),sp
- rts
-
- ; CloseFifo(fifo:D0, flags:D1)
- _ACloseFifo
- movem.l D0/D1,-(sp)
- jsr _CloseFifo(pc)
- addq.l #8,sp
- rts
-
- ; ReadFifo(fifo:D0, buf:D1, bytes:A0)
- _AReadFifo
- movem.l D0/D1/A0,-(sp)
- jsr _ReadFifo(pc)
- lea 12(sp),sp
- rts
-
- ; WriteFifo(fifo:D0, buf:D1, bytes:A0)
- _AWriteFifo
- movem.l D0/D1/A0,-(sp)
- jsr _WriteFifo(pc)
- lea 12(sp),sp
- rts
-
- ; RequestFifo(fifo:D0, msg:D1, req:A0)
- _ARequestFifo
- movem.l D0/D1/A0,-(sp)
- jsr _RequestFifo(pc)
- lea 12(sp),sp
- rts
-
- ; BufSizeFifo(fifo:D0)
- _ABufSizeFifo
- move.l D0,-(sp)
- jsr _BufSizeFifo(pc)
- addq.l #4,sp
- rts
-
- ; BitTestSet(addr,bitno)
- _BitTestSet
- move.l 4(sp),A0
- move.w 10(sp),D0
- bset.b D0,(A0)
- sne D0
- ext.w D0
- ext.l D0
- rts
-
- END
-
-