home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / dirs / chemesthetics_427.lzh / Chemesthetics / Source / Source.LZH / arpreq.asm next >
Assembly Source File  |  1990-12-06  |  915b  |  44 lines

  1.         ;   arpreq(hail,file,dir,window)
  2.  
  3.         FAR DATA
  4.         FAR CODE
  5.  
  6.         public    _arpreq
  7.         public    _LVOOldOpenLibrary
  8.         public    _LVOCloseLibrary
  9.         public    _SysBase
  10.  
  11. _LVOFileRequest equ    -294
  12.  
  13. arp_name_text    dc.b 'arp.library',0
  14.  
  15. fs        ds.l    1   ;hailing text
  16.         ds.l    1   ;file name
  17.         ds.l    1   ;directory
  18.         ds.l    1   ;window requesting
  19.         ds.w    1   ;LONG Align, idiots!  set to 0
  20.         ds.l    1   ;func for wildcards
  21.         ds.l    1   ;func to call w/intuimessages
  22.  
  23. _arpreq:
  24.         lea.l    fs,A0
  25.         movem.l 4(sp),D0-D3             ;setup fields
  26.         movem.l D0-D3,(A0)
  27.         clr.w    fs+16
  28.         move.l    _SysBase,A6
  29.  
  30.         lea.l    arp_name_text,a1    ;open library
  31.         jsr    _LVOOldOpenLibrary(a6)
  32.         tst.l    d0
  33.         beq.s    done
  34.         move.l    d0,a6
  35.         lea.l    fs,a0
  36.         jsr    _LVOFileRequest(A6)     ;call requestor
  37.         move.l    D0,-(sp)                ;return value
  38.         move.l    A6,A1            ;CloseLibrary(arpbase)
  39.         move.l    _SysBase,A6
  40.         jsr    _LVOCloseLibrary(A6)
  41.         move.l    (sp)+,D0                ;return value
  42. done        rts
  43.  
  44.