🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Obliterating your boot sector, Part I

#37480
From: Rob Demillo
Date: Wed, 29 Mar 1989 15:32
39 lines
2229 bytes
OK, here I am...peacefully working on a contract program. Suddenly,
I decide that, for various reasons, it would be a useful thing to 
be able to detect whether GDOS is installed on the user's machine.
If GDOS is not installed, maybe I can force it into memory...but the
first part of the project is just to see if GDOS is there at all...

Piece O' Cake, me thinks...I 'whip' together a 5 line assembler
routine which essentially does a 
		TRAP #2
and checks the D0 register. Low and behold this does work. I boot
my machine with GDOS, my routine finds it. I cold boot without GDOS
installed, and my routine informs me there is no GDOS on the system.

'Gosh,' I think to myself, 'I sure am smart.' 

Now I'm at the desktop after running my program. I open up the C:/AUTO/
directory, and rename a file. There is a disgusting flash as my machine
mysteriously tries to reboot. It does: sans hard disk! (Keep in mind
that it is now midnight, or thereabouts...) A quick check of drive
C: with a sector editor confirms my fears: sector 0 (the boot sector)
has been replaced with a copy of the FAT for C:/AUTO/...

After swearing, throwing up, wishing I was a chartered accountant, and
various other bad things...I sit down to rebuild my boot sector
by hand. (It took three bleary-eyed hours, but I got it back...)

My question is: was this a co-ink-ee-dink, or did the TRAP #2 put
my Atari into the twilight zone? 

Any responses, theories, or shots-in-the-dark are appreciated, since I
am hesitant to try this experiment again...

Thanks...


 - Rob DeMillo			| UUCP:   ...ima!brunix!rjd
   Brown University 		| BITnet: DEMILLO%BRNPSG.SPAN@STAR.STANFORD.EDU
   Planetary Science Group	| Reality: 401-863-3769
"I say you *are* the Messiah, Lord! And I ought to know, I've followed a few!"
Technical Details
Message-ID: <2938@brunix.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!lll-winken!uunet!brunix!rjd

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!lll-winken!uunet!brunix!rjd
From: rjd@cs.brown.edu (Rob Demillo)
Newsgroups: comp.sys.atari.st
Subject: Obliterating your boot sector, Part I
Message-ID: <2938@brunix.UUCP>
Date: 29 Mar 89 15:32:43 GMT
Sender: news@brunix.UUCP
Reply-To: rjd@cs.brown.edu (Rob Demillo)
Organization: Brown University Department of Computer Science
Lines: 39