'DEBUG' command alternative in SX/B???
I just got my SX lite kit today and I started learning some SX/B, but I noticed that there is no 'DEBUG' command anymore. Is there any way to display data on the computer instead of a display (like SEROUT to the computer)? I would prefer not to have to buy an LCD now that I already bought everything.
Any help is appreciated.
-Dan
Any help is appreciated.
-Dan
Comments
You can use SEROUT, just remember that everything is sent byte-by-byte. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
We use the SX-Key to to real-time debuging and SX-Sim to measure the time a routine takes and how many cycles it consumes. Unfortunatly the sx-key only allows 1 "BREAK"·statement to be used at a time, so we get around it by calling a subroutine that contains the "BREAK" statement. You declare it like this:
BREAK_NOW········· Sub···· 0
When you call the Subroutine, just add the line BREAK_NOW, without a GOSUB.
(then the sub routine is)
BREAK_NOW:
BREAK
RETURN
Then use as many WATCH statements you need·to follow any of the variables like this:
(I add them before the subroutine declerations)
WATCH Var, #of Bits, UDEC· (unsigned decimal) look under help
Also, there is more code examples within the SX-Key directory, inside the Examples folder and then under SXB.
I wasted a lot of time trying to create some sort of BS2 like Debug. Just learn how to use the SX-Key Debug feature and SX-Sim and you will be able to do more than the BS2 Debug can.
Bill
Post Edited (Capt. Quirk) : 5/1/2007 2:10:56 AM GMT
For example, if you have a word variable and you want to see the state of the bits you would do this in SX/B:
If decimal mode is okay, you can simplify to:
Thanks again,
Dan
and
are now equivalent statements.
- Sparks