home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / newc_dev / dr_15b.lha / fastscanglue.asm < prev    next >
Assembly Source File  |  1992-01-17  |  2KB  |  76 lines

  1. ;; If you can't make inline shared library calls with your C compiler, you can
  2. ;; use glue routines.  Just assemble this file with whatever assembler is right
  3. ;; for your linker, using small or large data as appropriate for the program
  4. ;; you're going to link with.  This assumes that the assembler is capable of
  5. ;; translating an external data symbol into a small data register-relative
  6. ;; reference.  With these glue routines, the arguments must be pushed onto
  7. ;; the stack as longwords, with the last argument pushed first.  The function
  8. ;; FSRexxQuery will be left out unless you define the word REXXQUERY, because
  9. ;; at present that function in the library only returns 1 and does nothing.
  10.  
  11.  
  12. ;;;;        include        "fastscan.i"        ; _LVO definitions
  13. ;;;; heck, put em inline:
  14.  
  15. _LVOFSRexxQuery         equ     -30
  16. _LVOFastExamine         equ     -36
  17. _LVOFastExNext          equ     -42
  18. _LVOFastExCleanup       equ     -48
  19. _LVOFastExGet80         equ     -54
  20.  
  21.  
  22.         xdef        _FastExamine
  23.         xdef        _FastExNext
  24.         xdef        _FastExCleanup
  25.         xdef        _FastExGet80
  26.  
  27.         section        code
  28.  
  29. _FastExamine    movem.l        4(sp),d0/a0
  30.         move.l        a6,-(sp)
  31.         move.l        _FastScanBase,a6
  32.         jsr        _LVOFastExamine(a6)
  33.         move.l        (sp)+,a6
  34.         rts
  35.  
  36. _FastExNext    movem.l        4(sp),d0/a0
  37.         move.l        a6,-(sp)
  38.         move.l        _FastScanBase,a6
  39.         jsr        _LVOFastExNext(a6)
  40.         move.l        (sp)+,a6
  41.         rts
  42.  
  43. _FastExCleanup    move.l        4(sp),a0
  44.         move.l        a6,-(sp)
  45.         move.l        _FastScanBase,a6
  46.         jsr        _LVOFastExCleanup(a6)
  47.         move.l        (sp)+,a6
  48.         rts
  49.  
  50. _FastExGet80    move.l        4(sp),a0
  51.         move.l        a6,-(sp)
  52.         move.l        _FastScanBase,a6
  53.         jsr        _LVOFastExGet80(a6)
  54.         move.l        (sp)+,a6
  55.         rts
  56.  
  57.  
  58.     IFD        REXXQUERY
  59.  
  60.         xdef        _FSRexxQuery
  61.  
  62. _FSRexxQuery    move.l        4(sp),a0
  63.         move.l        a6,-(sp)
  64.         move.l        _FastScanBase,a6
  65.         jsr        _LVOFSRexxQuery(a6)
  66.         move.l        (sp)+,a6
  67.         rts
  68.  
  69.     ENDC
  70.  
  71.  
  72.         section        data
  73.  
  74.         xdef        _FastScanBase
  75. _FastScanBase    dc.l        0
  76.