The calculator command.
Calculates the value of an expression and displays the result
in the specified base.
Examples |
 |
%cmdebug > = 12 + #10 + $a, d #30 |
What is octal 12 (current input base) plus decimal 10 plus
hex a, in decimal?
Negative values that follow immediately after an operator
(+, -, *, /) must be placed within parentheses.
%cmdebug > = 'ABCD' 'ABCD' %cmdebug > = 'ABCD',h $41424344 |
In the second example, the string is coerced into a hexadecimal
value.
%cmdebug > = [dst 12.100] + [db+4], $ $4820 |
The sum of the contents of data segment 12.100 plus the contents
of DB+4, displayed in hexadecimal.
%cmdebug > = fopen SYS %22.4774 |
What is the start address of the CM procedure FOPEN? The address is returned as logical code address.
%cmdebug > = ?fopen SYS %22.5000 |
What is the entry point address of the CM procedure FOPEN?The question mark is used (CM) to indicate entry
point, rather than start address.
The indirect contents of register 12.
$nmdebug > = vtor (c.c0000000) $0020800 $nmdebug > = rtov (20800) $c.c0000000 |
Translate a virtual address to a real address and then back
again.
The value 1, left-shifted by two bits.
$nmdebug > = $1234 band $ff $34 |
The value $1234, Bit-ANDed with the mask $ff.
$nmdebug > = sendio SYS $a.$219ef0 |
What is the start address of NM procedure sendio?
$nmdebug > = ?sendio SYS $a.$217884 |
What is the address of the export stub for NM procedure sendio? Note the different use of "?" in CM and NM. In CM "?" is used for entry address, while in NM "?" is used for export stub.
$nmdebug > = strup("super") + 'duper' "SUPERduper" |
The calculator accepts string expressions as well as numeric
expressions.