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

Contents of /public/pc/tools/osdk/main/Osdk/_final_/lib2/strlen.s

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1154 - (show annotations)
Sun Aug 10 18:19:54 2014 UTC (5 years, 3 months ago) by dbug
File size: 218 byte(s)


1 ; int strlen(char *s)
2 _strlen
3 ldy #1
4 lda (sp),y
5 sta tmp+1
6 dey
7 lda (sp),y
8 sta tmp
9 ldx #0
10
11 looplen
12 lda (tmp),y
13 beq endstrlen
14 iny
15 bne looplen
16 inc tmp+1
17 inx
18 bne looplen
19 endstrlen
20 sty tmp
21 txa
22 ldx tmp
23 rts

  ViewVC Help
Powered by ViewVC 1.1.26