]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* |
2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
43866e37 | 6 | * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. |
1c79356b | 7 | * |
43866e37 A |
8 | * This file contains Original Code and/or Modifications of Original Code |
9 | * as defined in and that are subject to the Apple Public Source License | |
10 | * Version 2.0 (the 'License'). You may not use this file except in | |
11 | * compliance with the License. Please obtain a copy of the License at | |
12 | * http://www.opensource.apple.com/apsl/ and read it before using this | |
13 | * file. | |
14 | * | |
15 | * The Original Code and all software distributed under the License are | |
16 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
1c79356b A |
17 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
18 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
43866e37 A |
19 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. |
20 | * Please see the License for the specific language governing rights and | |
21 | * limitations under the License. | |
1c79356b A |
22 | * |
23 | * @APPLE_LICENSE_HEADER_END@ | |
24 | */ | |
25 | /* CMU_ENDHIST */ | |
26 | /* | |
27 | * Mach Operating System | |
28 | * Copyright (c) 1991,1990,1989 Carnegie Mellon University | |
29 | * All Rights Reserved. | |
30 | * | |
31 | * Permission to use, copy, modify and distribute this software and its | |
32 | * documentation is hereby granted, provided that both the copyright | |
33 | * notice and this permission notice appear in all copies of the | |
34 | * software, derivative works or modified versions, and any portions | |
35 | * thereof, and that both notices appear in supporting documentation. | |
36 | * | |
37 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | |
38 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | |
39 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | |
40 | * | |
41 | * Carnegie Mellon requests users of this software to return to | |
42 | * | |
43 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | |
44 | * School of Computer Science | |
45 | * Carnegie Mellon University | |
46 | * Pittsburgh PA 15213-3890 | |
47 | * | |
48 | * any improvements or extensions that they make and grant Carnegie Mellon | |
49 | * the rights to redistribute these changes. | |
50 | */ | |
51 | /* | |
52 | */ | |
53 | ||
54 | /* | |
55 | * Some inline code to speed up major block copies to and from the | |
56 | * screen buffer. | |
57 | * | |
58 | * Copyright Ing. C. Olivetti & C. S.p.A. 1988, 1989. | |
59 | * All rights reserved. | |
60 | * | |
61 | * orc!eugene 28 Oct 1988 | |
62 | * | |
63 | */ | |
64 | /* | |
65 | * Copyright 1988, 1989 by Olivetti Advanced Technology Center, Inc., | |
66 | * Cupertino, California. | |
67 | * | |
68 | * All Rights Reserved | |
69 | * | |
70 | * Permission to use, copy, modify, and distribute this software and | |
71 | * its documentation for any purpose and without fee is hereby | |
72 | * granted, provided that the above copyright notice appears in all | |
73 | * copies and that both the copyright notice and this permission notice | |
74 | * appear in supporting documentation, and that the name of Olivetti | |
75 | * not be used in advertising or publicity pertaining to distribution | |
76 | * of the software without specific, written prior permission. | |
77 | * | |
78 | * OLIVETTI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE | |
79 | * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, | |
80 | * IN NO EVENT SHALL OLIVETTI BE LIABLE FOR ANY SPECIAL, INDIRECT, OR | |
81 | * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | |
82 | * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT, | |
83 | * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUR OF OR IN CONNECTION | |
84 | * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
85 | */ | |
86 | ||
87 | /* $ Header: $ */ | |
88 | ||
89 | ||
90 | ||
91 | /* | |
92 | * Function: kd_slmwd() | |
93 | * | |
94 | * This function "slams" a word (char/attr) into the screen memory using | |
95 | * a block fill operation on the 386. | |
96 | * | |
97 | */ | |
98 | ||
99 | #define start 0x08(%ebp) | |
100 | #define count 0x0c(%ebp) | |
101 | #define value 0x10(%ebp) | |
102 | ||
103 | .text | |
104 | .align 2 | |
105 | .globl _kd_slmwd | |
106 | ||
107 | _kd_slmwd: | |
108 | pushl %ebp | |
109 | movl %esp, %ebp | |
110 | pushl %edi | |
111 | ||
112 | movl start, %edi | |
113 | movl count, %ecx | |
114 | movw value, %ax | |
115 | cld | |
116 | rep | |
117 | stosw | |
118 | ||
119 | popl %edi | |
120 | leave | |
121 | ret | |
122 | #undef start | |
123 | #undef count | |
124 | #undef value | |
125 | ||
126 | /* | |
127 | * "slam up" | |
128 | */ | |
129 | ||
130 | #define from 0x08(%ebp) | |
131 | #define to 0x0c(%ebp) | |
132 | #define count 0x10(%ebp) | |
133 | .align 2 | |
134 | .globl _kd_slmscu | |
135 | ||
136 | _kd_slmscu: | |
137 | pushl %ebp | |
138 | movl %esp, %ebp | |
139 | pushl %esi | |
140 | pushl %edi | |
141 | ||
142 | movl from, %esi | |
143 | movl to, %edi | |
144 | movl count, %ecx | |
145 | cmpl %edi, %esi | |
146 | cld | |
147 | rep | |
148 | movsw | |
149 | ||
150 | popl %edi | |
151 | popl %esi | |
152 | leave | |
153 | ret | |
154 | ||
155 | /* | |
156 | * "slam down" | |
157 | */ | |
158 | .align 2 | |
159 | .globl _kd_slmscd | |
160 | ||
161 | _kd_slmscd: | |
162 | pushl %ebp | |
163 | movl %esp, %ebp | |
164 | pushl %esi | |
165 | pushl %edi | |
166 | ||
167 | movl from, %esi | |
168 | movl to, %edi | |
169 | movl count, %ecx | |
170 | cmpl %edi, %esi | |
171 | std | |
172 | rep | |
173 | movsw | |
174 | cld | |
175 | ||
176 | popl %edi | |
177 | popl %esi | |
178 | leave | |
179 | ret | |
180 | #undef from | |
181 | #undef to | |
182 | #undef count |