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

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

Parent Directory Parent Directory | Revision Log Revision Log


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


1 ;int strcmpi(char *s1, char *s2)
2 _strcmpi
3 jsr get_2ptr
4 ldy #0
5
6 strcmpiloop
7 lda (op2),Y ; toupper(*s2), store in tmp
8 sty tmp2
9 tax
10 jsr _touppermc
11 ldy tmp2
12 stx tmp
13
14 lda (op1),Y ; toupper(*s1), compare with tmp
15 sty tmp2
16 tax
17 jsr _touppermc
18 ldy tmp2
19 txa
20 cmp tmp
21
22 bne strcmpiend
23 cmp #0
24 beq strcmpiend0
25 iny
26 bne strcmpiloop
27 inc op1+1
28 inc op2+1
29 jmp strcmpiloop
30
31 strcmpiend0
32 jmp retzero
33 strcmpiend
34 sec
35 sbc tmp
36 tax
37 lda #0
38 bcs *+4
39 lda #$ff
40 rts
41

  ViewVC Help
Powered by ViewVC 1.1.26