Functions; Decimal; Octal - HP 9835A Programming Manual

35 series desktop computer assembly development rom
Table of Contents

Advertisement

184
Debugging
Functions
Four additional functions are provided as extensions to BASIC which can be useful in the
monitoring of values in an assembly language program. The four are -
IRDR
They can be used as other than monitoring tools, but their descriptions here are primarily in
that context. As functions, these items can be easily adapted for use in the special function
keys.
DECIMAL
This function has the form -
DEC
I
t-.-1RL (
{octal value} )
The function converts an octal integer value into its decimal representation.
If
the argument
given is not octal, then an error (number lB4) results.
This can be used as a quick, simple way of converting octal numbers into the more familiar
decimal value. Being a function, it can be used anywhere any other BASIC numeric function
can be used. Often you will find it useful in PRINT statements which are a part of subroutines
called by break points.
OCTAL
This function is the converse of the DECIMAL function. Its role is to convert decimal values into
their octal (base-B) representation. The function has the form -
iJCTRL (
{decimal value} )
This can be used as a quick, convenient method of converting decimal numbers into their
frequently used octal representations (a form which is useful because of its ready conversion
into binary representation, and vice-versa).
The values resulting from this function must be treated with care. Though the result of the
function is an octal representation, the value is still base-IO. This difference is unimportant
unless you are going to do arithmetic with the value resulting from the function.

Advertisement

Table of Contents
loading

Table of Contents