home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 278.lha / RegexLibrary_v1.0 / link.asm < prev    next >
Assembly Source File  |  1989-08-06  |  3KB  |  128 lines

  1. ;  C link-time library definitions for the GNU regular expression library.
  2. ;  Edwin Hoogerbeets 18/07/89
  3. ;
  4. ;  This file may be copied and distributed under the GNU Public
  5. ;  Licence. See the comment at the top of regex.c for details.
  6. ;
  7. ;  Adapted from Elib by Jim Mackraz, mklib by Edwin Hoogerbeets, and the
  8. ;  GNU regular expression package by the Free Software Foundation.
  9. ;
  10.         include 'regex.i'
  11.  
  12. store   macro
  13.         movem.l d2-d7/a2-a5,safekeep
  14.         endm
  15.  
  16. retrieve macro
  17.         movem.l safekeep,d2-d7/a2-a5
  18.         endm
  19.  
  20.         dseg
  21.  
  22. safekeep:
  23.         dcb.l 14     ; reserve some space for temporary register storage
  24.  
  25.  
  26.         ; --- xdef for application
  27.         public  _RegexBase
  28. _RegexBase:
  29.         ds.l 1
  30.  
  31.         cseg
  32.  
  33.         ; --- xdef for application
  34.  
  35.         public _re_initialize_buffer
  36.         public _re_terminate_buffer
  37.         public _re_compile_pattern
  38.         public _re_compile_fastmap
  39.         public _re_search
  40.         public _re_search_2
  41.         public _re_match
  42.         public _re_match_2
  43.  
  44. _re_initialize_buffer:
  45.         move.l  4(sp),d0
  46.         move.l  8(sp),d1
  47.         move.l  _RegexBase,a6
  48.         jmp     _LVOre_initialize_buffer(a6)
  49.  
  50. _re_terminate_buffer:
  51.         move.l  4(sp),d0
  52.         move.l  _RegexBase,a6
  53.         jmp     _LVOre_terminate_buffer(a6)
  54.  
  55. _re_compile_pattern:
  56.         move.l  4(sp),d0
  57.         move.l  8(sp),d1
  58.         move.l  12(sp),a0
  59.         move.l  16(sp),a1
  60.         move.l  _RegexBase,a6
  61.         jmp     _LVOre_compile_pattern(a6)
  62.  
  63. _re_compile_fastmap:
  64.         move.l  4(sp),d0
  65.         move.l  _RegexBase,a6
  66.         jmp     _LVOre_compile_fastmap(a6)
  67.  
  68. _re_search:
  69.         store
  70.         move.l  4(sp),d0
  71.         move.l  8(sp),d1
  72.         move.l  12(sp),a0
  73.         move.l  16(sp),a1
  74.         move.l  20(sp),d2
  75.         move.l  24(sp),d3
  76.         move.l  _RegexBase,a6
  77.         jsr     _LVOre_search(a6)
  78.         retrieve
  79.         rts
  80.  
  81. _re_search_2:
  82.         store
  83.         move.l  4(sp),d0
  84.         move.l  8(sp),d1
  85.         move.l  12(sp),a0
  86.         move.l  16(sp),a1
  87.         move.l  20(sp),d2
  88.         move.l  24(sp),d3
  89.         move.l  28(sp),d4
  90.         move.l  32(sp),d5
  91.         move.l  36(sp),d6
  92.         move.l  _RegexBase,a6
  93.         jsr     _LVOre_search_2(a6)
  94.         retrieve
  95.         rts
  96.  
  97. _re_match:
  98.         store
  99.         move.l  4(sp),d0
  100.         move.l  8(sp),d1
  101.         move.l  12(sp),a0
  102.         move.l  16(sp),a1
  103.         move.l  20(sp),d2
  104.         move.l  _RegexBase,a6
  105.         jsr     _LVOre_match(a6)
  106.         retrieve
  107.         rts
  108.  
  109. _re_match_2:
  110.         store
  111.         move.l  4(sp),d0
  112.         move.l  8(sp),d1
  113.         move.l  12(sp),a0
  114.         move.l  16(sp),a1
  115.         move.l  20(sp),d2
  116.         move.l  24(sp),d3
  117.         move.l  28(sp),d4
  118.         move.l  32(sp),d5
  119.         move.l  _RegexBase,a6
  120.         jsr     _LVOre_match_2(a6)
  121.         retrieve
  122.         rts
  123.  
  124.         end
  125.  
  126.  
  127.  
  128.