|
|
1.1 root 1: //////////
2: / i8086 C string library.
3: / strcat()
4: / ANSI 4.11.3.1.
5: //////////
6:
7: //////////
8: / char *
9: / strcat(To, From)
10: / char *To, *From;
11: /
12: / Append From to To.
13: //////////
14:
15: #include <larges.h>
16:
17: To = LEFTARG
18: From = To+DPL
19:
20: Enter(strcat_)
21: Lds si, From(bp) / From address to DS:SI
22: Les di, To(bp) / To address to ES:DI
23: mov cx, $-1 / Max count to CX
24: sub ax, ax
25: cld
26: repne
27: scasb / Find end of To
28: dec di / and back up to NUL
29:
30: 1: lodsb / Fetch From char to AL
31: stosb / and store through To
32: orb al, al
33: jne 1b / Not done
34: mov ax, To(bp) / Return the destination
35: #if LARGEDATA
36: mov dx, es
37: #endif
38: Leave
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.