cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/16/18:52:32

From: "Campbell, Rolf [SKY:1U32:EXCH]" <cp1v45 AT americasm01 DOT nt DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: How to reset machnie using pointers?
Date: Mon, 16 Aug 1999 11:42:05 -0400
Organization: Nortel Networks
Lines: 23
Message-ID: <37B8314C.20FA2A0B@americasm01.nt.com>
References: <7p8lmn$np3$1 AT planja DOT arnes DOT si>
NNTP-Posting-Host: bmerhc00.ca.nortel.com
Mime-Version: 1.0
X-Mailer: Mozilla 4.7 [en] (X11; I; HP-UX B.10.20 9000/712)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Matej wrote:

> int main()
> {
>     int* i;
>     i = (int*)0x0;
>     *i = 1;
>
>     return(0);
> }
>
> What's wrong with this? Isn't the data to reset at number 0x0???

    I think your thinking of some other platform.  On an intel machine,
there are 2 ways to reset the machine, the easiest is:

asm("int 0x19");

--
     -Rolf Campbell (39)3-6318



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019