home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff226.lzh / Vlt / xprlib / library / libface.asm < prev    next >
Assembly Source File  |  1989-06-25  |  2KB  |  117 lines

  1. ;;; libface.c
  2. ;
  3. ;   DESCRIPTION:
  4. ;   ===========
  5. ;
  6. ;    This is the skeleton for an Amiga Exec library.
  7. ;    This version is written for Aztec C. It is based on the example
  8. ;    library by Jim Mackraz who got some stuff from Neil Katin.
  9. ;    This library implements a protocol transfer library.
  10. ;    All changes and additions by me.
  11. ;
  12. ;   AUTHOR/DATE:  W.G.J. Langeveld, February 1989.
  13. ;   ============
  14. ;
  15. ;;;
  16.  
  17.     include    'exec/types.i'
  18.  
  19. setup    macro
  20.     movem.l    d2/d3/d4-d7/a2-a6,-(sp)
  21.     jsr    _geta4            ;set up a4 for small model
  22.     endm
  23.  
  24. push    macro
  25.     move.l    \1,-(sp)
  26.     endm
  27.  
  28. fix    macro
  29.     ifc    '\1',''
  30.         mexit
  31.     endc
  32.     ifle    \1-8
  33.         addq.l    #\1,sp
  34.     endc
  35.     ifgt    \1-8
  36.         lea    \1(sp),sp
  37.     endc
  38.     endm
  39.  
  40. restore    macro
  41.     fix    \1
  42.     movem.l    (sp)+,d2/d3/d4-d7/a2-a6    
  43.     rts
  44.     endm
  45.  
  46.     dseg
  47.  
  48.     public    _libfunctab
  49. _libfunctab:
  50.     dc.l    XPRopen
  51.     dc.l    XPRclose
  52.     dc.l    XPRexpunge
  53.     dc.l    $0000
  54.         dc.l    XPRXProtocolCleanup
  55.         dc.l    XPRXProtocolSetup
  56.         dc.l    XPRXProtocolSend
  57.         dc.l    XPRXProtocolReceive
  58.     dc.l    $ffffffff
  59.  
  60.     cseg
  61.  
  62.     ;--- library functions
  63.     public    _XPROpen
  64.     public    _XPRClose
  65.     public    _XPRExpunge
  66.         public  _XProtocolCleanup
  67.         public  _XProtocolSetup
  68.         public  _XProtocolSend
  69.         public  _XProtocolReceive
  70.  
  71.     public    _geta4
  72.  
  73. XPRopen:
  74.     setup
  75.     push a6
  76.     jsr    _XPROpen
  77.     restore    4
  78.  
  79. XPRclose:
  80.     setup
  81.     push a6
  82.     jsr    _XPRClose
  83.     restore 4
  84.  
  85. XPRexpunge:
  86.     setup
  87.     push a6
  88.     jsr    _XPRExpunge
  89.     restore 4
  90.  
  91. XPRXProtocolCleanup:
  92.     setup
  93.     push a0
  94.     jsr    _XProtocolCleanup
  95.     restore 4
  96.  
  97. XPRXProtocolSetup:
  98.     setup
  99.     push a0
  100.     jsr    _XProtocolSetup
  101.     restore 4
  102.  
  103. XPRXProtocolSend:
  104.     setup
  105.     push a0
  106.     jsr    _XProtocolSend
  107.     restore 4
  108.  
  109. XPRXProtocolReceive:
  110.     setup
  111.     push a0
  112.     jsr    _XProtocolReceive
  113.     restore 4
  114.  
  115.  
  116.     end
  117.