0% found this document useful (0 votes)
14 views

HP41 Ext Functions

Uploaded by

Charlie
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

HP41 Ext Functions

Uploaded by

Charlie
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 56

HEWLETT-PACKARD

HP 82180A

Extended Functions/ Memory


Module
OWNER’S MANUAL

)
A caciano

HP 82180A
Extended Functions/Memory Module

Owner’s Manual

November 1981

82180-90001

Printedin U.S.A. ©Hewlett-Packard Company 1981


Contents

Introduction ....... ... e e i e 5


Extended FUNCHIONS .. ... o i i i i i it ettt it ettt et in i nenens 5
Programmable FUNCLIONS ... ... i i i i i i ettt it i e ienaneananans 5
Registerand FIag FUNCLIONS . ... .ottt i i i ittt it e eenaenn 5
ALPHA Register FUNCLIONS ... .. ittt i ittt ettt ietieneaneaneeanenns 5
Extended Memory FUNCLIONS . ... . ittt ittt it ittt e eeeeeeennannsanens 5
Extended MemoOry ...ttt e ettt ettt it i et e et e e 5

Section 1: Getting Started ........... ... i i i i e e 7


Identification and Installation ........... ittt it it e e 7
[0oY 0} 1o [0 L=4T Lo T 8
Using This Manual .................. e e e e e e e 8

Section 2: Extended Functions .......... ... ... ... . . . i i, 11


Data Storage Register Operations . ........citiiitintntnnenenernenerneeesnennnns 11
Flag Operations ... .oiit ittt ittt ittt iee e neatennaeensnsensanenenens 11
User Mode Operations .. ...ouiiitin ittt ittt eteneaesneneensnoensnsenennns 13
ALPHA String Operations ... ...iuiiittn it in ettt eaet e eaeieeaneananennns 13
Shifting Characters Between the ALPHA and X-Registers ........................ 14
Length of a Stringof Characters ...ttt ittt it inennnns 15
Searching ALPHA Strings .. ..ottt ittt ittt ettt e e e eenaeneaennns 15
Rotating the ALPHA Register to ContinueaSearch ........ ... ... ... .. 16
Miscellaneous Operations ..........oiitititnenen et neeeaeeeneenenananannnnn 16
Determining What Key has been Pressed .......... ... ittt iiiinnnnnnnnns 16
SIZE-Related FUNCLIONS .. .o i i i ittt ittt e nteensenennnnanas 17
Clearing Programs ... .. ittt it et ettt et it e e 17

Section 3: Extended MemoOry .........cooniiiiiiiiiin ittt 19


Understanding Extended Memory ...ttt ittt ieteineenenenn 19
File Names and File Pointers . ... ...ttt ittt iieienennenens 20
Data FileS .ottt i it i et e e e e e e e e 21
T O | I 1= PP 21
Program Files ... i i i e it et e e e e e e 23
WoOrKING Files ..o i i it et et ettt et naeesenannenanennnas 23
File Management . ... ittt ittt it ettt ettt eneenneaneannennns 23
Program File Operations .........itiiiintntn ittt e it teieeenananaeannnns 25
Operations Common to Dataand ASCII Files ........... it iininnenn.. 26
Data File Operations ... ..ttt ittt ittt ettt ittt ettt e eanenneennens 27
ASCI File Operations .. ..i ittt ittt ittt et ettt ettt eenaeenenneennens 29
Operations Involving Entire Records ...ttt ittt iiiiinaennnn 29
Operations Involving Characters Within Records ........... ... ..., 30
Searching @an ASCIH File ... ...t i i i et ittt et e e et i nanans 31
Transferring ASCII Filesto Main Memory ...ttt ininnininnnnenennns 32
Transferring Data between Extended Memory and Mass Storage Devices ........... 33

Section 4: Programming and the Extended Functions/Memory Module ... 35

2
Contents 3

Appendix A: Care, Warranty, and Service ............ccoviiiiiniiiiiinno... 37


Module Care ... ... i e i e e e e 37
Limited One-Year Warranty . ...ttt ittt ettt ettt 37
S IVL.ttt e 38
Programming and Applications AsSiStanCe .............c.uiiiiiiininenenenennnnnn. 39
Dealer and Product Information ............ . it 40

Appendix B: Error Messages .........oiiiiiiiiiitiii i, 43


Appendix C: Null Characters ..........ooiiiiiiiin ittt 47
Null Characters andthe ALPHA Register ..........iiiiiiiiiiiin i iiienennnnennnn 47
Treatment of Null Characters .........oiiiiiinin ittt ittt ittt et et ie i 47

Function IndeX ... ..o e e e 49


i,
Introduction

The HP 82180A Extended Functions/Memory Module adds a number of useful functions to those already
available on your HP-41 calculator and also provides you with extended memory. Extended memory can
be augmented by adding one or two HP 82181 A Extended Memory Modules, the use of which is also
described in this manual.

Extended Functions
The functions provided by the module can be grouped in the four categories described under the following
headings:

Programmable Functions
Some standard calculator functions, such as and that are not programmable, have
programmable equivalents in the module. Additional programmable functions that have no equivalent in
the basic calculator have been provided to make it easier to write efficient programs.

Register and Flag Functions


Some of these let you manipulate blocks of registers easily. Others extend the utility of the calculator
flags.

ALPHA Register Functions


These let you extract numeric data from the ALPHA register, search the ALPHA register for specific
strings, and convert characters to numeric equivalents and vice versa.

Extended Memory Functions


These enable you to store and retrieve programs and data in the extended memory registers provided by
the module and by extended memory modules. They also let you create and edit text composed of
alphanumeric characters.

Extended Memory
By itself, the extended functions/memory module contains 127 extended memory registers.* In most
respects, these are like the calculator registers with which you are already familiar. The important
difference is that data stored in these registers is not immediately available to the calculator. Before such
data can be used it must first be moved into calculator main memory. This is discussed in sections 1 and 3
of this manual.
One or two HP 82181 A Extended Memory Modules may be used in conjunction with the HP 82180A
Extended Functions/Memory Module. Each will add 238 registers. Thus it is possible to add 603 registers
of extended memory to your HP-41C or HP-41CV.

* The memory registers provided by the HP 82180A Extended Functions/Memory Module and the HP 82181 A Extended Memory
Module are distinct from, and should not be confused with, registers R;(, through R3,4, in main memory—which are called extended
storage registers in the calculator owner’s handbook.
Section 1

Getting Started

The HP 82180A Extended Functions/Memory Module and the HP 82181 A Extended Memory Module can
be used with either the HP-41C or the HP-41CV calculator. The instructions in this manual apply to both
calculators.

CAUTION
Always turn your calculator OFF before inserting or removing any modules. If you don’t, the calculator
may be damaged or the system’s operation may be disrupted.

Identification and Installation


The HP 82180A Extended Functions/Memory Module can be identified by the legend X FUNCTIONS
permanently marked on the module. The HP 82181 A Extended Memory Module is marked X MEMORY.

To insert an extended functions/memory module or an


extended memory module, orient it so that the legend is right
side up, hold the calculator with the keyboard facing up, and
insert the module into a port. You’ll feel it snap into place
when it’s properly seated.

To remove a module, use your fingernail to gently extend the


extractor handle. Then grasp the handle and pull out.
8 Section 1: Getting Started

Configurations
The extended functions/memory module can be installed in any calculator port. If you have only a single
extended memory module in addition to the extended functions/memory module, it can be installed in
any other port.

If you later add a second extended memory module (or if you install two extended memory modules at the
same time), the extended memory modules must be arranged in one of the following configurations. Don’t
install them one above the other.

X MEMORY X MEMORY
X MEMORY X MEMORY

X MEMORY X MEMORY
X MEMORY X MEMORY

Port Configurations When Two


HP 82181A Extended Memory Modules Are Used

If you remove one or more of the modules, some or all of the data in extended memory may be lost. To
minimize this data loss there is an optimum sequence for removing modules. However, the sequence is
conditional on the order in which the original configuration was accomplished, as follows:
o If extended memory modules were installed at different times, remove the modules in the order
opposite to that in which they were installed.
e If extended memory modules were installed at the same time, remove the module in port 2 or 4 first,
then, if necessary, the module in port 1 or 3.

The reasons for these removal procedures are explained in section 3.

Using This Manual


When the extended functions/memory module is inserted in your calculator, its functions become
available for your use. These functions are grouped and discussed in two general categories: extended
functions (section 2) and extended memory (section 3). The extended functions section deals with
programmable functions, functions to manipulate registers and flags, and functions for manipulating
data in the ALPHA register. The extended memory section deals with transferring data and programs
between the calculator’s main memory and extended memory, and with editing commands that are used
with ASCIIfiles that can be created in extended memory.
For simplicity, functions provided by the extended functions/memory module are represented by single,
colored keys—such as [ANUM|. When you want to execute a function, you can do it in two ways: by using
[XEQ][ALPHA]name [ALPHA], or by assigning the function to a key using (or ), and pressing that
key in User mode.
Section 1: Getting Started 9

In this manual, the description of each function is preceded by a summary of information required by that
function. This provides a quick, visual summary of how to execute the function. For example:

X [ keycode ] ALPHA | function name |

This indicates that a keycode must be placed in the X-register and a function name placed in the ALPHA
register before you execute from the keyboard or in a program.
If at any time an error message is displayed by the calculator, refer to appendix B for an explanation of its
cause.
Section 2

Extended Functions

Data Storage Register Operations

X sss.dddnnn i

Executing (register move) copies a block of nnn registers, beginning at register sss (source), to
a block of the same length, beginning at register ddd (destination). Any data that was already in the
destination block is lost.

X | sss.dddnnn o

Executing [REGSWAP| (register swap) exchanges the contents of a block of nnn registers beginning at
register sss with the contents of a block of the same length beginning at register ddd.
If nnn is zero for either REGMOVE |or [REGSWAP |, one register will be copied or exchanged.

Flag Operations
It is often helpful to be able to restore the calculator flags to a preexisting configuration—for instance, to
restore the display format after executing a program. The following two functions enable you to recall the
condition of flags 0 through 43 and later to use this data to restore some or all of these flags to their
previous condition.

RCLFLAG

Executing (recall flags) recalls the status of flags 0 through 43 to the X-register as ALPHA
data. You can then store the contents of the X-register for later use.

Note: When |RCLFLAG |is executed, the display will not be intelligible.

STOFLAG X | flag status e


STOFLAG X | bb.ee | Y | flag status &

If the flag status from a previously executed function is placed in the X-register, executing
(restore flags) restores calculator flags 0 through 43.

11
12 Section 2: Extended Functions

If you want to restore only some of the flags, place the flag status in the Y-register and a number in the
form bb.ee (representing the beginning and ending flags of the block to be restored) in the X-register, and
execute STOFLAG .

Example. Suppose you want to write a program that gives answers in 0 format, without a decimal
point, but when program execution is finished you want the display format restored to whatever it was
before you ran the program. The program lines below show how you could do this.

01 LBLTABC
02 RCLFLAG These two steps recall the status of flags 0 to 43 to the X-register and save that status in
03 STO 20 register 20. This block of flags includes flag 29, the digit grouping flag, and flags 36
through 41, the number of digits and display format flags.
04 FIX O These two steps set the display format for your program.
05 CF 29
06
07
08 Your program.

20 RCL 20 These steps recall the original flag status to the X-register and restore the flags and
21 STOFLAG display status.
22 END

X | flag O through 7 status |

(X exchange flags) uses the number in the X-register to set flags 0 through 7. At the same time, it
transfers the previous status of those flags to the X-register.

In the X-register, the flag status takes the form of a number from 0 through 255. Each flag corresponds to
a number (actually a power of 2). The number in the X-register is the sum of the numbers of the flags that
are set. The flags and their equivalents are:

Flag 0 1 2 3 4 5 6 7

Numeric
Equivalent 1 2 4 8 16 32 64 128

Example. Suppose flags 0, 3, 5, and 7 are set, while flags 1, 2, 4, and 6 are clear. If <> F|is executed,
what numberis placed in the X-register? To find out, add up the numeric equivalents of the set flags:

Flag Numeric
Equivalent
0 1
3 8
5 32
7 128
169 isthe number in the X-register.
Section 2: Extended Functions 13

If you enter 0 in the X-register and execute >F]|, flags 0 through 7 are cleared, and their previous
status is placed in the X-register.

You can use to create extended general purpose flags by storing numbers representing the status
of flags 0 through 7 in storage registers. For example, to check the status of an extended flag, recall the
flag status code to the X-register using [RCL], execute , then execute as usual.

enables you to use large numbers of flags in programs. Flags are grouped by eights and
transferred into and out of the first eight flag positions by means of . The number representing the
status of a particular group of eight flags is placed in a storage register until it is needed. When it is
needed, it is recalled to the X-register and exchanged with the flags presently in the first eight positions.
The status of specific flags in that group can then be examined or altered.

User Mode Operations

X |keycode | ALPHA | function or program name |

Like [ASN], (programmable assign) enables you to assign functions or programs to a key location.
However, can be executed from within a program. requires you to enter the keycode for the
key to which you wish to assign the function or program. This is the same keycode that the calculator
itself displays when you use to assign a function or program to a key. Keycodes are described more
fully in the HP-41C/41CV QOwner’s Handbook and Programming Guide. Remember that keycodes for
shifted keys are negative numbers.

As is the case with [ASN], you cannot use to assign programs to any of the top four keys (keycodes
01 through 04) or to the shift key (keycode 31).

cancels an assignment for the designated key if it is executed with the ALPHA register cleared.

Executing CLKEYS |(clear keys) clears all key assignments.

ALPHA String Operations

The extended functions/memory module enables you to shift data between the ALPHA and X-registers.
In the ALPHA register, the data exists as alphabetic or numeric characters, while in the X-register, an
alphabetic or numeric character is represented by a numeric character code.

Alphanumeric characters are represented within the calculator by character codes based on ASCII
(American Standard Code for Information Interchange). In addition to the numerals and letters of the
alphabet that correspond directly to ASCII, there are some nonstandard symbols represented by unique
HP-41 codes. The following table lists symbols that can be displayed in ALPHA mode together with their
character codes.
14 Section 2: Extended Functions

Displayable Characters and Their Equivalent Codes

Char. Code Char. Code Char. Code

- 0 3 51 N 78
% 1 4 52 O 79
~ 4 5 53 P 80
N 5 6 54 Q 81
5 6 7 55 R 82
m 12 8 56 S 83
d 13 9 57 T 84
# 29 : 58 U 85
space 32 ; 59 Vv 86
| 33 < 60 W 87
" 34 = 61 X 88
# 35 > 62 Y 89
$ 36 ? 63 z 90
% 37 @ 64 [ 91
& 38 A 65 \ 92
39 B 66 ] 93
( 40 C 67 ’ 94
) 41 D 68 _ 95
¥ 42 E 69 T 96
+ 43 F 70 a 97
44 G 71 b 98
- 45 H 72 c 99
. 46 I 73 d 100
/ 47 J 74 e 101
0 48 K 75 ) 126
1 49 L 76 k- 127
2 50 M 77

Shifting Characters Between the ALPHA and X-Registers

Executing (ALPHA to X) shifts the leftmost character out of the ALPHA register and placesits
character code in the X-register. If the ALPHA register is empty, the number zero is placed in the
X-register.

X character code l
X [ ALPHA string |

Executing (Xto ALPHA) with a character code from the above table in the X-register appends the
character represented by the character code to the right hand end of the string in the ALPHA register.
may be executed with any number from 0 to 255 in the X-register, but numbers that are not listed
above as a character code are not valid codes, so the character appended in the ALPHA register will not
be intelligible. (All segments of the display at that character position will be turned on.) If you execute
with the number zero in the X-register, subsequent operations on the ALPHA register may not
Section 2: Extended Functions 15

work properly until the registeris cleared. (Refer to Appendix C for information on alpha operations with
the null (code 0) character.) Executing with an alpha data string in the X-register appends the
entire string to the ALPHA register.

Length of a String of Characters

The (ALPHA length) function returns the number of characters in the ALPHA register to the
X-register.

Searching ALPHA Strings

The (ALPHA number) function scans the ALPHA register for an ALPHA formatted number. If a
number is found, its value is recalled to the X-register and user flag 22 is set. If no number is found, the
X-register and flag 22 are unchanged.

The digits in the ALPHA register can represent values in any display format. Number separators and
radix marks are interpreted according to the status of calculator flags 28 and 29. For example, if the
ALPHA register contains the string PRICE: $1,234.5, executing returns the following results,
depending on the status of flags 28 and 29:

Flag Flag Number


28 29 Returned
set set 1,234.5000
set clear 1.0000
clear set 1,2345
clear clear 1,2340

If the digits in the ALPHA register are preceded by a minus sign, a negative number will be placed in the
X-register when is executed.

X character code =
X [TALPHA string |

The (position in ALPHA) function scans the ALPHA register for the ALPHA character or string
specified in the X-register. There are two ways to specify the character or string. You can enter the
character code for a single character, or you can enter an actual character or string of characters by using
[ASTO]. If the specified character or string is found in the ALLPHA register, the character position of the
character (or the character position of the leftmost character in the string) is returned to the X-register.
(Refer to Appendix C for information on alpha operations with null characters.)

Character positions are counted from left to right, starting from position 0. If the specified string occurs
more than once in the ALPHA register, only the position of the first occurrence is returned. If the target
string is not found in the ALPHA register, the number -1 is returned.
16 Section 2: Extended Functions

Rotating the ALPHA Register to Continue a Search

X | number of characters|

Executing (ALPHA rotate) rotates the contents of the ALPHA register by the number of
characters given in the X-register. The ALPHA register is rotated to the left if the number in the X-register
is positive, or to the right if the number is negative. (Refer to Appendix C for the effects of on null
characters.)

can be used with and to extract a sequence of numbers from the ALPHA register.

Example. As the result of an operation by some peripheral device, the ALPHA register contains the
sequence 68.2 69.88 (two numbers, separated by a space). You want to extract each of these numbers in
turn and use them in a program.

The following sequence illustrates the process:

Keystrokes Display

[XEQ)[ALPHA] ANUM XEQ ANUM _


68.2000 Places the first number in the X-register.
20 68.2000 Stores the valuefor later use.
32 32_ 32 is the character code for a space.
[XEQ)[ALPHA] XTOA XEQ XTOA_
32.0000 Appends a space after 69.88 in the ALPHA
register.
POSA XEQ POSA_
4.0000 Scans the ALPHA register for the first occurrence
of a space (character code 32 was in the X-
register).
[XEQJ[ALPHA] AROT XEQ AROT_
4.0000 Rotates the ALPHA register to the left by 4
characters. Now it reads: 69.88 68.2.
Note that if you had not used above, the
string would read: 69.8868.2.
[XEQJ[ALPHA] ANUM XEQ ANUM _
69.8800 Places 69.88 in the X-register.

Miscellaneous Operations

Determining What Key has been Pressed

When a program executes (get key), execution halts until a key is pressed or an interval of
approximately 10 seconds elapses. If a key is pressed, its keycode is placed in the X-register. If no key is
pressed, the number 0 is placed in the X-register at the end of the time interval.
Section 2: Extended Functions 17

responds to the first key pressed, so there can be no shifted responses to| GETKEY|. If you press the
gold shift key during a wait, its keycode (31) is placed in the X-register.

enables you to branch to a subroutine on the basis of an entry from the keyboard, even when the
key pressed is not a digit key.

SIZE-Related Functions

PSIZE X | number of data storage registers

works like the function provided in the calculator except that it can be executed from within a
program. It makes it possible for a running program to reallocate the registers in main memory as
required.

Executing places the number of registers currently allocated to data storage into the X-register.

SIZE? can be used within a program to inhibit the execution of PSIZE when a memory reallocation is not
required.

The following program lines illustrate how and might be used in a program.

01
02 Your program.

07 SIZE? The number of data storage registers presently allocated is placed in the X-register.
08 nn Key in the number of registers this program needs. The result of the previous step is now in
the Y-register.

09 X>Y? Is the number of storage registers required by the program greater than the number
presently allocated?
10 PSIZE Reallocate memory only if the answer to the above question is yes.

Clearing Programs

ALPHA | program name

Executing (programmable clear programs) clears one or more of the programs in main memory.
All programs beginning with the one named in the ALPHA register (or the current program if the
ALPHA register is clear) and continuing to the end of program memory are cleared. If a running program
names itself (or clears the ALPHA register) and executes PCLPS |, that program and all following it will be
cleared and program execution will terminate.
Section 3

Extended Memory

Understanding Extended Memory

To use the extended functions/memory and extended memory modules effectively, you must understand
the distinction between your calculator’s main memory and the extended memory provided by these
modules.

Your calculator by itself has a certain amount of main memory. If you have an HP-41C, you can add
memory modules to increase the size of main memory up to that of the HP-41CV. Regardless of its size,
main memory contains programs and data that are always instantly available to the calculator. You
have only to press and enter a program name or and enter a register number in order to execute
a program or recall data.

Extended memory is somewhat different. In order for the calculator to use the programs and data in
extended memory, they must first be transferred to main memory; they are not directly accessible.
Extended memory gives you more storage space for programs and data, but the tradeoff you make for that
extra capacity is the necessity of taking extra steps to transfer those programs and data between main
and extended memory.

NOT
CALCULATOR PERMITTED

O
MAIN EXTENDED
MEMORY MEMORY

The registers in extended memory* are organized in structures called “files.” A program you create in
calculator main memory can be transferred to extended memory as one type of file.
There are three kinds of files that can be stored in, and recalled from, extended memory:

e DataFiles

e ASCII Files

e Program Files

* Refer to footnote, page 5.

19
20 Section 3: Extended Memory

Files consist of two registers (called the header) that contain information about the file, and one or more
registers that contain data. Following the last file there is also one register used as a partition between
used and unused extended memory.

Files are stored in extended memory in the order in which File 1 Extended
they are created. Sometimes a file may be partly in one Functions/Memory
module and partly in another. In the illustration on the right, Module
file 5 starts in extended memory module A, but some :
registers are in extended memory module B. This is why it is File 2
important to use the proper sequence in removing extended
memory modules. If you have to remove a module, you want
to lose as few files as possible. In the situation illustrated, if
you remove extended memory module B, you lose only files 5 File 2 Extended Memory
and 6. However, if you remove extended memory module A, Module “‘A"’
the only file you will leave in extended memory will be file 1!
File 3

The guidelines in section 1 for removing extended memory


modules are based on the following: when all the extended
memory registers in the extended functions/memory module File 4
are filled and more data is to be stored, the extended
functions/memory module senses whether one or two
extended memory modules are installed. If only one is File 5
installed, the additional data is stored in its registers,
regardless of its port location. If another extended memory
module is installed later, it will be used when the first module
overflows.
File 5 Extended Memory
However, if there are two extended memory modules Module B
installed when the extended functions/memory module File 6
needs more registers, the data will first be stored in the
extended memory module in calculator port 1 or 3. The
extended memory module in port 2 or 4 will only be used Partition Register
when the first module is full.

Unused
Registers

File Names and File Pointers

As previously mentioned, the first two registers in a file are called the header. They store certain
information about the file that the calculator makes use of. The first register contains the file name. This
can be any combination of alphabetic and numeric characters, including spaces, up to seven characters
long. If you try to give a file a longer name, excess characters are truncated. If you create a file with a
name of fewer than seven letters, the calculator adds spaces to bring the character count up to seven.

The second register in the header contains information on the length and type of the file and one or two
“pointers” that are used to gain access to specific items in thefile.
Section 3: Extended Memory 21

Data Files
Data files enable you to retain important data while using all ) HEADER
. . . . Registers
the registers in main memory. Most of the functions that are HEADER
used with data files make use of the file’s “register pointer,” 000 [1.900 01
an integer thatis used to refer to a specific register within the 001 |2.700 O1
file. In the example data file on the right, the pointer is 002 |4.600 O1
regist Reaqi
R 003
egister __ (0a |6.300 O1
(1090 02
itioned to to the the fifth
positioned fifth register.
ointer 005 [1.720 02
006 |2.810 02
007 [4.530 02
008 |7.340 02
009 [1.187 03

A Data File

Many of the function descriptions in this section include examples. To duplicate their results, you can
create and save a data file like the one on this page by pressing the keys shown below. The and
functions used will be explained later in this section (pages 24 and 28).

Keystrokes Display
[ALPHA]SAMPL - D SAMPL-D _
[ALPHA]20 20_
[XEQ][ALPHA]CRFLD XEQ CRFLD _
20.0000
B (ASN](ALPHA] ASN _
SAVEX ASN SAVEX 11 Assigns to the key.
20.0000 X-register displayed.
20.0000 Switch to user mode.
19 19.0000
27 27.0000
46 46.0000
63 63.0000
109 109.0000
172 172.0000
281 281.0000
453 453.0000
734 734.0000
1187 [=+] 1,187.0000
B (ASN](ALPHA] ASN _
1,187.0000 Clears assignment from the key.

The above data is now stored in the first 10 registers of SAMPL-D; the remaining registers are set to zero.

ASCII Files
ASCII files enable you to create texts of alphanumeric characters and search and edit your texts. To avoid
the limitations that would be imposed by dealing with these files in terms of registers, ASCII files are
organized into ‘“records” and ‘“characters,” as shown in the following illustration. Each record in an
ASCII file may contain from 1 to 254 characters. As the illustration shows, an ASCII file has two
pointers—a record pointer and character pointer.
22 Section 3: Extended Memory

Records
HEADER
HEADER
000 H/A|R|V|E|Y| |K E|C|K|
001 5/5|5|—[1]2[3]4
002 [C/A|R|L| |L/A F|O|N|G|
Record 003 (1|56 |—[2/3[3]2
Pointer 004 B|R|U|C/E| WA Y|N E|
005 2|0|/5|— 44|23
006 W[I|L|L|I|AM| |[B/A|T|S O|N
007 6|0/ 2|—|9/9/9]1

O N T OMNOOOOO—ANM
CharactersOOOOOOOOOOv—‘—i—F
OO0 0000000000 OoOOo

A
Character
Pointer

In the illustration, the record pointer is set to the fifth record and the character pointer is set to the third
character. Taken together, the combination points to the U in BRUCE WAYNE. You can duplicate the
ASCII file in the illustration by pressing the keys shown below. The function used will be
explained later in this section (page 24).

Keystrokes Display

[ALPHA])SMPL-AS SMPL-AS_
[ALPHA] 20 20_
CRFLAS XEQ CRFLAS_
20.0000
W (ASN][ALPHA] ASN
APPREC ASN APPREC 11
20.0000
[ALPHA]HARVEY KECK HARVEY KECK_
20.0000
[ALPHA]555-1234 555-1234
20.0000
[ALPHA] CARL LAFONG CARL LAFONG _
20.0000
156-2332 156-2332_
20.0000
BRUCE WAYNE BRUCE WAYNE_
20.0000
[ALPHA]205-4423 205-4423
20.0000
[ALPHA]WILLIAM BATSON WILLIAM BATSON _
20.0000
[ALPHA]602-9991 602-9991
20.0000
B(ASN)(ALPHA] ASN _
20.0000
Section 3: Extended Memory 23

Program Files
A program file is a program that is stored in extended memory. You can give yourself more room in main
memory if you keep most of your programs in extended memory until you need one of them.

The following keystroke sequence creates a program that reads and displays the contents of ASCII file
SMPL-AS, then transfers the program to extended memory as a program file.

Keystrokes Display

(PRGM]E(GTO](-][] 00 REG nn
B (LBL)[ALPHA]
SAMPL - P [ALPHA] 01 LBL'SAMPL - P
[ALPHA]SMPL - AS 02"SMPL - AS
0 030_
[(XEQ][ALPHA]SEEKPTA 04 SEEKPTA
B(tsL]01 05 LBL 01
[XEQ][ALPHA]GETREC 06 GETREC
(ALPHA] [} [AVIEW][ALPHA] 07 AVIEW
B(G10]o1 08 GTO 01
20.0000
[ALPHA]SAMPL - P 20.0000
(XEQ][ALPHA]SAVEP XEQ SAVEP_
20.0000

Working Files
Some extended memory functions require you to enter a file name in the ALPHA register before execution.
After one of these functions has been executed, the calculator is set to the named file.* That is, the named
file has become your working file in the same way that executing with a program name makes the
named main memory program your ‘“working” program. Certain functions described on the following
pages operate only on working files.

File Management

Executing (extended memory directory) displays a list of the files in extended memory. The list
can also be printed out. For each file, the file name appears on the left and the file type (indicated by D, A,
or P) and the number of registers occupied appears on the right.T After all the files have been listed, the
number of extended memory registers still available for storing files is returned to the X-register.

Example. If you created the files described earlier in this section, executing EMDIR will produce the
following listing:

*ExceptPURFL| (purge file), which purges the named file from memory.

tPacking Memory and/or changes in current memory configuration may cause a slight change in the number of registers used by a
program file.
24 Section 3: Extended Memory

File Name File Type

/ /—Number of Registers

SAMPL-D D020
SMPL-AS A020
SAMPL-P P0O0O5
549.0000 Number of registers available (assuming two extended memory modules installed).

If there are no files in extended memory, the message DIR EMPTY is displayed and the number of
registers available for storing files is returned to the X-register.

While the directory listing is being displayed (or printed), you can halt the listing by pressing any key
except or [ON]; listing continues when you release the key. You can terminate the listing by pressing
or [ON]. If you terminate the listing while a file name is displayed, thatfile becomes the working file
if it is a data or ASCIIfile.

X | number of registers | ALPHA | data file name J


CRFLAS X | number of registers | ALPHA | AsSclII file name |

The (create file-data) and (create file-ASCII) functions create, respectively, data files and
ASCII files. When you execute [CRFLD|, you will need to specify the same number of registers in the
X-register as you have data items to store. It isn’t necessary to add two registers for the header; the
calculator takes care of that automatically.

When you create an ASCII file, if you know exactly how many characters and records there will be, you
can calculate the number of registers that are required using the following steps:

1. Add the number of characters to the number of records.

2. Add1 to the result.

3. Divide the result by 7 and round up to a whole number.

This is the number of registers that will be required.

Usually, you won’t know exactly how many records or characters will be in an ASCIIfile. If you can make
an estimate of the number of characters, a good rule of thumb is to add 20 percent to your estimate and
divide the result by 7 to obtain an approximation of the number of registersneeded.

When you create a file using or [CRFLAS], that file becomes your working file.

ALPHA file name

Executing (purge file) removes the named file from extended memory.

ALPHA | file name |

Executing (clear file) retains the named file, but clears all the data in it. (The named file may not be
a program file.) In data files, enters zeroes in all registers; in ASCII files, it sets the number of
Section 3: Extended Memory 25

records to zero. The named file becomes the working file.

ALPHA file name |

Executing (file size) returns the number of registers in the named file to the X-register. The named
file becomes the working file. (If the ALPHA register is empty when is executed, the size of the
working file will be returned.)

Program File Operations

ALPHA | program name, file name |


ALPHA program name 3
ALPHA , file name 5

Executing (save program) copies the named program from main memory into extended memory
under the specified file name. If only the program name is entered in the ALPHA register, the program is
saved under that name. If only a comma and a file name are given, the current program in main memory
is saved under the file name.
If a program file already exists with the specified file name, executing purges the old file and
creates a new program file with the specified file name.

ALPHA | program file name |

Executing (get program) replaces the last program in main memory with the program stored in the
named file.* If is executed from the keyboard, the calculator is set to the first line of the new
program. If[ GETP]is executed from a running program, the results depend on whether or not the running
program is the last program in main memory. If the running program is not the last program, it continues
to run. If it is the last program, it is replaced by the program in the named file and execution continues
from the first statement in that program.

ALPHA | program file name

Executing (get subroutine) copies the program stored in the named file to main memory
following the last existing program. The calculator is not set to the transferred program.

Any key assignments recorded with the program named will become active if or [GETSUB] is
executed in User mode.

* If you press [} (-][] before executing [GETP], the calculator creates a blank program space at the end of program memory. If you
then execute GETP], the copied program will replace the last, blank program—Ileaving the stored programs intact.
26 Section 3: Extended Memory

Example. Clear SAMPL - P from main memory and then recall it from extended memory.

Keystrokes Display

[XEQ][ALPHA]CLP [ALPHA] CLP _ Clears SAMPL P.


[ALPHA]SAMPL - P CLP SAMPL-P_
ALPHA 549.0000 (Display shown assumes results remain from
preceding example.)

Keystrokes Display

SAMPL - P SAMPL-P_ Specifies program file SAMPL - P.


549.0000
[(XEQ][ALPHA]GETSUB 549.0000 Copies SAMPL - P at end of program memory.
B(GTO][ALPHA]SAMPL - P GTO SAMPL-P_ Positions calculator to SAMPL - P.
572.0000
01LBL'SAMPL-P Firstline of retrieved program.
549.0000

Operations Common to Data and ASCII Files

X | rer | ALPHA | data file name B


X | rrr.ccc I ALPHA ASCII file name o

Executing (seek pointer by ALPHA) makes the named file the working file and repositions the
pointer or pointers on the basis of the value in the X-register. In a data file, the integer part of the number
in the X-register indicates the register that the pointer is positioned to. In an ASCII file, the integer
portion of the number in the X-register positions the record pointer; the first three digits in the fractional
portion position the character pointer.

Example. Make the ASCII file SMPL - AS the working file and reposition the record and character
pointers.

Keystrokes Display

SMPL - AS SMPL-AS _ Specifies the file name.


6.013 6.013 Specifies the record (006) and the character (013)
[XEQJ[ALPHA]SEEKPTA SEEKPTA
6.0130 Makes SMPL - AS the working file and positions
the pointers to the “N” in “WILLIAM BATSON”.

X [rrr 2
X [ rrr.ccc l

Executing (seek pointers) has the same effect on the working file that executing has on
the named file. Executing with the ALPHA register empty is the same as executing i
Section 3: Extended Memory 27

ALPHA | file name -

Executing (recall pointer by ALPHA) makes the named file the working file and returns the
value or values of its pointer or pointers to the X-register. The value of the register pointer in a data file is
returned as an integer. The values of the record and character pointers in an ASCII file are returned in the
form rrr.ccc, where rrris the value of the record pointer and ccc is the value of the character pointer.

Executing (recall pointers) returns the value or values of the pointer or pointers in the working file
to the X-register. Executing with the ALPHA register empty is the same as executing [RCLPT].
Example. Recall the pointers from the ASCIIfile of the preceding example.

Keystrokes Display

0 0 Clears display.
[XEQ][ALPHAJRCLPT XEQ RCLPT_
6.0130 Recalls the pointer values set in the preceding
example from the working file.

If you name a program file and execute [RCLPTA ]|, the number of bytes in the program is placed in the
X-register.

Data File Operations

ALPHA data file name |

Executing (save registers) copies all of the data storage registers in main memory to the named
data file (or to the working file, if the ALPHA register is empty). The first register in main memory is
copied to register 000 in the data file, the second is copied to register 001, and so forth. At the end of the
process, the register pointer in the data file indicates either the next available register or the end of the
file.

X | bbb.eee |

Executing (save registers by X) copies a block of main memory registers to the working datafile.
The block of main memory registers to be saved is designated by a value in the X-register in the form
bbb.eee, where bbb is the register number of the first register and eee is the number of the last register.
The registers are copied into the data file starting at the current pointer position. moves the
pointer to the register following the last register copied or to the end of the file. will not be
executed if there is not enough room in the working file for the block of registers to be copied.
28 Section 3: Extended Memory

Executing (save X-register) copies the contents of the X-register into the working file at the
register indicated by the pointer. After the data is copied, the pointer is moved to the next register.

The procedure on page 21 for creating file SAMPL - D and transferring data to it shows how is
used.

ALPHA I data file name ]

Executing (get registers) recalls the contents of the named file to main memory. The contents of
register 000 in the named file are placed in main storage register 000, the contents of register 001 in the
corresponding register in main memory, and so forth. Execution of stops at either the last data
register in main memory or at the end of the data file in extended memory. Executing with the
ALPHA register empty copies the working file to main memoryif the file is a datafile.

X bbb.ecee |

Executing (get registers by X) copies data from the working file to a block of registers in main
memory starting at register bbb and ending at register eee. Registers are copied from the working file
starting at the current pointer position. Execution stops when all specified registers have been filled or the
end of the working file is reached.

Executing (get to X-register) copies the contents of the register indicated by the pointer in the
working file to the X-register and moves the pointer to the next register.

Example: Recall the contents of a register in file SAMPL - D.

Keystrokes Display

8 8 Pointer will be set to register 008.


[ALPHA]SAMPL - D SAMPL-D_ File name.
8.0000
[XEQ][ALPHA]SEEKPTA XEQ SEEKPTA_ Makes SAMPL - D the working file and positions
the pointer to register 008.
8.0000
[(XEQ][ALPHA]GETX XEQ GETX_
734.0000 The contents of the register.
Section 3: Extended Memory 29

ASCII File Operations

Operations Involving Entire Records

ALPHA | text [

Executing (append record) appends the contents of the ALPHA register to the working file as a
new record. This is illustrated by the procedure for transferring data to SMPL - AS on page 22.

Executing (delete record) deletes the record indicated by the record pointer in the working file.
sets the character pointer to zero, but it does not change the record pointer.

Example: Delete an entry from SMPL - AS.

Keystrokes Display
2 2_ Pointer will be set to character 000 of record 002.
[ALPHA]SMPL - AS SMPL - AS _ File name.
2.0000
SEEKPTA XEQ SEEKPTA_ Makes SMPL - AS the working file and positions
the pointers.
2.0000
[XEQJ[ALPHA] DELREC XEQ DELREC
2.0000 “CARL LAFONG?” is deleted. The record that was
004 is now 003.
(XEQ][ALPHA]DELREC XEQ DELREC
2.0000 “156-2332” is deleted. Records move up.

ALPHA text |

Executing (insert record) inserts a record in front of the record indicated by the record pointer.
Example: Insert an entry ahead of “BRUCE WAYNE” in SMPL - AS. (It is assumed that the preceding
example has made SMPL - AS the working file and positioned the pointers to record 003 and character
000.)

Keystrokes Display
[ALPHA)BILL BAILEY BILL BAILEY_ Name.
2.0000
[XEQ][ALPHA]INSREC XEQINSREC Name is inserted in record 002; data in other
records moves down.
2.0000
1 1
30 Section 3: Extended Memory

Keystrokes Display
3.0000
(XEQ][ALPHA]SEEKPT XEQ SEEKPT_ Moves the pointer down one record.
3.0000
702-1133 702-1133_ Phone number.
3.0000
[XEQ][ALPHA]INSREC XEQINSREC_ Phone numberis inserted in record 003; data in
other records moves down.
3.0000
[XEQ][ALPHA]SAMPL - P XEQ SAMPL - P_ Runs the program to list the file.
HARVEY KECK
555-1234
BILL BAILEY
702-1133
BRUCE WAYNE
205-4423
WILLIAM BATSON
602-9991
END OF FL

Operations Involving Characters Within Records

ALPHA | text |

Executing (append characters) appends the contents of the ALPHA register at the end of the
record indicated by the record pointer in the working file.

Example: Modify a record in SMPL - AS by appending “JR.” to “HARVEY KECK”. Assume SMPL - AS
is still the working file.

Keystrokes Display
0 0_ Specifies record 000.
[XEQ][ALPHA]SEEKPT XEQ SEEKPT_ Move pointers.
0.0000
JR. JR. Text to be appended.
0.0000
[XEQ)[ALPHA)APPCHR XEQ APPCHR _
0.0000
0 0_ Character 000 of record 000.
[XEQ)[ALPHA]SEEKPT XEQ SEEKPT_
0.0000 Move pointers.
[(XEQ][ALPHA]GETREC XEQ GETREC_ Recalls record 000.
0.0000
HARVEY KECK JR.
0.0000

X |number of characters |

Executing (delete characters) deletes the number of characters specified in the X-register,
starting from the current pointer position in the working file.
Section 3: Extended Memory 31

Example. Modify a record in SMPL - AS by changing “HARVEY KECK JR.” to “H KECK JR.”

Keystrokes Display

(-]001 .001 Character 001 of record 000.


SEEKPT XEQ SEEKPT_ Moves pointers.
0.0010
5 5_
Five characters.
DELCHR XEQ DELCHR
5.0000
0_ Character 000 of record 000.
o

[(XEQ][ALPHA]SEEKPT XEQ SEEKPT


0.0000 Move pointers.
GETREC XEQ GETREC_ Recalls the current record.
0.0000
H KECK JR.
0.0000

INSCHR ALPHA | text |

Executing inserts the contents of the ALPHA register ahead of the current character in the
working file.
Example. Modify a record in SMPL-AS by placing a period after “H” in “H KECK JR.”

Keystrokes Display
(-]001 .001_ Character position 001 of record 000.
[XEQ][ALPHA]SEEKPT XEQ SEEKPT_
0.0010 Move pointers.
(ALPHA]E() Period.
0.0010
[XEQ][ALPHA]INSCHR XEQINSCHR _
0.0010
0 0_ Character 000 of record 000.
SEEKPT XEQ SEEKPT
0.0000 Move pointers.
(XEQ][ALPHA]GETREC XEQ GETREC_ Recalls the current record.
0.0000
H. KECK JR.
0.0000

Searching an ASCII File

POSFL ALPHA | text |

The (position in file) function scans the working file, starting from the current pointer position, for
a string of text that matches the contents of the ALPHA register. If a match is found, the pointers are
32 Section 3: Extended Memory

repositioned to the first character of the matching text and the pointer value is returned to the X-register.
If no match is found, the pointer is not moved and the number —1 is placed in the X-register.

Example. Search SMPL - AS for the text string “BATSON".

Keystrokes Display
0 0 Character 000 of record 000.
SEEKPT XEQ SEEKPT_ Moves pointers to start of file.
0.0000
BATSON BATSON _ Target text.
0.0000
[XEQJ[ALPHA] POSFL XEQ POSFL_
6.0080 The target string starts at character 008 of record
006.

Transferring ASCII Files to Main Memory

Executing (get record) clears the ALPHA register and recalls up to 24 characters from the
working file into the ALPHA register. Characters are copied starting from the current pointer position.

After the transfer, the pointer is moved to the next character in the record. If there are fewer than 24
characters between the pointer and the end of the record, transfer stops at the end of the record. When
is executed, flag 17 is set if the end of the record is not reached. If the end of the record is reached,
flag 17 is cleared. This is useful if you have a printer connected to the calculator via HP-IL (the Hewlett-
Packard Interface Loop). If you follow each with the HP-IL command [OUTA], the contents of the
ALPHA register are output to the printer without a terminating carriage return and linefeed if flag 17 is
set. This lets you print the contents of a record on a single line.

Executing (alpha recall record) appends a record or part of a record to the ALPHA register until
the ALPHA register is full. When is executed, flag 17 is set if the end of the record is not reached.
If the end of the record is reached, flag 17 is cleared.

Example. Append a record from SMPL - AS to data already in the ALPHA register by placing a name
and phone number on one line.

Keystrokes Display

0 0_ Character 000 of record 000.


SEEKPT XEQ SEEKPT_ Moves the pointers.
0.0000
GETREC XEQ GETREC_ Clears ALPHA, places the contents of the current
record in the ALPHA register, and advances the
record pointer.
0.0000
Section 3: Extended Memory 33

Keystrokes Display
[ALPHA] [} (APPEND](SPACE] H. KECKJR. _
0.0000
ARCLREC XEQ ARCLREC_ Appends the contents of the current record to
ALPHA.
0.0000
H. KECK JR.
555-1234
0.0000

Transferring Data Between Extended Memory


and Mass Storage Devices
You can transfer ASCII files that have been created in extended memory to mass storage devices, such as
a tape cassette in the HP 82161 A Digital Cassette Drive, using the HP 82160A HP-IL Module. The cassette
offers a permanent storage medium from which files can be recalled when necessary.

ALPHA [extended memory file name, mass storage file name |


ALPHA |extended memory file name |

Executing (save ASCII) copies the named ASCII file in extended memory to the specified
destination file in mass storage. If you omit the comma and the destination file name and simply enter
the source file name in the ALPHA register, the file in extended memory will be copied to a file with the
same name in mass storage, if one exists. does not create a file in mass storage; that must be
done using the function in the HP-IL module.

ALPHA Imass storage file name, extended memory file name l


ALPHA [mass storage file name I

Executing (get ASCII) copies the named ASCII file in mass storage to the specified destination
file in extended memory. If you omit the comma and the destination file name and simply enter the source
file name in the ALPHA register, the file in mass storage will be copied to a file with the same name in
extended memory, if one exists. Before you can execute [GETAS], you must first have created the file in
extended memory using CRFLAS |.

Execution of either or stops when the end of either the source or destination file is
reached. If the destination file is too small, an error will be generated, but some data will be copied.
Section 4

Programming and the


Extended Functions/Memory Module

All functions provided by the HP 82180A Extended Functions/Memory Module can be entered whenever
the module is plugged into the calculator. While the extended functions/memory module is connected,
program lines with extended functions are displayed and printed as standard functions.
If the module is disconnected later, these program lines are displayed and printed as XROM functions—
with two identification numbers. The first number, 25, indicates that the functions are provided in the
extended functions/memory module. The second number identifies the particular function. The XROM
numbers for the functions in the extended functions/memory module are listed below.

Function XROM Number Function XROM Number Function XROM Number


XROM 25,01 XROM 25,17 XROM 25,33
XROM 25,02 XROM 25,18 XROM 25,34
XROM 25,03 XROM 25,19 XROM 25,35
XROM 25,04 XROM 25,20 XROM 25,36
XROM 25,05 XROM 25,21 XROM 25,37
XROM 25,06 XROM 25,22 XROM 25,38
XROM 25,07 XROM 25,23 XROM 25,39
XROM 25,08 XROM 25,24 XROM 25,40
XROM 25,09 XROM 25,25 XROM 25,41
XROM 25,10 XROM 25,26 XROM 25,42
XROM 25,11 XROM 25,27 XROM 25,43
XROM 25,12 POSA XROM 25,28 XROM 25,44
XROM 25,13 XROM 25,29 XROM 25,45
XROM 25,14 XROM 25,30 XROM 25,46
XROM 25,15 XROM 25,31 XROM 25,47
XROM 25,16 XROM 25,32

If program lines using extended functions are entered when the module is not connected, the function is
recorded and displayed as XEQ followed by the function name. Program execution will be slowed by lines
in this form because the calculator will first search for a program or program line with the specified label.

35
Appendix A

Care, Warranty, and Service Information

Module Care

CAUTION

Always turn off the calculator before connecting or disconnecting any module or peripheral. Failure to
do so could result in damage to the calculator or disruption of the system’s operation.

¢ Keep the contact area of the module free of obstructions. Should the contacts become dirty, carefully
brush or blow the dirt out of the contact area. Do not use any liquid to clean the contacts.
¢ Store the module in a clean, dry place.
¢ Always turn off the calculator before installing or removing any module or peripherals.

® Observe the following temperature specifications:


Operating: 0°to 45° C (32° to 113° F).
Storage: 40° to 75° C (—40° to 167° F).

Limited One-Year Warranty


What We Will Do
The HP 82180A Extended Functions/Memory Module is warranted by Hewlett-Packard against defects
in materials and workmanship affecting electronic and mechanical performance, but not software
content, for one year from the date of original purchase. If you sell your unit or give it as a gift, the
warranty is automatically transferred to the new owner and remains in effect for the original one-year
period. During the warranty period, we will repair or, at our option, replace at no charge a product that
proves to be defective, provided you return the product, shipping prepaid, to a Hewlett-Packard service
center.

What Is Not Covered

No other express warranty is given. The repair or replacement of a product is your exclusive remedy.
ANY OTHER IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS IS LIMITED
TO THE ONE-YEAR DURATION OF THIS WRITTEN WARRANTY. Some states, provinces, or
countries do not allow limitations on how long an implied warranty lasts, so the above limitation may not
apply to you. IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR
CONSEQUENTIAL DAMAGES. Some states, provinces, or countries do not allow the exclusion or
limitation of incidental or consequential damages, so the above limitation or exclusion may not apply to
you.

This warranty gives you specific legal rights, and you may also have other rights which vary from state
to state, province to province, or country to country.

37
38 Appendix A: Care, Warranty, and Service Information

Warranty for Consumer Transactions in the United Kingdom


This warranty shall not apply to consumer transactions and shall not affect the statutory rights of a
consumer. In relation to such transactions, the rights and obligations of Seller and Buyer shall be
determined by statute.

Obligation to Make Changes


Products are sold on the basis of specifications applicable at the time of manufacture. Hewlett-Packard
shall have no obligation to modify or update products once sold.

Warranty Information
If you have any questions concerning this warranty or service, please contact an authorized Hewlett-
Packard dealer or a Hewlett-Packard sales and service office. Should you be unable to contact them,
please contact:
¢ In the United States:
Hewlett-Packard
Corvallis Division
1000 N.E. Circle Blvd.
Corvallis, OR 97330
Telephone: (503) 758-1010
Toll-Free Number: (800) 547-3400 (except in Oregon, Hawaii, and Alaska)

¢ In Europe:
Hewlett-Packard S.A.
7, rue du Bois-du-lan
P. O. Box
CH-1217 Meyrin 2
Geneva
Switzerland
Telephone: (022) 8381 11
Note: Do not send units to this address for repair.

¢ In other countries:
Hewlett-Packard Intercontinental
3495 Deer Creek Rd.
Palo Alto, California 94304
U.S.A.
Telephone: (415)857-1501
Note: Do not send units to this address for repair.

Service
Obtaining Repair Service in the United States
The Hewlett-Packard United States Service Center for handheld and portable calculator products is
located in Corvallis, Oregon:

Hewlett-Packard Company
Corvallis Division Service Department
P. 0. Box 999/1000 N.E. Circle Blvd.
Corvallis, Oregon 97330, U.S.A.
Telephone: (503) 757-2000
Appendix A: Care, Warranty, and Service Information 39

Obtaining Repair Service in Europe


Service centers are maintained at the following locations. For countries not listed, contact the dealer
where you purchased your unit.

AUSTRIA GERMANY SPAIN


HEWLETT-PACKARD GmbH HEWLETT-PACKARD GmbH HEWLETT-PACKARD ESPANOLA S A.
Kleinrechner-Service Kleinrechner-Service Calle Jerez 3
Wagramerstr.-Lieblgasse Vertriebszentrale E-MADRID 16
A-1220 VIENNA Berner Strasse 117 Telepone: (1)458 2600
Telephone: (222) 35.16.20 Postfach 560 140
D-6000 FRANKFURT 56
BELGIUM Telephone: (611)50041
HEWLETT-PACKARD BELGIUM SA/NV SWEDEN
Boulevard de la Woluwe 100 HEWLETT-PACKARD SVERIGE AB
Woluwelaan ITALY Enighetsvagen 3
B-1200 BRUSSELS HEWLETT-PACKARD ITALIANA S.P.A. Box 205 02
Telephone: (2) 762 32 00 Casella postale 3645 (Milano) S 161 BROMMA 20 (Stockholm)
Via G. Di Vittorio, 9 Telephone: (8) 730 05 50
1-20063 CERNUSCO SUL NAVIGLIO (Milan)
DENMARK b o) 36
HEWLETT-PACKARD A/S Telephone: (2)90 36 91
Datavej 52
DK-3460 BIRKEROD (Copenhagen) WITZERLAND
Telephone: (02) 81 66 40 NETHERLANDS fiEWLETT—PACKARD(SCHWEIZ) AG
HEWLETT-PACKARD
Van H G
NEDERLAND B.V. . .
Kleinrechner-Service
EASTERN EUROPE an Heuven Goedhartlaan 121 Allmend 2
Refer to the address listed under Austria. N-1181 KK AMSTELVEEN (Amsterdam)
CH-8967 WIDEN
P.O0.Box 667
Telephone: (057) 50111
FINLAND Telephone: (020) 472021
HEWLETT-PACKARD OY
Revontulentie 7
02100 ESPOO 10 (Helsinki) NORWAY UNITED KINGDOM
Telephone: (90) 45502 11 HEWLETT-PACKARD NORGE A/S HEWLETT-PACKARD Ltd.
P.O.Box 34 King Street Lane
FRANCE Desterndalen 18 GB-WINNERSH, WOKINGHAM
HEWLETT-PACKARD FRANCE N-1345 OESTERAAS (Oslo) BERKSHIRE RG11 5AR
Division Informatique Personnelle Telephone: (2)17 11 80 Telephone: (734) 784774
S.A.V. Calculateurs de Poche
F-91947 Les Ulis Cedex
Telephone: (1) 907 78 25

International Service Information


Not all Hewlett-Packard service centers offer service for all models of HP calculator products. However, if
you bought your product from an authorized Hewlett-Packard dealer, you can be sure that service is
available in the country where you boughtit.

If you happen to be outside of the country where you bought your module, you can contact the local
Hewlett-Packard service center to see if service is available for it. If service is unavailable, please ship the
module to the address listed above under Obtaining Repair Service in the United States. A list of service
centers for other countries can be obtained by writing to that address.

All shipping, reimportation arrangements, and customs costs are your responsibility.

Should you need technical assistance concerning programming, applications, etc., call Hewlett-Packard
Customer Support at (503) 757-2000. This is not a toll-free number, and we regret that we cannot accept
collect calls. As an alternative, you may write to:

Hewlett-Packard
Corvallis Division Customer Support
1000 N.E. Circle Blvd.
Corvallis, OR 97330
40 Appendix A: Care, Warranty, and Service Information

A number of our users submit program applications or unique program key sequences to Hewlett-
Packard. However, we can consider using only ideas given freely to us. Since it is the policy of Hewlett-
Packard not to accept suggestions given in confidence, the following statement must be included with
your submittal:

“I am voluntarily submitting this information to Hewlett-Packard Company. The information is not


confidential and Hewlett-Packard may do whatever it wishes with the information without obligation to
me or anyone else.”

Dealer and Product Information


For dealer locations, product information, and prices, please call (800) 547-3400. In Oregon, Alaska, or
Hawaii, call (503) 758-1010.
41

Notes
Appendix B

Error Messages

This is a list of messages and errors relating to the functions provided by the extended functions/memory

module. When any of these errors are generated, the function attempted is not performed, except as noted.

Display Functions Meaning


CHKSUM ERR GETP Part of the program file has been lost.
(O


|m

C
5
|+

DATA ERROR Number in the X-register is greater than 255.


ol >
ol |m|
o]
>3
nl

XTOA
x
A
Vv
-

PSIZE Number in the X-register is greater than 999.


|[»l|n
|m||m
|m||m
R &
|ull|o
|9

Number in the X-register is 0. (Attempt has been made to create a file 0


o
[ollo]
|| |[=|
Im||m|
||
|1O||>

registers in length.)
The data in the X-register (or the Y-register, if the X-register contains a
wnl
—|
Ol

c>3
T
—|

range of flags in the form bb.ee) is not data that was obtained by
executing RCLFLAG .

DUPFL A file of the same name already exists in extended memory. Thefile of
n
ol o
|3 |2
|m||m
=l (e
(O] >

the same name becomes the working file. ASCII, data and program
files cannot share a common name. Hint: Use suffixes to distinguish
ol
>|
<l
ml
|

related files (SAMPL - D; SAMPL - P).

END OF FL An attempt has been made to position the pointer, to read, write, or
>
)
o
o
T
o

APPREC delete past the end of the file. For and the named
ARCLREC file becomes the working file, but the file and pointers are not
changed.
ol o
[m| |m
|||
|=| [0
|m||x
o0 |=
ol
m|
—H|
|
m|

GETRX
GETX
NSCHR
|
N
o
-
8
=

SAVER
wn
>
<
m
o
X

SAVEX
un||n
m| im
m||m
Al |=
| |
> =

GETAS File transfer was not completed because the end of the destination file
was encountered before the end of the source file. Part of the file is
wn
>
<
m
>
»

transferred.

43
44 Appendix B: Error Messages

Display Functions Meaning

END OF REC SEEKPT An attempt has been made to position the character pointer past the
SEEKPTA end of the current record.
FL NOT FOUND CLFL The filename in the ALPHA register does not exist in extended
FLSIZE memory or, if the ALPHA register is empty, then there is no working
file in extended memory.
m
EEEEE
=
@
ETP
o

GETR

c|m
[

@
|
|

RCLPTA
(»n
>
F 5R
<
0l
>
<|

SEEKPTA

There is no working file in extended memory. Hint: This would happen


Of |>
>
|
R
o

if there were no files in extended memory or if you just purged a file.


>
|
|

ARCLREC
O
|m
X E oR 0]R|
=
|m|
|9]
]
|
[m|
F]
@]
|m|
A
O
m|
Sl

INSCHR
NSREC
|=
0| |0
—||»n
LR
| (O

SAVERX
w
>
BB
<

SEEKPT

FL TYPE ERR Either the working file or the file specified in the ALPHA register is of
>
o
o
2o

APPREC the wrong type for the function attempted. For example, you can’t use
ARCLREC CLFL| on a program file; you’ll get this message.
@)

-

DELCHR
DELREC
@

5
m
=

GETP
GETR
GETREC
zZ 5] 0] 0] 6
414
m| |m| |m
e
@

NSCHR
o BB ] 29| (6
(| |0 |0 || D] 15|
|33
B n5 AL
||
L]
<|I<|I<]
323
34
0wl
LL

=
Appendix B: Error Messages 45

Display Functions Meaning


SEEKPTA
KEYCODE ERR PASN The number in the X-register does not correspond to an assignable key.
Hint: Did you try to assign a function to the shift key (31)?

NAME ERR CLFL ALPHA register is empty.

n
o
D
n
r
>
CRFLD

o
-

n
m
>
GETP
|vl|lnllollo
[>|C||m
|+
[m||[m||m|]|»n
]|C
W
|3

o[>l
n
<]
(>
1<

The named program does not exist in main memory.


|19
vl
129
<]
|8
[»nl

|m|

NO DRIVE No HP-IL module is plugged into the calculator, or no mass storage


lol
|14

> ||
m|
(>

device is on the interface loop.


ol

wn
>
<l
m|

NO ROOM CRFLAS There is not enough space left in extended memory for a file of the size
specified by the number in the X-register.
o
|
|7
|—
(O

There is not enough space in extended memory to store the program.


wnl
>
<|
m|
o|

GETP There is not enough space in main memory to hold the program.
o
-
wn
m

c
w

PSIZE (When executed as a program instruction.) There is not enough space


In main memory.

NONEXISTENT All Functions The extended functions/memory module is not plugged in or is


malfunctioning.
GETRX One or more registers specified by the number in the X-register does
REGMOVE not exist in main memory.
REGSWAP
(v
>
IL
|m
>>:3

One or more of the flags specified by the number in the X-register is out
ol

o
nl
=
-
T

of the range 0-43.


PACKING GETP (When executed from the keyboard.) There is not enough program
TRY AGAIN GETSUB space in main memory.
PSIZE (When executed from the keyboard.) There is not enough space in main
memory.
PASN There is not enough space in main memory.

REC TOO LONG APPCHR If the function were completed, the resulting record would be more
than 254 characters long.
|G
I
|z
[z
|

ROM The program named is in ROM.


| (0|
ol B
C<
ol |m|
O
wn
Appendix C

Null Characters

Null Characters and the ALPHA Register


The null character in your calculator is the - (overbar) and corresponds to character code 0.* Normally the
calculator does not display null characters. However, under certain conditions you can use the
Extended Functions/Memory module to place null characters in ALPHA data strings. (This allows you to
include nulls in data strings to be transferred to HP-IL devices.)

When you display the ALPHA register, any null characters to the right of the first non-null character will
be displayed.

Treatment of Null Characters


Because the calculator attaches special significance to null characters in the ALPHA register, there are
several functions that do not operate normally if a null exists in a data string used by ALPHA functions:
e Nulls in ALPHA displays appear as an - (overbar) character and are printed as a # (the character
corresponding to character codes 0 and 10) by the HP 82143A and HP 82162A Printers.

o Ifyouexecute (refer to the label on the back of the calculator) when the last character in the
ALPHA register is a null, the ALPHA display appears blank. However, the contents of the ALPHA
register are not affected. Thus, the characters that are entered after executing are
appended properly to the existing ALPHA data string. To restore the ALPHA display, execute
or switch ALPHA mode off, then on.
e Ifyoustore an ALPHA string containing nulls in a data register, the nulls do not appear if you use
to display that register. If you print the contents of that register, only the characters to the left
of the first null are printed. The remaining characters are ignored by the printer. (All characters in
the string, including the nulls, remain properly stored in the data register and reappear in the
ALPHA register if the contents of the data register are recalled using [ARCL].)
o Ifastring containing one or more nulls is rotated so that a null becomes the leftmost character, that
null and all nulls that immediately follow it are lost.
e Ifthelast characterin the ALPHA register is a null, and if the calculator is in ALPHA append mode
(the prompt appears to the right of the null character), pressing clears the entire ALPHA
register.

e If an ALPHA string in the X-register contains a null when you execute [POSA|, the calculator
searches the ALPHA register only for that portion of the string that is to the left of the first null in
the string.
o Anynullin a file name that is entered in the ALPHA register is ignored.

* The null character and character code should not be confused with the NULL message that is displayed when a calculator function key
is held down for more than about one-half second.

47
Function Index

Function ALPHA
Description Register X-Register

Returns length of the string in the ALPHA


register to the X-register.
Searches the ALPHA register for an
ALPHA formatted number. Returns its
value to the X-register.
Appends contents of the ALPHA register as Source string.
a new record at the end of the current record
in extended memory working file.
Appends contents of the ALPHA register as Source string.
a new record at the end of the current
working file in extended memory.
Appends record or portion of record from
‘working file in extended memory to the
ALPHA register. Copies from current
pointer position until either the ALPHA
register is full or record is exhausted.
AROT Rotates contents of ALPHA register. Number of characters
(page 16) by which ALPHA is
to be rotated.
(Positive numbers
rotate to the left;
negative to the right.)
Deletes left-most character in ALPHA
i
4

X
O

(page 14) register, converts it to numeric character


code, and places code in X-register.
Clears a data or ASCIIfile. File name.
2 %
Q-
T o T o T o

® 1= N
>

Clears all key assignments.


»
87 (I

®
Q

Creates an ASCII file in extended memory. File name. Number of registers.


n
2lE
® |5
N >
>

CRFLD Creates a data file in extended memory. File name. Number of registers.
page 24)

Deletes characters in working file, starting Number of characters


m
O
I
X0
o
|y

page 30) at current pointer position. to be deleted.


Deletes the record indicated by the record
m
O
O
m
[
D

page 29) pointer in the working file.


EMDIR Lists the directory of extended memoryfiles.
page 2 )
)

Returns the number of registers in named File name.


I

FLSIZE
page 25) file to X-register.
GETAS Copies named ASCII file from mass storage Mass storage file
(page 33) to extended memory. name, extended
memory file name.
Halts program execution until a key is
<
A
o

m
m

(page 16) pressed or approximately 10 seconds

49
50 Function Index

ALPHA
Function Description X-Register
Register
elapses. Puts keycode in X-register if key is
pressed, puts 0 in X-register if no key is
pressed.
GETP Replaces last program in main memory Program file name.
(page 25) with contents of named program file.
Copies entire data file to main memory Data file name.
I

GETR
page 28) registers, beginning with register 00.

GETREC Clears ALPHA register and copies record or


(page 32) portion of record from working file to
ALPHA register. Characters are copied
from current pointer position until 24
characters have been copied or the end of
the record is reached.
GETRX Copies all or a portion of the registers in the bbb.eee (beginning
(page 28) working data file in extended memory to the and ending registers
designated registers in main memory. in main memory into
(Copy starts from the current pointer which data is to be
position in the working file.) transferred).
GETSUB Copies named program from extended Program file
(page 25) memory to end of program storage in main name.
memory.
GETX Copies current register in working file to
page 28) X-register.
Inserts characters in ALPHA register into Characters to be
w
I
D
2
O

(page 31) working ASCIIfile in front of the current inserted.


character.
| Inserts characters in ALPHA register as a Characters to be
2]
=z
X
m
O

(page 29) new record in front of the current record in inserted.


the working ASCII file.
PASN Programmable function. Function or Keycode.
page 13) Program name.

Deletes named program and all following it Program name.


I

PCLPS
page 17) from main memory.
Scans the ALPHA register for the ALPHA substring or
I

POSA
page 15) character(s) in the X-register and returns character code.
the position of the first character to the
X-register (—1 if no match).
POSFL Searches the working ASCII file for a sub- Target string.
(page 31) string matching the string in the ALPHA
register. Returns the record and character
pointer locations to the X-register of the first
character of the substring if a match is
found. Returns a —1 if no match is found.
PSIZE Programmable function. Number of data
page 17) storage registers to be

allocated.
Purges (deletes) the named file from File name.
X0
o
-
C
m

(page 24) extended memory.


RCLFLAG Recalls data to the X-register representing
(page 11) the status of flags 00-43.
Recalls a number representing the pointer
I

RCLPT
page 27) positions in the working file to the X-register
(rrr for data files, rrr.ccc for ASCII files), or
Function Index 51

ALPHA
Function Description Register X-Register

recalls the number of bytes in a program


file.
Recalls a number representing the pointer File name.
positions in the named data or ASCIIfile (or
representing the number of bytes in the
program in a program file) to the X-register
(rrr for data files and program files, rrr.ccc
for ASCII files). Makes the named file the
working file.
REGMOVE Copies nnn main memory registers sss.dddnnn
page 11) beginning with register sss to a new

location beginning at register ddd.


REGSWAP Swaps nnn registers beginning with sss.dddnnn
(page 11) register sss with nnn registers beginning
with register ddd.
SAVEAS Copies ASCII file from extended memory to Extended memory
(page 33) mass storage. file name, mass
storage file name.
SAVEP Copies the named program from main Program name, file
page 25) memory to a program file in extended name.

memory.
SAVER Copies all main memory registers to the File name.
P named datafile.
N
e
o
®
Q

SAVERX Copies a block of main memory registers bbb.eee (beginning


(page 27) (indicated by the number in the X-register) and ending registers
to the working datafile. of block to be saved).
SAVEX Copies the contents of the X-register to the
(page 28) working data file at the current pointer
position.
Positions the pointers in the working file to rrr (data files) or
2
m
A
o

m

(page 26) the locations indicated by the number in the rrr.ccc (ASCII files).
X-register.
SEEKPTA Positions the pointers in the named file to File name. rrr (data files) or
(page 26) the locations indicated by the number in the rrr.ccc (ASCII files).
X-register.
SIZE? Returns the number of data storage
(page 17) registers in main memory to the X-register.
STOFLAG Restores the status of flags 0-43 (or a block flag status
(page 11) within that group). Uses the data obtained or
by executing RCLFLAG |. bb.ee (beginning and
ending flags in block
to be restored;
Y-register contains
flag status).
X<>F Exchanges the contents of the X-register Code number (0-255)
page 12) with the status of flags 0-7.
XTOA Converts the number in the X-register to its Character Number
I

(page 14) equivalent character and appends the (0—255).


character to the ALPHA register.
a|npo\ Aloway/suollound papualx3 YO8 128 dH
|enue S,JaumQ
(fifi HEWLETT
PACKARD

1000 N.E. Circle Blvd., Corvallis, OR 97330, U.S.A.

82180-90001 Printedin U.S.A.

You might also like