117680Spst/* $NetBSD: startit.s,v 1.2 2002/05/20 05:58:45 mhitch Exp $ */ 217680Spst 317680Spst/* 417680Spst * Copyright (c) 1996 Ignatios Souvatzis 517680Spst * Copyright (c) 1994 Michael L. Hitch 617680Spst * All rights reserved. 717680Spst * 817680Spst * Redistribution and use in source and binary forms, with or without 917680Spst * modification, are permitted provided that the following conditions 1017680Spst * are met: 1117680Spst * 1. Redistributions of source code must retain the above copyright 1217680Spst * notice, this list of conditions and the following disclaimer. 1317680Spst * 2. Redistributions in binary form must reproduce the above copyright 1417680Spst * notice, this list of conditions and the following disclaimer in the 1517680Spst * documentation and/or other materials provided with the distribution. 1617680Spst * 1717680Spst * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 1817680Spst * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1917680Spst * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2053146Sbrian * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 2117680Spst * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2217680Spst * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2375118Sfenner * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2475118Sfenner * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2575118Sfenner * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2675118Sfenner * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2775118Sfenner * 2875118Sfenner * 2975118Sfenner * From: $NetBSD: startit.s,v 1.2 2002/05/20 05:58:45 mhitch Exp $ 3075118Sfenner */ 3175118Sfenner#include "machine/asm.h" 3275118Sfenner 3375118Sfenner .set ABSEXECBASE,4 3417680Spst 35146778Ssam .text 36146778Ssam 37146778SsamENTRY_NOPROFILE(startit) 38146778Ssam movel 4:w,%a6 | SysBase 39146778Ssam movel %sp@(4),%a0 | Boot loader address 40146778Ssam movel %sp@(8),%a1 | IOR 41146778Ssam movel %sp@(12),%a5 | Console data 4275118Sfenner/* 4375118Sfenner * Installboot can modify the default command in the bootblock loader, 4475118Sfenner * but boot.amiga uses the default command in boot.amiga. Copy the 4575118Sfenner * possibly modified default command before entering the boot loader. 4675118Sfenner */ 4775118Sfenner lea %pc@(_C_LABEL(default_command)),%a2 4875118Sfenner lea %a0@(16),%a3 4975118Sfenner moveq #(32/4)-1,%d0 5075118SfennerLcommand: 5175118Sfenner movel %a2@+,%a3@+ 5275118Sfenner dbra %d0,Lcommand 5375118Sfenner 5417680Spst jsr %a0@(12) 5517680Spst rts 5617680Spst