home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format 58 / af058sub.adf / fmsdisk2.lha / src / tag.asm < prev   
Assembly Source File  |  1990-04-17  |  2KB  |  122 lines

  1.  
  2.         include "exec/types.i"
  3.         include "exec/exec.i"
  4.         include "exec/resident.i"
  5.  
  6.         section text,CODE
  7.  
  8.         xref    _geta4
  9.         xref    _Init
  10.         xref    _CoProc
  11.  
  12.         xdef    _DeviceName
  13.         xdef    _IdString
  14.         xdef    _DUMmySeg
  15.  
  16.         xref    _DevOpen
  17.         xref    _DevClose
  18.         xref    _DevExpunge
  19.         xref    _DevBeginIO
  20.         xref    _DevAbortIO
  21.  
  22.         xdef    _TagDevOpen
  23.         xdef    _TagDevClose
  24.         xdef    _TagDevExpunge
  25.         xdef    _TagDevBeginIO
  26.         xdef    _TagDevAbortIO
  27.  
  28.  
  29.         moveq.l #0,D0        ;   word
  30.         rts            ;   word
  31.  
  32. InitDesc:
  33.         dc.w    RTC_MATCHWORD
  34.         dc.l    InitDesc
  35.         dc.l    EndCode
  36.         dc.b    0        ;   not auto-init
  37.         dc.b    2        ;   version
  38.         dc.b    NT_DEVICE
  39.         dc.b    0        ;   priority
  40.         dc.l    _DeviceName
  41.         dc.l    _IdString
  42.         dc.l    _TagInit
  43.         dc.l    0        ;   extra ?
  44.         dc.l    0
  45.         dc.l    0
  46.  
  47.         dc.w    0        ;   word (long align)
  48.  
  49.         ds.l    0        ;   LW align
  50.         dc.l    16
  51. _DUMmySeg:    dc.l    0
  52.         nop
  53.         nop
  54.         jsr    _geta4(pc)
  55.         jmp    _CoProc(PC)
  56.  
  57.         ;   C Interface routines
  58.  
  59. _TagInit:
  60.         move.l    A4,-(sp)
  61.         move.l    A0,-(sp)
  62.         jsr    _geta4(pc)
  63.         jsr    _Init(pc)
  64.         addq.l    #4,sp
  65.         move.l    (sp)+,A4
  66.         rts
  67.  
  68. _TagDevOpen:
  69.         move.l    A4,-(sp)
  70.         move.l    D1,-(sp)
  71.         move.l    A1,-(sp)
  72.         move.l    D0,-(sp)
  73.         jsr    _geta4(pc)
  74.         jsr    _DevOpen(pc)
  75.         lea    12(sp),sp
  76.         move.l    (sp)+,A4
  77.         rts
  78.  
  79. _TagDevExpunge:
  80.         move.l    A4,-(sp)
  81.         jsr    _geta4(pc)
  82.         jsr    _DevExpunge(pc)
  83.         move.l    (sp)+,A4
  84.  
  85. _TagDevClose:
  86.         move.l    A4,-(sp)
  87.         move.l    A1,-(sp)
  88.         jsr    _geta4(pc)
  89.         jsr    _DevClose(pc)
  90.         addq.l    #4,sp
  91.         move.l    (sp)+,A4
  92.         rts
  93.  
  94. _TagDevBeginIO:
  95.         move.l    A4,-(sp)
  96.         move.l    A1,-(sp)
  97.         jsr    _geta4(pc)
  98.         jsr    _DevBeginIO(pc)
  99.         addq.l    #4,sp
  100.         move.l    (sp)+,A4
  101.         rts
  102.  
  103. _TagDevAbortIO:
  104.         move.l    A4,-(sp)
  105.         move.l    A1,-(sp)
  106.         jsr    _geta4(pc)
  107.         jsr    _DevAbortIO(pc)
  108.         addq.l    #4,sp
  109.         move.l    (sp)+,A4
  110.         rts
  111.  
  112.  
  113.         section DATA,DATA
  114.  
  115. _DeviceName:    dc.b    'fmsdisk.device',0
  116. _IdString:    dc.b    'fmsdisk.device 2.0 (16 April 1990)',13,10,0
  117.  
  118. EndCode:
  119.  
  120.         END
  121.  
  122.