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