home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga ACS 1998 #4
/
amigaacscoverdisc1998-041998.iso
/
utilities
/
commercialdemos
/
warpup-warpos2
/
warprace
/
modsrc
/
memory
/
copy
/
wordcopy.p
< prev
next >
Wrap
Text File
|
1997-09-24
|
2KB
|
88 lines
incdir include:
incdir lvo:
incdir powerasm:source/powerpc_lib/warprace/
** '(C) Copyright 1997 Haage & Partner Computer GmbH'
** All Rights Reserved
include exec/memory.i
include powerpc/ppcmacros.i
include powerpc/powerpc.i
include warprace.i
include powerpc_lib.i
xref _PowerPCBase
xref ErrParams
xdef PPCCopy
smalldata
escapestr
section code
LOOPCOUNT = 1000
MEMSIZE = 256*1024
MEMLOOP = 256
PPCCopy
prolog
pushgpr r29-r31
mr r31,r5
liw r4,MEMSIZE*2
liw r5,MEMF_PUBLIC
li r6,0
CALLPOWERPC AllocVecPPC
mr. r30,r3
beq .error
liw r0,MEMSIZE
add r29,r30,r0
mr r3,r30
mr r4,r29
bl WordCopyPPC
lwz r3,WRI_STARTTIMER_PPC(r31)
mtlr r3
lwz r3,WRI_LINKERDB(r31)
blrl
li r3,MEMLOOP
mtctr r3
.loop
mr r3,r30
mr r4,r29
bl WordCopyPPC
bdnz .loop
lwz r3,WRI_STOPTIMER_PPC(r31)
mtlr r3
lwz r3,WRI_LINKERDB(r31)
blrl
mr r31,r3
mr r4,r30
CALLPOWERPC FreeVecPPC
mr r3,r31
b .end
.error
liw r4,MEMSIZE*2
sw r4,ErrParams
li r3,0
.end
popgpr
epilog
WordCopyPPC
mfctr r6
li r5,MEMSIZE>>5
mtctr r5
subi r3,r3,2
subi r4,r4,2
.copy
rept 16
lhzu r0,2(r3)
sthu r0,2(r4)
endr
bdnz .copy
mtctr r6
blr