2474
|
1 **********************************
|
|
2
|
|
3 * STRCAT: append 2 null terminated strings
|
|
4 * User must ensure there is room in buffer!!!
|
|
5
|
|
6 * OTHER MODULES NEEDED: STRCPY, STRLEN
|
|
7
|
|
8 * ENTRY: X=start of string to move
|
|
9 * Y=start of string to append to
|
|
10
|
|
11 * EXIT: all regs preserved (except cc)
|
|
12
|
|
13
|
|
14 nam Append 2 null terminated strings
|
|
15 ttl Assembler Library Module
|
|
16
|
|
17
|
|
18 psect STRCAT,0,0,0,0,0
|
|
19
|
|
20 STRCAT:
|
|
21 pshs d,x,y
|
|
22 exg x,y
|
|
23 lbsr STRLEN find end of appended string
|
|
24 leax d,x point to end of "buffer"
|
|
25 exg x,y
|
|
26 lbsr STRCPY copy string
|
|
27 puls d,x,y,pc
|
|
28
|
|
29 endsect
|
|
30
|
|
31 |