Bdisp (Binary Display) - HP -28S Manual

Advanced scientific calculator
Hide thumbs Also See for HP-28S:
Table of Contents

Advertisement

Program
Comments
. :;::
Begin the program .
.
:~:
Begin the main subprogram .
DUP
Make a copy of n.
31
SF
Set flag 31 to enable LAST.
IFERR
Begin error trap.
R""B
Convert n to a binary integer.
THEN
If an error occured,
EtW
Do nothing (no commands in
THEN clause).
..,.
n
Create a local variable n .
«
Begin the defining program.
CLLCD
Clear the display.
«
BIN
»
Subprogram for BIN.
·K
OCT
»
Subprogram for OCT.
«
DEC
::::-
Subprogram for DEC.
%:
HEX
»
Subprogram for HEX.
4
First and last counter values.
FOR
.j
Start loop with counter j.
EVAL
Evaluate one of the base subpro-
grams (initially the one for HEX).
n
""STR
Make a string showing n in the
current base.
PAD
Pad the string to 23 characters.
.j
DISP
Display the string in the jth line .
t~E>n
Increment j and repeat the loop.
::::"
End the defining program.
»
End the main subprogram.
PRESER'.}E
Store the current status, execute
the main subprogram, and re-
store the status.
:::-
. .
End the program.
[ENTER [
Put the program on the stack.
~
BDISP [
STO
I
Store the program as BDISP.
28: Programming Examples
261

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents