|
|
1.1 root 1: / $Header: /usr/src/sys/ldrv/RCS/ffmem.s,v 1.1 88/03/24 16:30:31 src Exp $
2: /
3: / The information contained herein is a trade secret of INETCO
4: / Systems, and is confidential information. It is provided under
5: / a license agreement, and may be copied or disclosed only under
6: / the terms of that agreement. Any reproduction or disclosure of
7: / this material without the express written authorization of
8: / INETCO Systems or persuant to the license agreement is unlawful.
9: /
10: / Copyright (c) 1986
11: / An unpublished work by INETCO Systems, Ltd.
12: / All rights reserved.
13: /
14: / $Log: /usr/src/sys/ldrv/RCS/ffmem.s,v $
15: / Revision 1.1 88/03/24 16:30:31 src
16: / Initial revision
17: /
18: /
19: ////////
20:
21: ////////
22: /
23: / void
24: / ffmem( fp, m, n ) -- fetch far memory
25: / faddr_t fp;
26: / char * m;
27: / int n;
28: /
29: / Input: fp = far pointer [32 bit selector:offset] to source
30: / m = destination
31: / n = number of bytes to transfer.
32: /
33: / Action: Transfer 'n' bytes from far address 'fp' to offset 'm'
34: / in the current data space.
35: /
36: / Return: None.
37: /
38: ////////
39:
40: .globl ffmem_
41:
42: ffmem_: push si / void
43: push di / ffmem( fp, m, n )
44: push bp /
45: mov bp, sp / register faddr_t fp; /* DS:SI */
46: push ds / register char * m; /* DI */
47: lds si, 8(bp) / register int n; /* CX */
48: mov di, 12(bp) /
49: mov cx, 14(bp) / {
50: /
51: cld /
52: clc / for ( ; n != 0; --n )
53: rcr cx, $1 /
54: rep / *m++ = *fp++;
55: movsw /
56: rcl cx, $1 /
57: rep /
58: movsb /
59: /
60: pop ds / }
61: pop bp
62: pop di
63: pop si
64: ret
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.