EasyManua.ls Logo

WP WP-34S User Manual

WP WP-34S
103 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #93 background imageLoading...
Page #93 background image

Edition 2.2
Page 93 of 103
shorthand addressing. If you want to associate a program with the key , just put the
label 21 in front of the routine and it can be conveniently called with  by the
user.
Direct Keyboard Access
The same codes are returned by the KEY? command which allows true "real time" re-
sponse to user input from the keyboard. KEY? takes a register argument (X is allowed
but does not lift the stack) and stores the key most recently pressed during program
execution in the specified register. R/S and EXIT cannot be queried, they stop program
execution immediately. The keyboard is active during execution but it is of course desir-
able to show a message and suspend the program with the PSE command while waiting
for user input. PSE is interrupted by a key press, so you can simply use a PSE 99
statement in a loop to wait for input. KEY? acts as a conditional at the same time so a
typical user input loop will look like this:
LBL 'USR'
CLα
α 'KEY'
α ?
LBL 00
αVIEW
PSE 99
KEY? 00
GTO 00
LBL?->00
XEQ->00
GTO 00
This code fragment prompts for a key and stores it in register 00. The line directly after
KEY? is executed when no key was pressed. The statement KEY? is only executed
every 9.9 seconds if the user does not press a key. If he does, the PSE is immediately
terminated, KEY? is executed, finds the key code and stores it in register 00. The
LBL00 instruction checks if a label corresponding to the key code has been defined
and executes it if found. Instead of the dumb waiting loop, the program can do some
computations and update the display before the next call to PSE and KEY? think of a
lunar lander game.
To be even more versatile, the instruction KTY? nn is designed to return the key type
of a row / column code in register nn: 0 to 9 for the respective digits, 10 for the other
numeric keys (. , +/- and EEX), 11 for any of the three shift keys and 12 for the rest. An
invalid code in the target register throws an "Invalid Range Error".
If you decide not to handle the key in the program you may feed it back to the main
processing loop of the calculator with the PUTK nn command. What happens is that
the program halts and the key is treated as if pressed after the stop. This is especially
useful if you want to allow numeric input while waiting for some special keys like the ar-
rows. This allows writing of a vector or matrix editor in user code. After execution of the
PUTK command the user is responsible for letting the program continue its work by
pressing or a hot key.
Question and Answer IconNeed help?

Do you have a question about the WP WP-34S and is the answer not in the manual?

WP WP-34S Specifications

General IconGeneral
TypeScientific
DisplayLCD
Display Lines2
Display TypeDot matrix
Memory RAM8 KB
Memory Flash128 KB
ProgrammingYes
Dimensions148 x 80 x 15 mm
Power SourceBattery

Summary

WELCOME

PRINT CONVENTIONS

GETTING STARTED

WHAT'S ON THE KEYBOARD AND HOW TO ACCESS IT?

REAL AND INTEGER OPERATIONS

STATISTICAL DISTRIBUTIONS, PROBABILITIES ETC.

MATRICES

COMPLEX OPERATIONS

MEMORY

STACK MECHANICS

COMPARING AND ADDRESSING REAL NUMBERS

COMPARING AND ADDRESSING COMPLEX NUMBERS

ADDRESSING LABELS

DISPLAY AND MODES

FONTS

INDEX OF OPERATIONS

A - C

Lists operations from A to C, with keys and remarks.

D - F

Lists operations from D to F, with keys and remarks.

G - I

Lists operations from G to I, with keys and remarks.

J - L

Lists operations from J to L, with keys and remarks.

M - O

Lists operations from M to O, with keys and remarks.

P - R

Lists operations from P to R, with keys and remarks.

S - U

Lists operations from S to U, with keys and remarks.

V - Z

Lists operations from V to Z, with keys and remarks.

α - π

Lists operations related to alpha and pi, with keys and remarks.

Σ - the End

Lists operations related to sigma and end of index.

Alphanumeric input

Details character input methods for alpha mode.

Non-programmable Control, Clearing and Information Commands

Lists essential control, clearing, and info commands.

INTERACTIVE PROGRAMMING

Interrupting a Program for Display of Information

Explains how to display information during program execution.

Temporary Displays

Describes displays that temporarily replace the normal X register view.

Data Input

Details methods for obtaining user input within programs.

Hotkeys

Explains using dedicated keys (A-D) for subroutines.

Keyboard Codes

Direct Keyboard Access

Explains accessing keyboard input directly within programs.

APPENDIX A: SUPPORT FOR FLASHING, SERIAL I/O ETC.

How to Flash Your HP 20b or 30b

Step-by-step guide to flashing HP calculators.

Data Transfer Between Your WP 34S and Your PC (SAM-BA)

Details transferring data using SAM-BA.

Data Transfer Between Your WP 34S and Your PC (Serial I/O)

Details transferring data via serial I/O.

More Keyboard Commands Employing ON

APPENDIX B: MORE ROUTINES AND COMMANDS

Library Routines

Explains how to install and use library routines.

Internal Commands (Use at Your Own Risk)

Lists internal commands not typically exposed to users.

APPENDIX C: RELEASE NOTES