annotate lib/alib/compare.a @ 2593:4c3c19ec3257

Added second vhd drive for MESS version 144 and newer. Will not alter performance with older versions of MESS.
author robertgault
date Sat, 24 Dec 2011 13:01:17 +0000
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 * COMPARE: Subroutine for string comparsion routines.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
4 * Compares chars in A/B, will convert both to
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
5 * uppercase first if CASEMTCH is set (negative)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
6
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 * OTHER MODULES NEEDED: TO_UPPER
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
9
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
10 * ENTRY: A/B=characters to compare
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
11 * CASEMTCH=0 (or positive value) if A<>a
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
12 * -1 (or neg value) if A=a
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
13
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 characters match.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
16 * All other registers preserved.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
17
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 Chars
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 COMPARE,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 vsect dp
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
26
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
27 CASEMTCH: rmb 1
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 endsect
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
30
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
31 COMPARE:
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
32 pshs d
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
33 tst CASEMTCH need to covert to upper?
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
34 bpl no
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
35 lbsr TO_UPPER
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
36 exg a,b
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
37 lbsr TO_UPPER
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
38 no
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
39 pshs a somewhere to compare it
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
40 cmpb ,s+ do compare, set zero
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
41 puls d,pc go home
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
42
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
43 endsect