|
|
1.1 root 1: //////////
2: / i8086 C string library.
3: / memset()
4: / ANSI 4.11.6.1.
5: //////////
6:
7: //////////
8: / char *
9: / memset(String, Char, Count)
10: / char *String;
11: / int Char, Count;
12: /
13: / Set Count bytes of String to Char.
14: //////////
15:
16: #include <larges.h>
17:
18: String = LEFTARG
19: Char = String+DPL
20: Count = Char+2
21:
22: Enter(memset_)
23: mov cx, Count(bp) / Count to CX
24: movb al, Char(bp) / Char to AL
25: Les di, String(bp) / String address to ES:DI
26: cld
27: rep
28: stosb / Copy Char to String
29: mov ax, String(bp) / Return the destination in AX
30: #if LARGEDATA
31: mov dx, es / or DX:AX
32: #endif
33: Leave
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.