From AGI Wiki
Revision as of 07:30, 24 April 2019 by Andrew Korson (Talk | contribs) (Created page with "The '''''' command sets up the trace mode. == Syntax == LOGNUM, byt TOP, byt HEIGHT); == Remarks == The '''trace....")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The command sets up the trace mode.

Syntax LOGNUM, byt TOP, byt HEIGHT);


The command is usually run before activating trace mode, and sets the position of the trace window using the TOP value, with the window height set by the HEIGHT value. TOP and HEIGHT are in units of text rows (0 - 24). It also identifies logic LOGNUM as the source for trace commands as messages.

If is not called before using the trace mode, the default location of the trace window is text row 1, and the default height is 15 rows.

Keep in mind that due to a bug in AGI, using any value for TOP except 1 will result in the trace window being drawn incorrectly; it does not affect the performance of the tracer function, it just looks bad.

To have the tracer display commands with text (instead of the command number), logic LOGNUM should contain the trace commands as messages. The number of the message corresponds to the action command with the same byte-code (i.e. message 1 should be "increment", message 2 should be "decrement", etc.) Test commands start at 221 (i.e. message 221 should be "equaln", message 222 should be "equalv", etc.)

For a detailed discussion of how the trace mode works, see the AGI Command Tracer topic.

Possible Errors

If logic LOGNUM does not exist, AGI will raise a runtime error and crash.

Using values of TOP and HEIGHT that are greater than 24 will result in a garbled display.


set(enableTrace); [ enable trace mode
  {, 1, 10);  [ assume TracerLogic is a valid logic ID

Technical Information

Required Interpreter Version: Available in all AGI versions.
Byte-Code Value: 150 (0x96 hex)

See Also

Debugging Commands
AGI Debugging Information