home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 4 / AACD04.ISO / AACD / Programming / powerd / lib / PowerD / NewEStr.ass < prev    next >
Encoding:
Text File  |  1999-09-17  |  384 b   |  19 lines

  1. ; (4,a7) - length
  2.  
  3.     xdef    _NewEStr
  4.  
  5. _NewEStr    movem.l    d2/a6,-(a7)
  6.     move.l    (12,a7),d2    ; size shifted by brs and movem instructions
  7.     move.l    d2,d0
  8.     addq.l    #4,d0        ; add header
  9.     move.l    #$50000,d1    ; MEMF_CLEAR|MEMF_REVERSE
  10.     movea.l    $4.w,a6
  11.     jsr    (-198,a6)        ; AllocMem
  12.     tst.l    d0
  13.     beq.s    .finish
  14.     addq.l    #4,d0        ; shift by header
  15.     movea.l    d0,a0
  16.     move.w    d2,(-4,a0)
  17. .finish    movem.l    (a7)+,d2/a6
  18.     rts
  19.