annotate lib/alib/strncmp.a @ 2765:0bd16cca86b7

Updated rules.mak for all the os9 format's to format the entire disk. People were having some issues with the disk images not being formatted to their full capacity and preventing some functions from working.
author drencor-xeen
date Thu, 17 Jan 2013 11:03:26 -0600
parents 7d70b7e1cb21
children aaba193af04f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2474
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
1 *************************************
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
2
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
3 * STRNCMP: compare 2 null terminated strings
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
4 * maximum number of bytes to compare in D
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
5 *
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
6 * OTHER MODULES NEEDED: COMPARE
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
8 * ENTRY: X=start of 1st string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
9 * Y=start of 2nd string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
10 * D=number of bytes to compare
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
11 * CASEMTCH:(a global variable in COMPARE)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
12 * 0=match for case
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
13 * -1=ignore case differences
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
14
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
15 * EXIT: CC zero set if equal (beq)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
16 * carry + zero clear if 1>2 (bhi)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
17 * carry set if 1<2 (blo)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
18
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
19 nam Compare 2 Strings
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
20 ttl Assembler Library Module
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
21
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
22
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
23 psect STRNCMP,0,0,0,0,0
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
24
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
25
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
26 STRNCMP:
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
27 pshs d,x,y,u
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
28
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
29 tfr y,u U=string2
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
30 tfr d,y use Y for counter
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
31 leay 1,y comp for initial dec.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
32
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
33 loop
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
34 leay -1,y count down
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
35 beq exit no miss-matches
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
36 lda ,x+ get 2 to compare
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
37 ldb ,u+
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
38 lbsr COMPARE go compare chars.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
39 beq loop chars match, do more
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
40
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
41 * exit with flags set. Do a beq, bhi or blo to correct
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
42 * routines....
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
43
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
44 exit
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
45 puls d,x,y,u,pc
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
46
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
47 endsect