home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 389.lha / dme_v1.40 / src / afilereq.asm < prev    next >
Assembly Source File  |  1990-07-03  |  1KB  |  56 lines

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