Specifications

To find out the linkage names in the target program, you can either dump the executable file
(run Bound-T with just the executable file name as argument) or ask Bound-T to list all the
subprogram and variable names by running Bound-T in the normal way but with the option
-trace symbols.
Scopes
Programs often contain many variables with the same name, in different lexical scopes, that is,
in different subprograms, blocks, or file scopes. In the assertion language, the symbolic name
of a subprogram or variable can be prefixed with a scope string to show which of the several
entities with this name is meant.
The H8/300 version of Bound-T uses the normal lexical scopes of symbolic identifiers, which
are source-file (or module) name, subprogram name, and block name. Details may depend on
the compiler and executable file format.
For example, if the C functions foo and bar both contain a variable num, you would write, in an
assertion, "foo|num" for the first, and "bar|num" for the second.
3.3 Naming items by address
Subprograms, labels, exception vectors
Subprograms and labels can be named (identified) by the hexadecimal address, in quotes,
without any prefixes like “0x” or the like. For example, if subprogram foo is located at 12AC
hex (that is, this is the entry address of foo) then foo can be identified by "12AC" or "12ac".
To identify a subprogram or label in an assertion, the identifying address should be preceded
by the "address" keyword. You can also identify a root subprogram on the command line by its
address, but do not use the "address" keyword in this case.
For example, this assertion bounds a loop in subprogram foo, assuming that foo starts at 12AC:
subprogram address "12AC"
loop repeats 91 times; end loop;
end "12AC";
To analyse the subprogram that starts at 12AC, in the target program file prog.coff, use this
Bound-T command; note the absence of an "address" keyword:
boundt_h8_300 -device=3297 prog.coff 12AC
Depending on the command shell that you use, it may or may not be allowed to put quotes
around the address on the command line.
Code-address offsets
Some forms of assertions define code addresses by giving a code offset relative to a base
address. For Bound-T/H8/300 a code offset is written as a hexadecimal number possibly
preceded by a sign, '' or '+', to indicate a negative or positive offset. If there is no sign the
offset is considered positive.
Assume, for example, that the subprogram Rerun has the entry address 14AC hexadecimal and
the subprogram Abandon has the entry address 15A0 hexadecimal. The subprogram with the
entry address 14D4 hexadecimal can then be identified in any of the following ways, among
many others:
Bound-T for H8/300 Writing Assertions 13