/[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 70 - (show annotations)
Sun May 24 19:53:20 2009 UTC (10 years, 6 months ago) by dbug
File size: 518 byte(s)
Added the complete source code of the OSDK.
Projects files are available for Visual Studio 6 and .net, plus a Code::Blocks setup (everything works except PictConv that relies on FreeImage - which does not build correctly on mingw)
1 ; void memcpy(ptr dst, ptr src, int n)
2 ; new VERY FAST version 8-)
3
4 _memcpy
5 jsr get_2ptr
6 ldy #4
7 sec
8 lda #0
9 sbc (sp),y
10 sta tmp
11 tax
12 iny
13 cmp #1
14 lda (sp),y
15 adc #0
16 tay
17 beq return
18
19 sec
20 lda op1
21 sbc tmp
22 sta memcpyloop+4
23 lda op1+1
24 sbc #0
25 sta memcpyloop+5
26
27 sec
28 lda op2
29 sbc tmp
30 sta memcpyloop+1
31 lda op2+1
32 sbc #0
33 sta memcpyloop+2
34
35 memcpyloop
36 lda $2211,x
37 sta $5544,x
38 inx
39 bne memcpyloop
40 inc memcpyloop+2
41 inc memcpyloop+5
42 dey
43 bne memcpyloop
44 return
45 rts

  ViewVC Help
Powered by ViewVC 1.1.26