> ----- Original Message ----- > From: "Michael Rigby-Jones" > Subject: RE: [PIC] the result of rest > > >> Contents of the general purpose registers after a power-on reset are >> undefined, you cannot rely on them having any value. > > By the way, this is one of the places where the simulator does a bad job. > The simulator begins with all the GPRs having a zero, and always assumes > power remains during a reset. > > In the real world, loss of power does NOT result in the GPRs containing > zero. The contents are random. (Well, they probably aren't truly random, > but for any practical purpose they should be assumed to be.) > > 72/73 de WB8RCR http://www.qsl.net/wb8rcr > didileydadidah QRP-L #1446 Code Warriors #35 Don't, for example, check a few locations for expected values to decide that this is a non-power down reset. There are SFR flags for this sort of thing. Bob Ammerman RAm Systems _______________________________________________ http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist