;	ColdReboot - the official way to reboot an Amiga
;
;	Reboots the machine.  All external memory and peripherals will be
;	RESET, and the machine will start its power up diagnostics
;
;	The MagicResetCode must be used exactly as specified here.
;	The MagicResetCode must be longword aligned.  Failure to
;	duplicate the code EXACTLY will result in improper operation
;	under certain system configurations.


	XDEF _ColdReboot
	XREF _LVOSupervisor

_ColdReboot:
	move.l	4,a6					;Get a pointer to ExecBase
	lea.l	MagicResetCode(pc),a5	;Location of code to run
	jsr		_LVOSupervisor(a6)		;RUN code in supervisor mode

;---------- MagicResetCode ------ DO NOT CHANGE ------------------

	CNOP	0,4					;IMPORTANT!  Longword align Do not change

MagicResetCode:
	lea.l	2,a0				;Point to JMP instruction at start of ROM
	RESET						;all RAM goes away now
	jmp		(a0)				;rely on prefetch to execute this

	end
