1/* $NetBSD: libstubs.s,v 1.3 1999/02/16 23:34:11 is Exp $ */ 2 3/*- 4 * Copyright (c) 1996 The NetBSD Foundation, Inc. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to The NetBSD Foundation 8 * by Ignatios Souvatzis. 9 * 10 * Redistribution and use in source and binary forms, with or without 11 * modification, are permitted provided that the following conditions 12 * are met: 13 * 1. Redistributions of source code must retain the above copyright 14 * notice, this list of conditions and the following disclaimer. 15 * 2. Redistributions in binary form must reproduce the above copyright 16 * notice, this list of conditions and the following disclaimer in the 17 * documentation and/or other materials provided with the distribution. 18 * 3. All advertising materials mentioning features or use of this software 19 * must display the following acknowledgement: 20 * This product includes software developed by the NetBSD 21 * Foundation, Inc. and its contributors. 22 * 4. Neither the name of The NetBSD Foundation nor the names of its 23 * contributors may be used to endorse or promote products derived 24 * from this software without specific prior written permission. 25 * 26 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 27 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 28 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 29 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 30 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 31 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 32 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 33 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 34 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 35 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 * POSSIBILITY OF SUCH DAMAGE. 37 */ 38 39/* 40 * Exec.library functions. 41 */ 42 .comm _SysBase,4 43 44 .globl _OpenLibrary 45_OpenLibrary: 46 movl a6,sp@- 47 movl pc@(_SysBase:w),a6 48 movl sp@(8),a1 49 movl sp@(12),d0 50 jsr a6@(-0x228) 51 movl sp@+,a6 52 rts 53#ifdef notyet 54 .globl _CloseLibrary 55_CloseLibrary: 56 movl a6,sp@- 57 movl pc@(_SysBase:w),a6 58 movl sp@(8),a1 59 jsr a6@(-0x19e) 60 movl sp@+,a6 61 rts 62#endif 63 .globl _CreateIORequest 64_CreateIORequest: 65 movl a6,sp@- 66 movl pc@(_SysBase:w),a6 67 movl sp@(8),a0 68 movl sp@(12),d0 69 jsr a6@(-0x28e) 70 movl sp@+,a6 71 rts 72 73 .globl _CreateMsgPort 74_CreateMsgPort: 75 movl a6,sp@- 76 movl pc@(_SysBase:w),a6 77 jsr a6@(-0x29a) 78 movl sp@+,a6 79 rts 80 81#ifdef notyet 82 .globl _DeleteMsgPort 83_DeleteMsgPort: 84 movl a6,sp@- 85 movl pc@(_SysBase:w),a6 86 movl sp@(8),a0 87 jsr a6@(-0x2a0) 88 movl sp@+,a6 89 rts 90 91 .globl _DeleteIORequest 92_DeleteIORequest: 93 movl a6,sp@- 94 movl pc@(_SysBase:w),a6 95 movl sp@(8),a0 96 jsr a6@(-0x294) 97 movl sp@+,a6 98 rts 99#endif 100 101 .globl _OpenDevice 102_OpenDevice: 103 movl a6,sp@- 104 movl pc@(_SysBase:w),a6 105 movl sp@(8),a0 106 movl sp@(12),d0 107 movl sp@(16),a1 108 movl sp@(20),d1 109 jsr a6@(-0x1bc) 110 movl sp@+,a6 111 rts 112 113 .globl _DoIO 114_DoIO: 115 movl a6,sp@- 116 movl pc@(_SysBase:w),a6 117 movl sp@(8),a1 118 jsr a6@(-0x1c8) 119 movl sp@+,a6 120 rts 121#ifdef nomore 122 .globl _CheckIO 123_CheckIO: 124 movl a6,sp@- 125 movl pc@(_SysBase:w),a6 126 movl sp@(8),a1 127 jsr a6@(-0x1d4) 128 movl sp@+,a6 129 rts 130#endif 131 .globl _WaitIO 132_WaitIO: 133 movl a6,sp@- 134 movl pc@(_SysBase:w),a6 135 movl sp@(8),a1 136 jsr a6@(-0x1da) 137 movl sp@+,a6 138 rts 139 140 .globl _SendIO 141_SendIO: 142 movl a6,sp@- 143 movl pc@(_SysBase:w),a6 144 movl sp@(8),a1 145 jsr a6@(-0x1ce) 146 movl sp@+,a6 147 rts 148 149 .globl _AbortIO 150_AbortIO: 151 movl a6,sp@- 152 movl pc@(_SysBase:w),a6 153 movl sp@(8),a1 154 jsr a6@(-0x1e0) 155 movl sp@+,a6 156 rts 157 158 .globl _WaitPort 159_WaitPort: 160 movl a6,sp@- 161 movl pc@(_SysBase:w),a6 162 movl sp@(8),a0 163 jsr a6@(-0x180) 164 movl sp@+,a6 165 rts 166 167#ifndef DOINLINES 168 .globl _CacheClearU 169_CacheClearU: 170 movl a6,sp@- 171 movl pc@(_SysBase:w),a6 172 jsr a6@(-0x27c) 173 movl sp@+,a6 174 rts 175#endif 176 .globl _CachePreDMA 177_CachePreDMA: 178 movl a6,sp@- 179 movl pc@(_SysBase:w),a6 180 movl sp@(8),a0 181 movl sp@(12),a1 182 movl sp@(16),d0 183 jsr a6@(-0x2fa) 184 movl sp@+,a6 185 rts 186 187 .globl _FindResident 188_FindResident: 189 movl a6,sp@- 190 movl pc@(_SysBase:w),a6 191 movl sp@(8),a1 192 jsr a6@(-0x60) 193 movl sp@+,a6 194 rts 195 196 .globl _OpenResource 197_OpenResource: 198 movl a6,sp@- 199 movl pc@(_SysBase:w),a6 200 movl sp@(8),a1 201 jsr a6@(-0x1f2) 202 movl sp@+,a6 203 rts 204#ifdef notyet 205 .globl _Forbid 206_Forbid: 207 movl a6,sp@- 208 movl pc@(_SysBase:W),a6 209 jsr a6@(-0x84) 210 movl sp@+,a6 211 rts 212 213 .globl _Permit 214_Permit: 215 movl a6,sp@- 216 movl pc@(_SysBase:W),a6 217 jsr a6@(-0x8a) 218 movl sp@+,a6 219 rts 220#endif 221 222/* 223 * Intuition.library functions. 224 */ 225 226 .comm _IntuitionBase,4 227 228 .globl _OpenScreenTagList 229_OpenScreenTagList: 230 movl a6,sp@- 231 movl pc@(_IntuitionBase:w),a6 232 movl sp@(8),a0 233 movl sp@(12),a1 234 jsr a6@(-0x264) 235 movl sp@+,a6 236 rts 237 238 .globl _OpenWindowTagList 239_OpenWindowTagList: 240 movl a6,sp@- 241 movl pc@(_IntuitionBase:w),a6 242 movl sp@(8),a0 243 movl sp@(12),a1 244 jsr a6@(-0x25e) 245 movl sp@+,a6 246 rts 247#ifdef nomore 248 .globl _mytime 249_mytime: 250 movl a6,sp@- 251 movl pc@(_IntuitionBase:w),a6 252 subql #8,sp 253 movl sp,a0 254 lea sp@(4),a1 255 jsr a6@(-0x54) 256 movl sp@+,d0 257 addql #4,sp 258 movl sp@+,a6 259 rts 260#endif 261 .comm _ExpansionBase,4 262 .globl _FindConfigDev 263_FindConfigDev: 264 movl a6,sp@- 265 movl _ExpansionBase,a6 266 movl sp@(8),a0 267 movl sp@(12),d0 268 movl sp@(16),d1 269 jsr a6@(-0x48) 270 movl sp@+,a6 271 rts 272