please dont rip this site


The SX-Key allows File Register Variables to be "WATCH"ed when debugging.

WATCH Variable{.Bit}, Count, Format

The WATCH directive allows the definition of format for viewing and modifying variables at runtime during debug mode. The variable's name, number of bits or bytes to view, and display format may be specified.

WATCH timer, 1, UDEC
WATCH flags.0, 1, UBIN

The table below lists the available format settings for the WATCH directive.

Format Operation
UDEC Displays value in unsigned decimal format
SDEC Displays value in signed decimal format
UHEX Displays value in unsigned hexadecimal format
SHEX Displays value in signed hexadecimal format
UBIN Displays value in unsigned binary format
SBIN Displays value in signed binary format
FSTR Displays value in fixed-length string format
ZSTR Displays value in zero-terminated string format

Consult the SX-Key Development System Manual for additional information about the WATCH directive.

Error when watching one register in more than one format

The WATCH directive allows you to view variable in different bases and lengths, but each WATCH becomes a new symbol and the way SASM builds its symbol table doesn't lend itself to allowing multiple definitions of the same symbol. The problem is that SASM use a binary tree for storing the symbol table. While you can store more than one item with the same name, the problem is when you go looking for it. In order to find an item, you have to start at the root node and then search node to node (using the next node pointers) until you find the item. If you find it, you terminate the search. The result is that you get an error if WATCH is used more than once to view the same variable.

If you have more than one item with the same name, it means you always have to search throught the entire tree in case you have more than one item with the same name but a different type. While it would be possible (anything is possible in software) to modify SASM to allow multiple symbol definitions for WATCH directives, itt's not an easy task due to the way SASM was originally architected.

An easy workaround is to define a new symbole for each way that you want to view a variable.

flagbyte DS 1
flagbytehex = flagbyte
flagbytedec = flagbyte

watch flagbyte,8,ubin
watch flagbytehex,8,uhex
watch flagbytedec,8,udec

file: /Techref/parallax/sxkey/watch.htm, 3KB, , updated: 2008/1/15 21:55, local time: 2024/7/14 21:28,

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!


After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.

Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

  PICList 2024 contributors:
o List host: MIT, Site host, Top posters @none found
- Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.

Welcome to!