home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 300-399 / ff353.lzh / AztecArp / dospkt.asm < prev    next >
Assembly Source File  |  1990-06-02  |  994b  |  57 lines

  1. * repair for aztec's dospkt() routine - now uses Arp library
  2.  
  3.     if 0
  4. *doc dos_packet
  5. NAME
  6.     dos_packet -- Send an AmigaDOS packet
  7.  
  8. SYNOPSIS
  9.     result = dos_packet (port, type, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
  10.  
  11.     long result;
  12.     struct MsgPort *port;
  13.     long type, arg1, arg2, arg3, arg4, arg5, arg6, arg7;
  14.  
  15. FUNCTION
  16.     Sends a DOS packet to the specified handler.  This is a replacement
  17.     for the Aztec C dos_packet() routine that calls Arp SendPacket().
  18.  
  19. INPUTS
  20.     port - Handler MsgPort
  21.     type - Packet Action code
  22.     arg1..arg7 - Packet arguments
  23.  
  24. RESULTS
  25.     result - Res1 from the Packet (return value from SendPacket())
  26.     errno - Res2 from the Packet
  27.  
  28. MODULE
  29.     dospkt.asm
  30. *end
  31.     endc
  32.  
  33.     dseg
  34.     public    _ArpBase
  35.     public    _errno
  36.  
  37.     cseg
  38.  
  39.     public    _LVOSendPacket
  40.  
  41.     public    _dos_packet
  42. _dos_packet
  43.     move.l    4(sp),a1
  44.     move.l    8(sp),d0
  45.     lea.l    12(sp),a0
  46.  
  47.     move.l    _ArpBase,a6
  48.     jsr    _LVOSendPacket(a6)
  49.  
  50.     if INT16
  51.     move.w    d1,_errno
  52.     else
  53.     move.l    d1,_errno
  54.     endc
  55.  
  56.     rts
  57.