User guide
7.1. THE CINTSYS DEBUGGER 141
* 10sv1 11sv2 Put 10 and 11 in variables 1 and 2
* vt5 Display the first 5 variables
V 0: 0 10 11 0 0
*
* v1*50+v2= 511 A calculation using variables
* g0= 1000 Display global zero (globsize)
* g= 3615 Display the address of global zero
* ! = 1000 Indirect and display
* gt10 Display the first 10 globals
G 0: 1000 start stop sys clihook
G 5: GLOB 5 changec 6081 6081 52
*
Notice that values that appear to be entry points display the first 7 characters of
the function’s name. Other display styles can be specified by the commands $C, $D, $F,
$B, $O, $S, $U or $X. These respectively display value s as characters, decimal number,
in function style (the default), binary, octal, string, unsigned decimal and hexadecimal.
It is possible to display Cintcode instructions usi ng the commands I and N. For
example:
* g4= clihook Get the entry to clihook
* n 3340: K4G 1 Call global 1, incremeting P by 4
* n 3342: RTN Return from the function
*
A breakp oi nt can be set at the first instruction of clihook and debugged program
re-entered by the following:
* g4= clihook Get the entry to clihook
* b9 Set b r eak point 9
* c Resume execution
20>
The X command could have b e e n used since it is a shorhand for G4B9C. The function
clihook is de fine d in BLIB and is calle d whenever a command is invoked. For example:
10> echo ABC Invoke the echo command
!! BPT 9: clihook Break point hit
A= 0 B= 0 3340: K4G 1
*
Notice that the values of the Cintcode registers A and B are displayed, followed by the
program counter PC and the Cintcode instruction at that p oi nt. Single step execution
is possible, for example:
* \A= 0 B= 0 24228: LLP 4
* \A= 6097 B= 0 24230: SP3
* \A= 6097 B= 0 24231: SP 89
* \A= 6097 B= 0 24233: L 80
* \A= 80 B= 6097 24235: SP 90
* \A= 80 B= 6097 24237: LLL 24272
* \A= 6068 B= 80 24239: LG 78
* \A= rdargs B= 6068 24241: K 85
* \A= 6068 B= 6068 5480: LP4
*