/[projet1]/public/pc/tools/osdk/main/Osdk/_final_/lib/memcpy.s
Defence Force logotype

Contents of /public/pc/tools/osdk/main/Osdk/_final_/lib/memcpy.s

Parent Directory Parent Directory | Revision Log Revision Log


Revision 781 - (show annotations)
Sat Jan 21 22:33:21 2012 UTC (7 years, 10 months ago) by dbug
File size: 529 byte(s)
Updated the depot with the source code of the OSDK 0.019
1 ; void memcpy(ptr dst, ptr src, int n)
2 ; new VERY FAST version 8-)
3
4 _memcpy
5 .(
6 jsr get_2ptr
7 ldy #4
8 sec
9 lda #0
10 sbc (sp),y
11 sta tmp
12 tax
13 iny
14 cmp #1
15 lda (sp),y
16 adc #0
17 tay
18 beq return
19
20 sec
21 lda op1
22 sbc tmp
23 sta memcpyloop+4
24 lda op1+1
25 sbc #0
26 sta memcpyloop+5
27
28 sec
29 lda op2
30 sbc tmp
31 sta memcpyloop+1
32 lda op2+1
33 sbc #0
34 sta memcpyloop+2
35
36 memcpyloop
37 lda $2211,x
38 sta $5544,x
39 inx
40 bne memcpyloop
41 inc memcpyloop+2
42 inc memcpyloop+5
43 dey
44 bne memcpyloop
45 return
46 rts
47 .)
48

  ViewVC Help
Powered by ViewVC 1.1.26