Texas Instruments 990 Operation Manual page 104

Prototyping system
Hide thumbs Also See for 990:
Table of Contents

Advertisement

Jd7.s\ _ _ _ _ _ _ _
~
945255-9701
Calling arguments:
1ST BYTE
2ND BYTE
o
D
I
<error code>
2
-
. <value>
-
4
The value parameter is four hexadecimal ASCII characters. The result is returned in the caller's
workspace register O.
Result: The four-character hexadecimal value in the supervisor call block is converted to binary
in the caller's workspace register O.
Error code: The error code is set to one if any character is an invalid hexadecimal digit.
3.6 DEBUGGING TECHNIQUES
Debugging techniques may be divided into three basic categories:
1.
Prel'entil'e techniques - those which may be used to decrease the number of errors.
Most of these techniques emphasize simplicity. Code should be simple and straight-
forward enough to make it obvious that the program works.
2.
Exposure techniques - those which may be used to make the operation of a program
easier to follow during the debugging process.
3.
Remedial techniques - those used when a bug occurs in the user's program. Typically,
most programmers' efforts are expended on these techniques.
Programming effort devoted to avoiding errors or making them apparent is important. Debugging
and maintenance represent the majority of the cost in software development and support. The
following paragraphs briefly discuss debugging in general and the specifics of debugging under
PX9MTP.
3.6.1 GENERAL DEBUGGING TECHNIQUES. Several debug techniques will be helpful to the
programmer in any debugging situation. These paragraphs offer some suggestions about debugging
a program under development.
3.6.1.1 Debug Code in the Source Program. Include debug code in the source program. The user
should keep the testing process in mind from the moment he starts to create a program. When
referencing or changing data, the programmer should consider how to tell if the change is correct
when reconstructing the results of a run. This often involves being aware of what intermediate
results of a computation are lost.
For example, if the value of a variable 0 is calculated by the statement
D=A+B
and the program later encounters the statement
D=C+D
3-66
Digital Systems Division

Advertisement

Table of Contents
loading

Table of Contents