 Question:
I am using C54x simulator development tools. Could I ask the simulator to run until a
variable in data memory is equal to 2 ? Such as 'run TIMER == 2'
Answer: Yes you can. See page 7-17 in
C5xx C Source Debugger's User's Guide (1994 version). Basically the syntax for run command
is run [expression] Using the variable example you showed above, if you have a variable
named TIMER and you do the following: int TIMER = 10; TIMER -= 1; If you set a software
breakpoint on the instruction where TIMER is decremented and then issue the command: 'run
TIMER != 2' every time the simulator hits the breakpoint it will evaluate the expression
and continue as long as the expression is true. Note that I changed your expression to run
if TIMER is not equal to 2. When TIMER is finally equal to 2, then it will stop because
the expression no longer is true. |