02.03.2014 Views

Tornado

Tornado

Tornado

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Tornado</strong> 2.0<br />

User’s Guide<br />

This example shows the printf( )routine. The routine does a LINK, then pushes the<br />

value of std_out onto the stack and calls the routine fioFormatV( ). Notice that<br />

symbols defined in C (routine and variable names) are prefixed with an underbar<br />

( _ ) by the compiler.<br />

Perhaps the most frequently used system information command is d( ), which<br />

displays a block of memory starting at the address which is passed to it as a<br />

parameter. As with any other routine that requires an address, the starting address<br />

can be a number, the name of a variable or routine, or the result of an expression.<br />

Several examples of variations on d( ) appear below.<br />

Display starting at address 1000 decimal:<br />

-> d (1000)<br />

Display starting at 1000 hex:<br />

-> d 0x1000<br />

Display starting at the address contained in the variable dog:<br />

-> d dog<br />

The above is different from a display starting at the address of dog. For example,<br />

if dog is a variable at location 0x1234, and that memory location contains the value<br />

10000, d( )displays starting at 10000 in the previous example and at 0x1234 in the<br />

following:<br />

-> d &dog<br />

Display starting at an offset from the value of dog:<br />

-> d dog + 100<br />

Display starting at the result of a function call:<br />

-> d func (dog)<br />

Display the code of func( ) as a simple hex memory dump:<br />

-> d func<br />

162

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!