Debug Watch with Bit indexing
I have been trying to understand why I cannot get the Watch directive to show bit indexes of variables.· The Watch register just shows "0".
Here is SX/B sample code to·load a var "i" with 127 (byte).· Then I want to look at each bit in Byte I using the Watch directive in the debugger....
device·sx28, osc4mhz, turbo, stackx, optionx
freq·4_000_000
i·var byte
program start
Start:
·i=127
·watch i,8,ubin
·watch i.0,1,ubin
·watch i.1,1,ubin
·watch i.2,1,ubin·
goto start
What I see in the debug Watch register is ...
i······· %0111_1111
i.0····· %1
i.1····· %0
i.2····· %0
As can be seen the i variable is loaded correctly with the value 127 (Dec).·
Why does i.0 work and the others i.1 and i.2 not work?
What am I doing wrong?
System:····· DELL XP Desktop
SXKey IDE:· v3.2.92h BETA
SX Key:······ Rev F
SX Chip:····· SX28AC/dp·· Date code: AB9932AB
Interface:·····Serial RS232
Any advice would be appreciated.
Regards,
Brian
Here is SX/B sample code to·load a var "i" with 127 (byte).· Then I want to look at each bit in Byte I using the Watch directive in the debugger....
device·sx28, osc4mhz, turbo, stackx, optionx
freq·4_000_000
i·var byte
program start
Start:
·i=127
·watch i,8,ubin
·watch i.0,1,ubin
·watch i.1,1,ubin
·watch i.2,1,ubin·
goto start
What I see in the debug Watch register is ...
i······· %0111_1111
i.0····· %1
i.1····· %0
i.2····· %0
As can be seen the i variable is loaded correctly with the value 127 (Dec).·
Why does i.0 work and the others i.1 and i.2 not work?
What am I doing wrong?
System:····· DELL XP Desktop
SXKey IDE:· v3.2.92h BETA
SX Key:······ Rev F
SX Chip:····· SX28AC/dp·· Date code: AB9932AB
Interface:·····Serial RS232
Any advice would be appreciated.
Regards,
Brian
Comments
This is a bug in the SX-Key IDE. It has been brought up several times.
It also affects SX/B bit variables. Unless they are in bit position 0, they don't change in the watch window.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"The welfare of the people in particular has always been the alibi of tyrants." ~ Camus
www.iElectronicDesigns.com
·
I did find out that if I assign a bit to another variable (i.e., a = i.3) and then "Watch" that new variable (i.e., a), I can make it work for the time being.··... but it wastes valuable RAM space.·· I can always look at the full byte as a partial solution too.
Thanks again....
Brian