2474
|
1 *******************************
|
|
2
|
|
3 * convert a null terminated string to all lowercase
|
|
4
|
|
5 * OTHER MODULES NEEDED: TO_LOWER
|
|
6
|
|
7 * ENTRY: X=start of string
|
|
8
|
|
9 * EXIT: all registers preserved
|
|
10
|
|
11 nam Convert String to Lowercase
|
|
12 ttl Assembler Library Module
|
|
13
|
|
14 psect TO_LOWRS,0,0,0,0,0
|
|
15
|
|
16 TO_LOWRS:
|
|
17 pshs cc,b,x
|
|
18
|
|
19 loop
|
|
20 ldb ,x get char to check
|
|
21 beq exit exit if all done
|
|
22 bsr TO_LOWER convert to upper
|
|
23 stb ,x+ put back in string
|
|
24 bra loop loop till done
|
|
25
|
|
26 exit
|
|
27 puls cc,b,x,pc
|
|
28
|
|
29 endsect
|
|
30
|