Truncated match.
PICList
Thread
'MPSIM message'
1997\01\02@145721
by
Bob Blick
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
|
>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
Bob Blick <spam_OUTbblickTakeThisOuT
TELIS.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 .....bfehrenbKILLspam
@spam@execpc.com
1997\01\03@160516
by
Martin McCormick
In message <ijRzyYi8aM4f089yn
KILLspamexecpc.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
>>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
|
part 0 1066 bytes
----------
De: Bob Blick[SMTP:.....bblickKILLspam
.....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_OUT
TakeThisOuTsatlink.com
73070.3653
spam_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...