home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #4 / amigaacscoverdisc1998-041998.iso / utilities / commercialdemos / warpup-warpos2 / warprace / modsrc / memory / write / longwrite.p < prev    next >
Text File  |  1997-09-24  |  2KB  |  82 lines

  1.                 incdir  include:
  2.                 incdir  lvo:
  3.                 incdir  powerasm:source/powerpc_lib/warprace/
  4.  
  5. **      '(C) Copyright 1997 Haage & Partner Computer GmbH'
  6. **           All Rights Reserved
  7.  
  8.                 include exec/memory.i
  9.                 include powerpc/ppcmacros.i
  10.                 include powerpc/powerpc.i
  11.                 include warprace.i
  12.  
  13.                 include powerpc_lib.i
  14.  
  15.                 xref    _PowerPCBase
  16.                 xref    ErrParams
  17.  
  18.                 xdef    PPCCopy
  19.  
  20.                 smalldata
  21.                 escapestr
  22.  
  23.                 section code
  24.  
  25. LOOPCOUNT       =       1000
  26.  
  27. MEMSIZE         =       256*1024
  28. MEMLOOP         =       256
  29.  
  30. PPCCopy
  31.                 prolog
  32.                 pushgpr r29-r31
  33.                 mr      r31,r5
  34.                 liw     r4,MEMSIZE*2
  35.                 liw     r5,MEMF_PUBLIC
  36.                 li      r6,0
  37.                 CALLPOWERPC     AllocVecPPC
  38.                 mr.     r30,r3
  39.                 beq     .error
  40.                 mr      r3,r30
  41.                 bl      LongWritePPC
  42.                 lwz     r3,WRI_STARTTIMER_PPC(r31)
  43.                 mtlr    r3
  44.                 lwz     r3,WRI_LINKERDB(r31)
  45.                 blrl
  46.                 li      r3,MEMLOOP
  47.                 mtctr   r3
  48. .loop
  49.                 mr      r3,r30
  50.                 bl      LongWritePPC
  51.                 bdnz    .loop
  52.                 lwz     r3,WRI_STOPTIMER_PPC(r31)
  53.                 mtlr    r3
  54.                 lwz     r3,WRI_LINKERDB(r31)
  55.                 blrl
  56.                 mr      r31,r3
  57.                 mr      r4,r30
  58.                 CALLPOWERPC     FreeVecPPC
  59.                 mr      r3,r31
  60.                 b       .end
  61. .error
  62.                 liw     r4,MEMSIZE*2
  63.                 sw      r4,ErrParams
  64.                 li      r3,0
  65. .end
  66.                 popgpr
  67.                 epilog
  68.  
  69. LongWritePPC
  70.                 mfctr   r6
  71.                 li      r5,MEMSIZE>>6
  72.                 mtctr   r5
  73.                 subi    r3,r3,4
  74. .copy
  75.                 rept    16
  76.                 stwu    r0,4(r3)
  77.                 endr
  78.                 bdnz    .copy
  79.                 mtctr   r6
  80.                 blr
  81.  
  82.