Searching \ for 'MPSIM message' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=mpsim+message
Search entire site for: 'MPSIM message'.

Truncated match.
PICList Thread
'MPSIM message'
1997\01\02@145721 by Bob Blick

flavicon
face
What does the message "Caution - file register read before written" that
MPSIM attaches to certain instructions signify? Is it telling me anything I
should pay attention to, ie "the simulator behavior is different from
silicon at this point" or what? The documentation does not seem to cover
this message.

Thanks, Bob

1997\01\02@233626 by myke predko

flavicon
face
>What does the message "Caution - file register read before written" that
>MPSIM attaches to certain instructions signify? Is it telling me anything I
>should pay attention to, ie "the simulator behavior is different from
>silicon at this point" or what? The documentation does not seem to cover
>this message.

The message is telling you that you are reading a file register before it
has been originally written to and if you are depending on this value, it's
probably in error.

The power up values of file registers are indeterminant (an individual value
*may* seem to be always a certain value, but if you were to record the power
up values everytime you powered up, you'd find that they change).  Actually,
I did this experiment (I can give you the code - just requires a few LEDs
and a switch).

Because of this, it is extremely important that all variables are
initialized at the start of a program; even if it is just to clear them, it
is better than trying to debug what is going on.

I spent six weeks in the Summer of '96 looking for an improperly initialized
variable (many people on the list will probably remember it).
Unfortunately, the variable wasn't hit until about 100,000 cycles (or 100
msec) into the program (which takes an inordinate amount of time for the
simulator to get to) and I was just to lazy to wait for it (it would have
taken about a half hour and I would have had to write a pretty complex
stimulus file for it) - but if I had, I would have found the problem pretty
quickly because of the "Register Read before Written" Message.

myke

"There are only three kinds of economists in the world.  Those who can count
and those who can't." - Eddy George, governor of the Bank of England

1997\01\03@095200 by Bob Fehrenbach

picon face
Bob Blick <spam_OUTbblickTakeThisOuTspamTELIS.ORG> wrote:
>What does the message "Caution - file register read before written" that

It means that you are using the contents of a register that may contain
random data because it was never initialized.  Good programming practice
is to initialize the RAM area, generally to 0.


--
Bob Fehrenbach    Wauwatosa, WI     .....bfehrenbKILLspamspam@spam@execpc.com

1997\01\03@160516 by Martin McCormick

flavicon
face
In message <ijRzyYi8aM4f089ynspamKILLspamexecpc.com>, Bob Fehrenbach writes:
>It means that you are using the contents of a register that may contain
>random data because it was never initialized.  Good programming practice
>is to initialize the RAM area, generally to 0.

       Absolutely true.  This warning is a double caution.  You can get
in trouble by either not initializing it to some known value or by not
knowing that the old value may have some bearing upon what status flags
get set or cleared after one of these instructions is executed so it really
means to _know_ what you are doing unless one wants random weirdness.  I could
do without that most of the time.

Martin McCormick WB5AGZ  Stillwater, OK 36.7N97.4W
OSU Center for Computing and Information Services Data Communications Group

1997\01\04@010234 by Bob Blick

flavicon
face
>>What does the message "Caution - file register read before written" that
>
>It means that you are using the contents of a register that may contain
>random data because it was never initialized.  Good programming practice
>is to initialize the RAM area, generally to 0.

OK, seems reasonable. I get it when reading the ports, and of course since
they are being used as inputs, I'm not going to write to them, but MPSIM
doesn't seem to distinguish between a port and a file register.

-Bob

1997\01\06@195948 by Eduardo J. Martinez Velez

flavicon
face
part 0 1066 bytes

----------
De:             Bob Blick[SMTP:.....bblickKILLspamspam.....TELIS.ORG]
Enviado:        s‡bado 4 de enero de 1997 2:57
Para:           Multiple recipients of list PICLIST
Asunto:         Re: MPSIM message

>>What does the message "Caution - file register read before written" that
>
>It means that you are using the contents of a register that may contain
>random data because it was never initialized.  Good programming practice
>is to initialize the RAM area, generally to 0.

OK, seems reasonable. I get it when reading the ports, and of course since
they are being used as inputs, I'm not going to write to them, but MPSIM
doesn't seem to distinguish between a port and a file register.

-Bob


----------------------------
Thanks for all - Mil gracias
----------------------------
Eduardo Jorge Mart’nez VŽlez
a   Asesoria
&   &
 s   Sistematizacion
INET: EraseMEejmvspam_OUTspamTakeThisOuTsatlink.com
 73070.3653spamspam_OUTcompuserve.com
CServe: 73070,3653
2000-Rosario-SF-Argentina
TelFax: (54)(41)254561
Tel: (54)(41)8804
----------------------------

More... (looser matching)
- Last day of these posts
- In 1997 , 1998 only
- Today
- New search...