🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #6163

Re: Cold Start

#6163
From: HC Johnson
Date: Mon, 27 Nov 1989 18:39
65 lines
2383 bytes
In article <4642@blake.acs.washington.edu>, themod@blake.acs.washington.edu (Chris Hinton) writes:
> 
>   Help!  I have search high and low, through every manual I could lay my 
> grubby paws on, and yet I can find no documentation on how to perform a 
> cold start from software.  If some kind soul out there can send me code

From mtune!decvax.UUCP!minow Sun Sep 20 15:04:56 1987
Path: lzaz!mtune!whuts!homxb!mhuxt!mhuxm!mhuxh!mhuxo!ulysses!faline!bellcore!rutgers!mcnc!gatech!bloom-beacon!oberon!cit-vax!ucla-cs!zen!ucbvax!decvax!minow
From: minow@decvax.UUCP (Martin Minow)
Newsgroups: comp.sys.atari.st
Subject: Simple program to reboot an Atari ST
Message-ID: <152@decvax.UUCP>
Date: 20 Sep 87 19:04:56 GMT
Reply-To: minow@decvax.UUCP (Martin Minow)
Distribution: world
Organization: Digital Eq. Corp. - Merrimack NH.
Lines: 40

#if 0
This illustrates how to emulate the white button (warmstart) or
power-switch on an Atari.  It *should* be compatible with the new roms.
Normally, you would add the guts to an existing program.

Martin Minow
decvax!minow
#endif

/*
 * Reboot an Atari ST.  This program is in the public-domain.
 * Martin Minow, Arlington MA 02174, USA.
 */

#include <osbind.h>
#include <linea.h>

#define OS_memvalid	(*((long *) 0x420L))
#define	OS_memval2	(*((long *) 0x43AL))
#define OS_resvalid	(*((long *) 0x426L))
#define OS_restart	(*((int(*)()) 0xFC0000L))

main()
{
	int		hardboot;
	long		oldstack;

	hidemouse();
	Cconws("\033EX or x to hardboot, anything else to softboot: ");
	hardboot = Cconin() & 0xFF;
	oldstack = Super(0L);			/* Get into super mode	*/
	if (hardboot == 'X'
	 || hardboot == 'x') {
	    OS_memvalid = 0L;			/* Invalidate the OS	*/
	    OS_memval2  = 0L;			/* "up and running"	*/
	    OS_resvalid = 0L;			/* flags.		*/
	}	    	
	OS_restart();				/* Imitate system reset	*/
	Super(oldstack);			/* We never get here	*/
}



Howard C. Johnson
ATT Bell Labs
att!lzaz!hcj
hcj@lzaz.att.com
Technical Details
Message-ID: <868@lzaz.ATT.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!att!dptg!lzaz!hcj
References: <4642@blake.acs.washington.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!att!dptg!lzaz!hcj
From: hcj@lzaz.ATT.COM (HC Johnson)
Newsgroups: comp.sys.atari.st
Subject: Re: Cold Start
Summary: here is a C version
Message-ID: <868@lzaz.ATT.COM>
Date: 27 Nov 89 18:39:02 GMT
References: <4642@blake.acs.washington.edu>
Organization: AT&T ISL Lincroft NJ USA
Lines: 65