home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff284.lzh / Dme / src / afilereq.asm next >
Assembly Source File  |  1989-11-27  |  964b  |  48 lines

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