added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / arch / .unmaintained / m68k-native / exec / coldreboot.s
blob6912515b39eafaac220872afb880bb090fbd5937
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 /*****************************************************************************
8 NAME
10 AROS_LH0(void, ColdReboot,
12 SYNOPSIS
14 LOCATION
15 struct ExecBase *, SysBase, 121, Exec)
17 FUNCTION
18 Reboots the Amiga.
20 INPUTS
22 RESULT
24 NOTES
25 This function never returns.
27 EXAMPLE
29 BUGS
31 SEE ALSO
33 INTERNALS
35 HISTORY
37 ******************************************************************************/
39 #include "machine.i"
41 .text
42 .balign 4
43 .globl AROS_SLIB_ENTRY(ColdReboot,Exec)
44 .type AROS_SLIB_ENTRY(ColdReboot,Exec),@function
45 AROS_SLIB_ENTRY(ColdReboot,Exec):
46 move.w #0x4000,custom+intena /* disable */
47 moveq.l #0,d0 /* cache bits */
48 moveq.l #-1,d1 /* cache mask */
49 jsr CacheControl(a6) /* disable all cache modes */
51 lea.l resetus(pc),a5 /* actual reset routine */
52 jsr Supervisor(a6) /* supervisor mode, ofcourse */
54 .balign 4
55 resetus:
56 lea.l 0x1000000,a0 /* end of rom */
57 sub.l -0x14(a0),a0 /* subtract size of rom */
58 move.l 4(a0),a0 /* get vector from rom+4 */
59 subq.w #2,a0 /* point to reset instruction */
60 reset /* reset stuff */
61 jmp (a0) /* this instruction was still in prefetch */
63 /* never gets here */