Publicitate
Publicitate
‚ НР 9800 Computer Systems
HPL Operating Manual
and =
Programming Update
for the HP 9826 Computer
va pee D
HPL Operating Manual
and
Programming Update
for the HP 9826 Computer
Manual Part No.09826-90046
Microfiche No.. 09826-93040
‘Start Here
This manual shows how to instali test-and operate your new HP
9826 Computer.
Hewlett-Packard Desktop Computer Division
3404 East Harmony Road, Fort Collins, Colorado 80525
(For World-wide Sales and Service Offices see back of manua! )
Copyright by Hewlett-Packard Company 1981
N
ii
Printing History
New editions of this manual will incorporate all material updated since the previous edition.
Update packages may be issued between editions and contain replacement and additional
pages to be merged into the manual by the user. Each updated page will be indicated by a
revision date at the bottom of the page. A vertical bar in the margin indicates the changes on
each page. Note that pages which are rearranged due to changes on a previous page are not
considered revised.
The manual printing date and part number indicate its current edition. The printing date
changes when a new edition is printed. (Minor corrections and updates which are incorpo-
rated at reprint do not cause the date to change.) The manual part number changes when
extensive technical changes are incorporated. :
June 1981 First Edition
Table of Contents
Introduction o.oo et ee se ee tees ses eneeeeeeneneeonsusessonessnseanconseneenens vii
Chapter 1: Installation
Introduction .. 09 errerereo0c0caa aaa en 1-1
Unpacking the Computer .... .... PS 1-2
Installation Procedure ............... 2... aa anaananenroraaa io. 1-3
Maintaining Your Computer. ........... 2.0 20000000r e e erre 1-11
Flexible Discs .......................... PS 1-12
Disc Handling Precautions .. ....................... ..... Ce 1-12
Insertingand Removing Discs ........... il errores 1-13
Write Protection. .................. LL RER 1-13
Data File Compatibility . . .......... a ea a a a aa ae a a eee 1-14
Using Discs. 1102201000 LA 4e a 4e da ee A a ea eee a aa a ae 1-14
(07e) 91911108 D) C1 JS 1-15
Chapter 2: Getting Started
Introduction... RR KR 2-1
Daily Power-up. 2.00. i aa a aa 2e PS 2-1
Display Organization .........122000 000404 ea ae a a ee eee aa ea ea eee 2-3
Keyboard Operations. .........00000 00444 a aa e a ae ea eee ea Aa aa a Ra eee 2-5
Character Entry Keys... .... de da ea ea ea ee ee ea eee 2-5
Numeric Pad. . ..... 4 Le 4 4 a 4 4 aa ee ee ee eee 2-6
Cursor Controls 110110010000 AA aa 44e a ee a a a a ae ea a ae 2-6
Editing Lines. ........... FP 2-6
System Control Keys. ........... reee 2-9
Special Function Keys... ....... eee sa ae eee eee ea a ae 2-10
Program Control Keys. . ....... Lee a aa ea ee aa a eee 2-15
Arithmetic Operations . . ...... a ae a ae A ee ee a ae ea eee 2-16
Chapter 3: Program Transfer
Introduction .......11011010101 110 LL LL LL A A A a Aa A Aa A La LA AA a Le ALL 3-1
Disc Transfer...........1102011 011 LL LL A A AA La AA A a La A Aa ae 3-1
Interface Transfer. . . . oo Va AA A Aa A4 a ALL a Lea A a aa 6 3-2
192 Ce 101 6711 à CAN A A A A A AA A AS 3-2
iv
Chapter 4: 9826 HPL Programming
ItrOdUCHION © oo oe ee ee eee ear eee ee 4-1
Mainframe Programming. . ..... «ooo Ae NT 4-2
The Read, Data, and Restore Statements. ..........0.000000000 N 4-2
The Programmable Beep Statement ....................... aaa 4-3
CRT Display Control . . ........ ot. EE 4-3
The Clear Alpha Statement .................... aaa adorno 4-3
The Alpha On, Alpha Off Statements . ............ ie 4-3
The Key Labels On/Off Statements... iii este tete 4-4
The Dump Alpha Statement. ....... oii 000 Нео 4-4
The Tab X-Y Statement . . o.oo eee eee eee 4-4
Read CRT Statements. . . «ooo eee о Ce 1141200 —... 44
- The System Printer Select Code Statement .......... aa 22210 ... 45
Math Functions. ........... eee eee ec EAN O 4-5
Flags .......... 220000000000 eee tes aa aa ae 4-5
The Cross Reference Statement... oe 4-5
Tape Cartridge Operations .........0.0000000000 se ea 4-5
Record Binary Statement... EE A 4-8
String Variables o.oo TO 4-8
The Value Function... .... e ee a ee 4-8
The String Function... o.oo ES ... 4-8
The Read Statement .. oo... eee Lee aa 4-8
Systems Programming. .............oo i о a ... 439
The On Knob Statement. . . oi eee г... 4-9
The Knob Function . .. «ee as 4-9
The Knob Status FUNCHON «ooo L ea etes ae ee ete о 4-10
The Key Buffer Empty Function ....... неее ненн ен НННННеео о 4-10
The Remote Keyboard Statement... At et 4-11
The Press Keyboard Statement . ................. HH a A]
The Define SFK Statement. ............. 2... 2... ara 4-12
The System Boot Statement. . o.oo оееН ен Неееето т 4-13
Matrix Programming . .... «o.oo... etme ee eee eee ee eee etes 4-13
Array Output ......2000000 00e e eee eee eee eee aaa 4-13
Disc Programming .......000000000000 ete tete eee 4-14
The Mass Storage Unit Specifier ................. con as 4-14
The Mass Storage ls Statement .............e...200000000 FA 4-16
“ The Assign Statement............00000 04e eee e eee eee tete etes TT 4-16
The Drive Statement... .......2240000 00444 a eee ea ea ee eee ee eee eee 4-17
The Initialize Statement. . «o.oo ee 4-17
The Disc Type Function .......... oi TS 4-19
The Catalog Statement. ........0.0.000000000 00 eee ete eee eee 4-20
The Killall Staternent.............. 2000000000 RARA о 4-21
The Open Statement. . «o.oo. tata etant 4-21
The Disc Copy Statement. ........ ooo AE TA 4-22
The File Copy Statement... eee eee ae 4-23
The Save Binary Statement ........0000000000400 eee tea 4-24
Unimplemented Disc Programming Statements. SEE 4-25
Unimplemented Disc Utility Binaries.........0.004004000000 eee 4-25
More UO oo 4-26
Interface Control Operations ............ oi eee aa aa eee see etre ee 4-26
98623A BCD 1/O Operations. ...........000200040 00e sean ana aa ea ee eee ee 4-28
98622A GPIO Operations ...........02000000 44e s eee a aa a ea ee eee a eee ee eee 4-28
9825/9826 HPIB Operations... нн ен еее 4-29
98626A Serial /О Operations ..........00000000 00e see a aa es ee eee eee 4-31
Internal Clock ACCESS. «oo vo ee ee ee ee ee ee ee 4-34
The Set Clock-Time Statement . . . ieee eee 4-34
The Read Clock-Time Function... .. ee 4-34
Interrupt Control ©... oe 4-35
The On Interrupt Statement... ...... TRA 4-35
Interrupt LOCKOUIS. . LL. i eee eee eee etes ere 4-35
The On Clock-Cycle Statement... .. o.oo eee 4-35
- The Cycle FUNCHON . . «ooo ees 4-35
The On Clock-Delay Statement... ... i 4-36
The On Clock-Match Statement ......0.0.0.000000000000 00ER 4-36
Buffered VO .............. Ne канава нннно о 4-37
Terminating 1/0 Transfers.........1111111 110 LA LA a aa aa es 4-37
VO Buffer Extended Status..........2020100020000 04444 e aa a see eee a a a sa eee 4-37
VO Buffer Pointer Control ..........02040400000 04 0e AA aa ee ee eat eee eee es 4-37
Saving String Buffers to Disc ........200000 0e Lea eee ae eee e ea atteste 4-38
Plotter Control .......... a aaaarececocvecdecreoorororerorerecrecrerec.. 4-39
Internal Graphics Control... LL LL LL LL LL LL LL LL 4-39
The Plotter Select Code Statement LL LL LL LL ARR aa a a ee 4-39
The Pen Select Statement. ............1200411000 00004 eee 44e eee ee ee see eee eee es 4-39
Graphics Screen Control Statements. ..........0.040000000000 4-39
The Dump Graphics Statement ........... oi ee tee 4-40
The Graphics Pointer Statement . ......... oi 4-40
Binary Graphics... .. coo e eee ae as .. 4-40
The Binary Plot Statement ............0000000011000 HN 4-41
The Graphics Load and Graphics Store Statements ........... os aa... 4-42
Disc Programming Technical Appendix Ce as A-1
Code Charts ................—.—.. SPE Ce PI ... B-1
Interface Board Diagrams ..........0.0000000000000 a ee ee eee aaa. CA
Alphabetical Syntax Listing ............... co. ere aa ..... D1
9826A HPL Error Messages ......................... ae aaa Back
Introduction
This update guide serves to inform the experienced HPL programmer of differences between
HP 9825A/B Computers and the HPL Language System of the HP 9826A Computer. As you
gain experience using the 9826 HPL language system, you will begin to appreciate the
changes made to the HPL programming language for the 9826. In the great majority of
instances, these changes were made to enhance or expand the utility of the HPL program-
ming language, and to provide access to some of the new hardware features of the 9826.
What To Do and When
First, read the “Installation” chapter of this manual so you'll be able to successfully turn on
the 9826 and start programming when you are ready.
Second, read the chapter titled “Getting Started”. This will familiarize you with the differ-
ences between operating the 9825 and the 9826 computers.
Third, read the chapter titled “Program Transfer” so you will know how to get your 9825
programs up and running on the 9826.
Fourth, read the chapter titled 9826 HPL Programming” to familiarize yourself with the
programming differences and extensions of 9826 HPL. |
Now that you know what you have to do, its time to get to it. Good luck!
vii
viii
1-1
Chapter 1
Installation
Introduction
The computer can be configured to automatically load a language system from a disc when
you switch the computer on. Alternately, the language system can be built-in using read-only
memory (called ROM). Regardless of whether HPL is soft-loaded or built-in, it's the same
language once loaded.
The soft-loaded system allows a programmer to load one of many languages from a disc into
the computer memory. This allows the programmer the flexibility to select the programming
language and associated keyboard operating system best suited to his or her needs.
The built-in (ROM) language system is just that, always available immediately after power-up
or system reset. There are no delays or extra steps to ready the system. The ROM-based
system is the most convenient choice for simply running applications programs. For maximum
flexibility, more than one built-in language system can be installed at the same time.
Knowing whether your computer has a soft-loaded or built-in language system is important. If
your computer is soft-loaded (the system is loaded from disc at power-up), you need to insert
the system disc before switching the computer on. On rare occasions, an error message may
require you to reload the system from disc again. If your computer has more than one built-in
language system, you need to choose the language system during power-up. Be sure to follow
the correct power-up procedure later in this chapter.
IMPORTANT
If you have a soft-loaded system, be sure to produce at least one
backup copy of the system disc right after switching the computer
on. Refer to Copying Discs later in this section for more informa-
tion.
1-2 Installation
Unpacking the Computer
Your HP computer was thoroughly tested and inspected before being shipped to you. All
equipment should be in good working order. After removing the computer from its carton,
carefully check it and the accessories for any damage caused by transit. You should also
“check the accessories against the packing list supplied. Notify your HP sales office if any
damage is found. Also file a claim with the carrier. If any items are missing, use the reply card
supplied to order the item(s) directly from the factory. HP sales office locations are listed at
the back of this manual.
Now you're ready to install the computer, as explained next.
Installation 1-3
Installation Procedure
Please follow this procedure to install and power-up your computer for the first time. If the
computer doesn’t power-up as expected, refer to the Computer Testing section in chapter 5.
1. Position the Computer
Place the computer on any convenient work surface. Be sure to leave about 50 mm (two
“inches) free on each side for air flow through the computer. Do not operate the computer in
an area with excessive dust or airborne particulates (smoke).
on - re ‘
ME
bd = - - “
. „ . Ma we e - ha : H
o 7 . - - » - E - - i > - к 4. , . -
¡-a Saa a_a_0. 2.0 0.858204 -— 8 — Y — 8 -\
„т 4 - . 2 ow , Г + ns « 4 : Н , ~ + ,
/ wr ut a ai „но Lad api. чала »~ о \
Ts 1 4 4 4 *, * = = 5 и : - - > -
Й --- = ра pe y I AB. Sd Jp ла =. > \
+ » ¥ e у ‘м J = J ~ na | | : 7 ` > ` -
/ y J ‚ жа Mz. Ё : К SRE „лить. ан) A npr - - \
Cay prior idl Te - -
. И с Canal Y 1.8.8
———
mi
Position the Computer to Allow Free Air Flow
2. Check the Line-voltage Switches
CAUTION
THE COMPUTER CAN BE DAMAGED IF SET FOR 100 VAC OR
120 VAC AND A HIGHER VOLTAGE IS APPLIED. CHECK THE
LINE VOLTAGE SWITCHES BEFORE APPLYING POWER.
The computer can be set to operate on one of four nominal line voltages: 100 Vac, 120 Vac,
290 Vac or 240 Vac. The switches on the back of the computer were set to the line voltage in
your area when the computer was shipped from the factory. Check the switch settings to
ensure they are set correctly:
~ V LINE SELECTOR ~ V LINE SELECTOR ~ V LINE SELECTOR ~ V LINE SELECTOR
O fa (0 (TE
120 = 120
240 240 240
100 Vac 120 Vac 220 Vac 240 Vac
Line Voltage Switch Settings
1-4 Installation
3. Check the Fuses
WARNING
TO AVOID THE POSSIBILITY OF SERIOUS INJURY, DISCON-
NECT THE POWER CORD BEFORE REMOVING OR INSTALL-
ING A FUSE.
The computer has two fuses accessible on the back panel. See the next photo. One fuse
protects the entire computer and should match the line voltage, either 100/120 Vac or 220/
240 Vac. (See the next table). The other fuse protects the internal power supply; its value is
the same for any line voltage: 15 A, HP part number 2110-0054.
Line Fuses
Line Fuse HP Part
Voltage Needed Number
100. 120 | 4 A (normal blow) | 2110-0055
220, 240 | 2 A (normal blow) 2110-0002
/ Line Voltage Switches
Internal Fuse
Line Fuse
Power Input Socket
Computer Back Panel
Installation 1-5
4. Connect the Power Cord
The proper power cord was selected and packed with your computer when it was shipped
from the factory. Each cord has a ground connector to protect the operator from electrical
shock. Check to be sure you have the correct cord for your power outlet. The available cords
are shown next.
WARNING
IF A REPLACEMENT POWER CORD IS NEEDED, IT MUST
HAVE THE SAME POLARITY AS THE ORIGINAL. OTHERWISE,
EITHER A SAFETY HAZARD FROM ELECTRICAL SHOCK TO
PERSONNEL OR EQUIPMENT DAMAGE MAY RESULT.
U.K. Australia Europe Grounded
8120-1351 8120-1369 8120-1689
<,
| Е
U.S. Grounded Swiss
8120-1378 8120-06982 8120-2104 Computer
Power-Input
Socket
>
C e
> a
r € ;
Available Power Cords
After connecting the power cord to the back panel and the power outlet, go ahead and switch
the computer on as explained next.
1 UL and CSA approved for 100/120 Vac operation.
2 UL and CSA approved for 220/240 Vac operation.
1-6
Installation
5. Initial Power Up
Now that you've checked the line-voltage switches, checked the fuses, connected the power
cord and know which language system you have (soft-load or built-in), you are ready to
switch the computer on.
With a Built-in Language System
If your computer has a built-in language sys-
tem, first remove any disc in the drive and then
press the power switch in. The computer dis-
play takes about 10 seconds to warm up. In
the mean time, the computer tests its memory.
Then a “READY” message is displayed. The
computer is now ready for your use.
HPL READY
WHICH SYSTEM”
the computer allows you to select one. For ex-
BH
ample:
If more than one language system is built-in, |
In this example the computer found two built-in systems, BASIC (B) and HPL (H). The
computer will wait about 10 seconds for you to select the language system by pressing the
appropriate key. (If you press the wrong key, the computer will just beep and continue wait-
ing.) To select the HPL system, press the H key.
If an appropriate key isn’t pressed in time, the language system listed first (BASIC in our
example) is automatically loaded.
With a Soft-loaded Language System:
If your computer has a soft-loaded operating
system, open the disc drive door and insert the
Language System disc. Be sure the disc is in-
serted with its label up and facing you, as
shown below. Then close the door and press
the power switch in.
Installation
The computer automatically looks for a
SYSTM-type file on disc at power-up. If one is
found, it's loaded into memory and then a (RAM) HPL READY
“READY” message is displayed. For example:
When the Built-in System Does Not Load:
If the computer does not display the READY message after about 10 seconds, or if a system
error is displayed, switch the computer off, wait a few seconds and switch it on again. If the
READY message still doesn’t appear, call HP for service. See the list of service locations at
the back of the manual.
When the Soft-load System Does Not Load:
-If the computer does not display the READY message after about 15 seconds, or if
“UNABLE TO FIND SYSTEM” is displayed, try to re-load the system. First remove the
disc, check to be sure it is a system disc, and re-insert it in the disc drive. Then close the
drive door and press (SHIFTJPAUSE). If the computer still doesn’t load its system, either the
system disc is defective or the computer requires service. Call HP for service. See the list of
service locations at the back of the manual.
After powering up the computer for the first time, you should verify its operation by running
the computer tests explained in chapter 5. Once computer operation is verified, switch it off
and install any additional accessories supplied. See the next sections.
FEDERAL COMMUNICATIONS COMMISSION
RADIO FREQUENCY INTERFERENCE
STATEMENT (U.S.A. ONLY)
The Federal Communications Commission (in Subpart J of Part 15, Docket 20780) has specified that the following
notice be brought to the attention of the users of this product.
Warning: This equipment generates. uses, and can radiate radio frequency energy and if not installed and used in
accordance with the instructions manual, may cause interference to radio communications. It has been tested and found
to comply with the limits for a Class A computing device pursuant to Subpart J of Part 15 of FCC Rules, which are
designed to provide reasonable protection against such interference when operated in a commercial environment.
Operation of this equipment in a residential area is likely to cause interference in which case the user at his own expense
will be required to take whatever measures may be required to correct the interference.
1-7
1-8
Installation
6. Install Additional Read/write Memory
CAUTION
THE COMPUTER MUST BE SWITCHED OFF BEFORE ANY
ACCESSORY BOARDS ARE REMOVED OR PLUGGED IN.
PLUGGING OR UNPLUGGING BOARDS WITH THE POWER
APPLIED WILL DAMAGE THE BOARD OR THE COMPUTER.
The computer's program and data-storage memory can be expanded by installing additional
read/write memory boards. Each memory board can be plugged into any available accessory
slot at the back of the computer.
Before installing a memory board, note the amount of available read/write memory by first
switching the computer on:
“
173456 Available bytes
Now switch the computer off and remove the memory board from its anti-static plastic
package.
CAUTION
STATIC DISCHARGE CAN DESTROY COMPONENTS ON À
MEMORY BOARD. HANDLE THE BOARD BY USING ITS ANTI-
STATIC ENVELOPE. DO NOT TOUCH THE ELECTRICAL
TRACES OR SET THE BOARD ON ANY STATICALLY
CHARGED SURFACE (E.G., A CLOTH).
Each 64 kbyte memory board must be set to a consecutive starting address, beginning with
the lowest address of any memory board(s) currently installed. Each board has a mini-switch
labelled SW-1 for this purpose. The following table and drawing show how to set the switch.
The standard computer is supplied with 64 kbytes of built-in memory. The first additional
memory board should be assigned the starting hexadecimal address FF. Each additional 64
kbyte board must be set to the next-lowest hexadecimal address: FE, FD, etc. Memory boards
must not be set to the same address.
Installation
64 kbyte Memory Board Starting Addresses
Starting Switch Setting*
Memory Board Address 12345678
1* memory board FF 11111111
2" additional board FE 01111111
3“ additional board FD 10111111
4" additional board FC 00111111
5" additional board FB 11011111
6" additional board FA 01011111
7* additional board F9 10011111
8" additional board F8 00011111
* “ed yo. - + 7 re ry. . . .
1" indicates switch is open: *0"" indicates switch is closed.
98254A Memory Board Starting Address Switch
(shown set to address FC)
After installing each memory board, switch the computer on and verify the new amount of
available memory.
If the available memory does not increase with each added memory board, switch the compu-
ter off and verify that the board is properly seated in the accessory slot. Also check the setting
of the starting address switch. If it's not set to the highest-available address, the computer
cannot address the board.
If the computer still doesn’t indicate an increase in available memory, or the computer does
not power-up correctly when an additional memory board is installed. switch the computer
off, remove the board and replace it in its anti-static envelope. Then call HP for details on
replacing the board. Office locations are listed at the back of this manual.
1-9
-10
Installation
7. Install Interface Cards
Now that your computer is installed and configured with any additional read/write memory,
you can install interface cards and connect peripheral components to the computer. Be sure
to switch the computer off before plugging in or removing any cards or memory boards.
The computer has eight accessory slots. Each can hold a memory board, while every other
slot is designed to accept an interface card. This allow installing up to four interface cards and
at least four memory boards. The built-in HPL language system is contained on one board
already installed. This board must not be removed.
Installing Interface Cards
A manual provided with each interface card explains how to configur the card for your sys-
tem. Follow those instructions carefully to ensure a smooth installation:
Be sure each interface card is set to a unique address or select code. A switch on each card
sets its select code. These codes are already reserved by the computer:
HPL Internal Select Codes
0 Keyboard and CRT Display Line
7 HP-IB interface (built-in)
16 CRT Print Area
As shown. select codes 0.7.and 16 are reserved for the computer's internal use. That leaves
select codes 1 thru 6 and 8 thru 15 for external interface cards.
Installation 1-11
Maintaining Your Computer
Cleaning the Computer
The computer should be cleaned with a soft cloth lightly dampened either in clean water or a
mild detergent. Don’t allow water to get in the computer case. Don’t use any abrasive
cleaners.
Clean the Disc Drive Heads
The disc drive’s read/write heads should be cleaned periodically to ensure trouble-free opera-
tion. A head-cleaning kit is available from HP for use with your computer. Order HP acces-
sory number 92193A. HP does not recommend use of other head-cleaning discs or equip-
ment.
CAUTION
DO NOT ATTEMPT TO CLEAN THE DISC READ/WRITE
HEADS MANUALLY OR WITH MATERIALS OTHER THAN
THOSE SUPPLIED BY HP. OTHERWISE HEAD DAMAGE OR
MIS-ALIGNMENT COULD OCCUR.
To clean the disc read-write heads:
Switch the computer off.
Insert the 9826 System Test Disc in the disc drive and close the drive door.
Switch the computer on. The system text program is automatically loaded.
When the initial System Test menu is displayed, press either CLEAN DISC softkey, ki
or k6. Then follow the displayed instructions.
SS о юн
1-12
Installation
Flexible Discs
This section introduces you to the flexible disc media and explains how to copy (back up) the
contents of one disc to another. HPL operating commands are available for initializing discs,
cataloging disc files and purging disc files. These and other commands are explained in Chap-
ter 4.
The built-in disc drive handles standard 54 inch flexible discs. The flexible disc, also called a
mini-disc and a diskette, is a thin piece of plastic enclosed in a special plastic jacket. The disc
is covered with a thin oxide coating on which your program and data information are stored.
When you insert the disc in the drive and close the door, the drive is ready to read informa-
tion from or write information onto the disc. When the computer requests a read or write, the
disc spins at a constant rate, (like a phonograph record). The yellow light on the disc drive
indicates that reading or writing is taking place. Do not attempt to remove the disc when the
yellow light is one.
The built-in disc drive reads and writes on both sides of the disc and requires discs labeled for
“double-sided” and “double density” use. Be sure to use only media supplied or approved
by HP. Boxes of ten discs are available by ordering HP part number 92190A. Other discs
may not be of adequate quality or may damage the drive.
Disc Handling Precautions
Be sure to follow these guidelines to ensure trouble-free operation:
e Handle discs only by the labeled area. Never touch the disc surface which shows through
the protective jacket.
e Always return the disc to its storage envelope after each use. The envelope not only
protects the disc from physical damage, it's made of an anti-static material to prevent
dust from accumulating.
e Write only on the disc label using only a felt-tip pen. Don’t write on the disc jacket. Don't
use a lead pencil or a ball-point pen.
e Although the disc is flexible, don't bend or fold it.
e Avoid using or storing discs in temperature extremes, or in areas with excessive smoke or
dust. Even cigarette ash can damage the disc surface. Close the disc drive door when it's
not in use.
e Do not place discs near sources of strong magnetism, such as an electric motor or toy
magnet. This will destroy data on the disc and may prevent further use of the disc.
¢ Do not attempt to clean the disc or remove it from its protective jacket.
e Use only discs approved by HP. Others may impair data integrity or damage the disc
drive.
Installation 1-13
Inserting and Removing Discs
Open the drive door by lifting the door handle
up. Check to make sure there is not another
disc in the drive already. Insert the disc as
shown on the right. Close the door.
Be sure to return the disc to its storage en-
velope when not in use. This keeps dust from
getting on the oxide surface. Also close the
drive door when not in use.
CAUTION
IF YOU ACCIDENTALLY INSERT ANOTHER DISC WHEN ONE
IS ALREADY IN THE DRIVE, REMOVE THE BOTTOM DISC
FIRST. OTHERWISE. THE READ/WRITE HEADS COULD BE
DAMAGED.
Write Protection
Covering or uncovering a notch in the disc jacket | <
determines whether the disc drive can write in- а’
formation on the disc. When the notch is covered, og
„49 _ = . . . . a"
it's impossible for the drive to write on the disc; thus a o
information already on the disc is protected from E
being written over or erased. This is useful whena | a,
disc contains source information which should only
be read.
)
Labels are supplied with discs to allow you to cover
O
the write-enable notch.
\ 7
oxide write
surface enable
notch
14
Installation
Data File Compatibility
The built-in disc drive initializes discs in a standard HP mass storage format called LIF, ensur-
ing that files originated by one HP 9826 will be compatible with other 9826 computers and
Language Systems. The standard format also allows the computer to identify and read certain
files from other HP computers and terminals. For example, type ASCII files (containing data
and programs) originated by an HP 2642 Terminal can be read by the HP 9826. Type ASCII
files originated by the HP 9826 Computer can be read by the HP 2642A Terminal. Other
type files originated by the computer may be identified but may not be read by the terminal.
For details on mass storage compatibility with other HP equipment, refer to the Disc Program-
ming Technical Appendix or contact your HP sales office. Locations are listed at the back of
the manual.
Using Discs
The first step to take to use a new disc (NOT your HPL Language Disc!) is to insert it as
described previously, and initialize it. YQu must initialize a disc whether you are using tape file
commands or disc programming commands. To initialize a disc in the internal disc drive,
execute
init ":I 0"
The initialization process takes about two and a half minutes. Once initialized, the disc can be
used to save and get programs and data. It can be also used to store and load programs just
as if it were a tape cartridge.
To use the disc with disc statements, you should first become familiar with disc structure and
usage. The basics of disc programming are discussed in the 9825 Disc Programming Manual
included with your 9826. Additions and extensions to 9825 disc programming that are pro-
vided by the 9826 are described in the Disc Programming section of Chapter 4 of this manual.
Some of the technical aspects of 9826 disc programming are discussed in the Disc Program-
ming Technical Appendix to this manual
To simply save a program you have typed in, the procedure is simple. With the initialized disc
in the drive, your program in memory, and assuming you wish to call your program
“PROGRAMI
press: save (this is special function key k0)
type: PROGRAM1 (this displays save "PROGRAM1")
press: (the program is saved to disc)
To retrieve that program off the disc, a similar procedure is followed.
press: det (this is a special function key kt)
type: PROGRAM! (this displays set "PROGRAMI ")
press: EXECUTE (the program is loaded into memory)
To determine what programs are on the disc, you merely press one key.
press: *cat (this is special function key k4)
Installation
The disc catalog (or directory) is listed on the display.
If you wish to use 9825-type tape commands, you must still “mark” files just as if there were
a tape cartridge inserted in the computer. Then commands such as rcf and 1df can be used to
store and load programs and data. Refer to the Tape Cartridge Operations section of Chapter
4 in this manual for additional topics of concern when using tape commands.
Copying Discs
Although flexible discs are an extremely reliable storage media, like phonograph records, they
do wear out. Since discs can also be damaged due to accidents or careless handling, you
should keep a duplicate or back-up copy of each important disc. HPL programs are provided
in the Utilities Pack to copy the files from one disc to another. The “cbackup” (complete
backup) program automatically copies all files from one disc to another. The “ibackup” (indi-
vidual backup) program allows copying selected files to the same disc or a second disc.
The following instructions show you how to run the “cbackup” program. For details on run-
* ning “ibackup” and the many other HPL utilities, refer to the HPL Utilities Manual.
The “cbackup” program can be used to copy all files from a disc originated by an HP 9826
Computer. Although the program runs on the HPL language system, it copies disc files con-
taining BASIC, HPL and other programs originated on an HP 9826. ‘‘cbackup’ will also copy
files from mini discs recorded on other HP equipment which conforms to LIF (Logic Inter-
change Format) standards. Your HP sales office can furnish a list of LIF-compatible equip-
ment.
Follow these steps:
1. Switch the computer on and load the HPL language system (see Chapter 1).
If the HPL system is already loaded, ex-
ecute this command to clear the computer
memory: erase al EXECUTE
9 Insert the 9826 HPL Utilities Disc in the drive and close the drive door.
3. Load and run the ‘‘cbackup’ program: get "cbackup" (EXECUTE
4. Follow the displayed instructions.
Note
Be sure to press the CONTINUE key when instructed. not the RUN
key. If RUN is pressed after the program has started, the program
must be stopped and restarted using the Utilities Disc. Return to
step 1 above.
1-15
1-16
Installation
The “‘cbackup’ program assumes the backup disc is an initialized disc containing either no
files or no wanted files. If files are found, a catalog of the backup disc is displayed for you.
To automatically purge the files and begin the disc copy, press CONTINUE. If the backup disc
is not initialized, the program automatically initializes the disc before copying files from the
master disc. The initialization routine takes about three minutes.
The “cbackup”” program copies files from one disc to another by reading portions of the first
(master) disc into computer memory and writing each portion onto the second (backup)
disc. Since only one disc drive is available, the program asks you to exchange the master
disc for the backup disc one or more times. After you insert the master disc, the program
catalogs the files and determines how many disc exchanges will be needed to copy all files to
the backup disc.
A catalog of the backup disc is displayed after the backup is complete. To backup another
disc, using either the same master or another master disc, enter ¥ and press CONTINUE. To
exit the program, enter N.
2-1
Chapter 2
Getting Started
Introduction
This chapter introduces many of the computer's operating features, including the keyboard
functions, display-control keys, arithmetic operations and printer controls. Whether you plan
to run prerecorded (canned) programs or develop your own, first take a few moments to get
acquainted with the computer by reading the next few pages.
Durability is a built-in feature: of this easy-to-operate computer, so don’t be afraid to test it.
After reading each section and trying the examples shown, try your own examples. Experi-
ment. You cannot damage the computer by pressing the wrong keys. The worst that can
happen is an error message will appear.
Daily Power-up
After the computer has been installed as covered in Chapter 1, daily power-up is simply a
matter of either switching the power on (if the language system is built-in) or inserting the
System Disc and switching power on (if your system is soft-loaded). In either case, the compu-
ter automatically tests its memory and then loads its language system.
When “HPL READY” is displayed, for example, the computer is ready to accept keyboard
commands. Now you can load and run programs or develop your own HPL language prog-
rams. If you're running pre-recorded programs, you may be able to let the computer auto-
matically load and run a program by using the Autostart feature.
Program Autostart
You can have the computer automatically load and start running a program named
AUTOSTH by inserting the disc in the disc drive before switching the computer on.
At power-on, the computer always checks for a disc in its drive. If a disc is inserted, the
computer looks for a program file named AUTOSTH. If the AUTOSTH file is not found, the
system searches for file named TOF000, and loads and runs it if present. This emulates tape
cartridge autostarting. If the right file isn’t on the disc, the computer simply displays the HPL
READY message and awaits your command.
If your system is soft-loaded at power-up (700-series options). the autostart disc must have
both the SYSTM-type file and an autostart file to automatically load and run both the lan-
guage system and a program.
€
4
Getting Started
Computer Operating Features
(1) Easy-to-use Keyboard. The keyboard is arranged into logical groups for your conveni-
ence: character-entry keyboard, number-entry pad, display controls, system command keys,
and program-defined keys called special function keys.
An Organized Display. The display is partitioned into defined areas for maximum
useability. One area, for example, is reserved for entering and executing keyboard com-
mands, as shown later.
Graphics Display. The display can be set to either of two modes, normal alpha or
graphics. The computer automatically sets the graphics mode under program control to dis-
play bar charts, x-y plots, etc.
Mini Disc Mass Storage. The built-in disc drive uses standard 130mm (5-1/4 inch) discs
for storing data, programs and other computer information. Each disc can hold about 1/4
million bytes (characters) of information.
Standard HP-IB Interface. A Hewlett-Packard Interface Bus (HP-1B) is built into the
computer, allowing direct connection of up to 14 compatible instruments (printers, voltmeters,
etc.). The programming language for controlling devices via the HP-IB is also built-in, allow-
ing a program to control instrumentation systems and allows you to easily direct printouts,
program listings, and displayed graphics to a printer or plotter via the bus.
(5) Expandable Memory and Interfacing. In addition to the standard HP-IB connector, the
computer has eight interfacing connectors on its backplane. Each connector can accept a
memory board (for additional user memory), a language sysem board (for the operating sys-
tem and add-on language ROMs) or an interface card. As explained in chapter 1, however,
interface cards cannot be installed in adjacent connectors.
Getting Started 2-3
Display Organization
The built-in display (CRT) has a 50-character wide by 25-line work area. The HPL language
system partitions the display into five areas:
rn |
>» Output Area
Y Blank Line
) Display Line
A Run Ind y Keyboard Area (two lines)
row un Indicator
\ } Message/Results Line
un bs A en . } Special Function Key Labels (two lines)
*
The Run Screen Format
The output area can hold 90 or more lines of information, although only 18 lines appear on
the display. Results of some keyboard and program output appear in this area. When the
18-line area is filled, the top lines scroll off into a buffer (holding) area of memory. To view
these lines, use the cursor-control keys and the cursor wheel to scroll through the page. When
the entire output area is filled, each new line entered causes a line to be lost off the top of the
buffer.
D) ce
ÓN
Output Area >» 18 Lines » 90 Lines
(user definable)
—
q >)
The Output Display Area and Buffer
The display line is reserved for instructions (prompts) from a program to the operator.
2-4 Getting Started
The keyboard area is where you enter responses to program prompts or type in commands.
Press ( CLR LN ) to clear the keyboard area. Now do a simple arithmetic problem:
Type: 98+26
Press: ( EXECUTE 98+26
The operation is first entered in 124.00 the
keyboard area. When EXECUTEd, the result 174,00
relaces the operation in the message/results
line. 1
`
Now try repeating the operation. Press (__RECALL J and (_EXECUTE J.
The results of keyboard operations always appear in the message’ results line. The results of
some keyboard commands, however, like cat (cataloging a disc), appear in the display’s out-
put area.
The special function key labels area is reserved for labels which appear when one or more
of the special function keys (k0 thru k9) are defined. A program displays these labels when the
special function keys are defined, as explained later.
The run indicator tells you what state the computer is currently in. When the indicator is
blank, the computer is free and awaiting your command.
The arrow in the left-hand corner indicates the currently set direction of the cursor wheel,
either up-and-down or left-and-right. Use the wheel with the cursor-control keys to rapidly
position the display cursor.
Graphics Mode
In addition to the normal 50-character by 24-line alpha mode, the display has a graphics
mode for presenting charts, drawings and other pictorial representations. The graphics mode
can be automatically set when a program outputs graphic data on the display. You can switch
back and forth, between graphics and alpha modes, by using the GRAPHICS and ALPHA kevs.
Getting Started 2-5
Keyboard Operations
The computer keyboard is arranged into functional groups for your convenience:
Rotary
Control Knob
Cursor _ Editing
Special Function Keys Controls Keys System Keys
р
ras - -—" е x —
0066600 000e0eeciojoooo
[9000000000090] CJ 0000
2000000000808
«3000000088 8|\C
+ 3 wann Cal
Токо | к. Нок Jl» Ir J] HET | IED vo M necau |] { to JI ame | | F sw |
+ + arses MIT GAM stor
IICA] CI efe] (FE)
ENT
0,000
0006
0880
——"
—— À, J 4 —
wv ng
Character Entry Keys Program Numeric Pad
Controls
Character Entry Keys
The character-entry keys are arranged like a typewriter, but have some added features.
SHIFT
CAPS LOCK
CTRL
(5) :
mw a
- [) [)
You can enter the standard upper-case and lower-case letters using the SHIFT key
to access the alternate case.
The CAPS LOCK key sets the unshifted keyboard to either upper case or lower case
(for normal typewriter operation). The computer displays the mode set when you
press the key.
The ENTER key has two functions: When a program is running, press ENTER to
input data requested by the program. When a progam isn’t running, the program-
mer uses ENTER to store each line of program code.
37
The TAB key is the HPL assignment operator key, >",
The CTRL (control) key works like SHIFT to access a set of standard computer-
control characters, such as line feed (':) and form feed (+). These characters are
useful to the programmer for controlling some devices and when communicating
with other computers.
2-6 Getting Started
Numeric Pad
y
0000 The numeric pad provides a convenient way to quickly enter numbers
and perform arithmetic operations. Once each arithmetic problem (ex-
0000 pression) is typed in, press the EXECUTE key to calculate and display the
result.
0000
0000
For more details and example arithmetic problems, see Arithmetic Operations later in the
chapter.
Cursor Controls
The cursor-control keys move the display cursor one space at a time. Press and
+ 3
EL
or to move the cursor to the end of the line. The and
[od —
mc keys allow you to scroll information in the displayed output area up and down.
ST The cursor wheel allows you to rapidly move the cursor up and down or
pr и back and forth, depending on the position of the little arrow in the lower-
( _) e left of the display. You can change direction by pressing the an appropri-
N. 22 ate cursor-control key, ( < ), (> Jor( 1 ),( 1 ). Another way to
a | # change direction is by pressing SHIFT while rotating the knob.
Take a few moments to move the cursor around using the keys and the wheel. Notice that the
computer automatically sets the direction of the cursor-wheel arrow after some operations.
Editing Lines
*_ The editing keys put easy character and line editing at your fingertips.
Ci re)
Sets the insert-line mode, similar to the insert-character mode. Press INS LN again to
cancel insert-line mode.
Deletes the line containing the cursor (edit mode only).
Recalls the last line entered or executed.
Sets the insert mode, allowing you to insert characters to the left of the cursor. Press
INS CHR again to cancel the insert mode.
DEL CM Deletes the character under the cursor.
Getting Started 2-7
Clears the end of the line, starting from the cursor position. Press shift-CLR—END to
clear the beginning of the line, starting with the cursor position.
CLR SCR
Clears the entire line. Press shift-CLR LN to clear the entire display screen.
[ess]
Enters the edit command, allowing the programmer to use an editing mode for
entering and editing program lines. (This is the 9825 FETCH key).
When a program is in computer memory, the program editing mode displays the
program lines and waits for the programmer to scroll through, line by line, using the
cursor wheel and cursor-control keys. Program changes are made by editing each
line and pressing ENTER.
To exit the program edit mode, press the PAUSE key. Edit mode is automatically
exited when RUN, CLR SCR, or any other operation accessing the run screen
pringing area is executed.
: aclr sgclr
o
1: psc 16iscl 1:0400,1,300sren* 1
2: csiz 6
3: for I=90 to 91
4A: for J=250 to 251
5: plt I+»J31b1 "Disrlary Program"
6: next Jinext I
7: csiz 6H
8: for I=10 to 11
9: for J=80 to 81
10: elt I,+JI:lbl "Alternate editing line"
11: next Jinext I
12: 17P
13: pens -P>P
17: 1bl "LABEL"
18: next $
19: gto 13
E ETE E
list erase
_ EC
1 0e [set
Example Display During Program Edit Mode
(Replace-Line Edit Screen)
2-8 Getting Started
next Jsnext 1
7: csiz 6
8: for I=10 to 11
9: for J=80 to 81
10
11
next Jinext I
172: 1>P
13: Pent# -P>P
17: lb] "LABEL"
18: next S
19: gto 13
plt 1,J351b1 "Display Program”
О: aclr :gclr
1: psc 1635sc1 1 400 ;1 ,3003Pen# 1
2: csiz 6
3: for I=90 to 91
4: for J=750 to 251
5:
6:
Plt I,JiIlbl "Alternate editing line"
re | y e utist l*cat |
save — [ger CEE FE erase
Example Display During Program Edit Mode
(Insert-Line Edit Screen)
An Editing Exercise
Now let's quickly type in a few lines and go back to make some corrections. To first clear the
screen, press ( SHIFT) (_CLA LN ).
Here's our first try:
Not bad, we only misspelled one word
in the first line.
Move the cursor to the extra “t” in
“editting’’ and press ( DEL CHR ) once.
The second line needs some characters
inserted. First move the cursor to the
“rin ‘‘corecting’’, press (_INS CHR ) and
insert the missing ‘‘r’. While the insert
mode is still set. insert an ‘‘s’’ after ‘a
to spell ‘‘as’’. Then press
again to cancel the insert mode.
N
Using theeditting Kers makes
corecting lines as easy à Pie,
! EET ETT CTE
Original Line
Using the editing Keys makes
correcting lines as easy as Ple,
I CEN FA CE
Corrected Line
2-10 Getting Started
hit Enters res, for the result function. When executed, returns the result of the last
Sau expression executed. For example, press ( EXECUTE J. Then enter:
23 + 45 (EXECUTE) 68.00
Now return the result to the keyboard line and add 123 to it:
+ 123 (EXECUTE 191,00
re E
Sets the printall mode on or off, allowing keyboard operations and displayed
error messages to be'copied to the system printer. Press once to set
printall ON and again to set printall OFF. Since the display is automatically set as
the system printer at power up, the printall mode can be used to log all keyboard
operations in the display's output area. Setting the system printer is explained in
chapter 4.
=" Halts program execution after the current line is executed, as is the case for the
shift- PAUSE key. To re-start the program, press RUN.
Special Function Keys
[COCCI The ten keys labeled k0 through k9 are Special Function Keys. These
may be defined and labeled by the operator as typing aids, immedi-
Lobe le Je eb Ste execute keys, or immediate continue keys. They may also be
defined from a program.
Another ten special function keys (without displayed labels) can be defined at the same time
and accessed by the SHIFT key. These shifted keys are identified as k10 through k19.
Labelled Special Function Keys
When a special function key is defined, a label can be assigned to that key as a part of the
key's definition. Key labels are displayed on the bottom two lines of the CRT, in positions
corresponding to the associated special function key.
To include a label as part of a special function key's definition, type the desired text (up to 10
characters) within quotes, followed by a colon. followed by the remainder of the key defini-
tion. Some examples will help to clarify this:
Press: (EDIT) ( к)
Type: "Label":definition
Press:
Notice that Latel is now the “soft” key label assiciated with КТ.
Getting Started 2-11
Other labelled special function key examples:
"Recover" :¥cont "Restart”
“Ahort" :%sfg303%"Set shutdown flag"
"| odE base" :/2.718B28182846
Since the computer can offer a wide selection of operations with each set of defined special
function keys, the set of key labels is often called a menu. Here's one of the menus available
with the System Test program:
~
System Test Program
rs
Revision 2-21-81
Do vou want to log errors on an external Printer”
z— ——_
Sem
[xs IN ke || ko || ka | ко |
2-12 Getting Started
Immediate Execute Special Function Keys
If a line to be stored under a special function key is preceded by an asterisk(*), it is an
immediate execute key. This means that when the key is pressed, the contents of the key are
appended to the display and the line in the display is executed automatically.
For example:
Press: (EDIT) ( kz) Accesses k3.
Type: *Prt" ", The asterisk makes this an immediate ex-
ecute key.
Press: This stores the line entered in the display
under k3
Whenever is pressed and the display is clear, the following is printed:
3.14
Immediate execute keys are useful for executing selected segments of a program. Using the
continue command followed by a line number, you can make several entry points in your
programs. For example:
(ke) :*cont 2
:*cont 10
Each time ( k ) is pressed, the program continues at line 5, or at line 10 if is pressed.
Immediate Continue Special Function Keys
If a line to be stored as a special function key is preceded by a slash (/), it is an immediate
continue key for use with the enter statement. ‘Immediate continue” means that when the
key is pressed, the contents of the key are appended to the display and continue is executed
automatically. Immediate continue keys are used to enter often used values in enter state-
ments. For example:
Press: ( EDIT ) ( kz) Fetches special function key k3
Гуре: / 2, 71828 1828406
This enters the value of e, the base of the
natural logarithms, into the display.
Press: This stores the line in the display under k3
Whenever an enter statement is waiting for a value and the key is pressed, the
approximate value for e (i.e., 2.71828182846) is entered and the program continues.
Getting Started 2-13
Keys with Multiple Statements
By separating statements with semicolons, several statements can be stored under one special
function key. As an example, suppose you want to convert inches to centimetres. The follow-
ing line is stored under special function key
Press: ( EDIT ) ( k )
Type: * Ridsp Rs "in.=",2.54R1 "cm."
Press: [ ENTER
Then key in a number, such as 6, and press (_k2 ). The display will show:
6.0011 «= 15,24 см,
I
Extended Control Special Function Keys
If a special function key definition is preceded by an EOL character (decimal 127: use the
key), it is an extended control key. This means that when the key is depressed, the
contents of the key are effectively ‘pushed’ on the keyboard. If the key definition is standard
alphanumeric characters, these are “typed” into the display. However, the key definitions can
also be control keys such as (_< J, (№ СНВ ), and (ENTER). These keys are accessed by press-
ing CTRL and the command key simultaneously. This allows you to define some very power-
ful special function keys. For example, the following key is a labeled ‘Comment’ key, useful
when editing programs:
Press: (EDIT) ( ki) Access SFK 1
Type: "Comment": Label it as a “comment” key
Press: ( SHIFT ) ( STEP) Any char of 127 is the EOL char
Type: 127
Press:: ( CTRL) (SHIFT) ED Home right
Press: ( CTRL) ( CLR-END) Take out of insert-character mode.
Press: ( CTRL) ( SHIFT) ( <=) Home left key
Press: ( CTRL) ( INS CHR ) Insert character mode
Type: %" Percent symbol, first quote
2-14 Getting Started
Press
Type:
Press
Press
(cre) (srr) (=) Home right key
и Second quote
: ( CTRL ) (ENTER) Store key
| Key Defined!
Now, any text typed on the keyboard can be entered as a comment line by pressing special
function key k1, or "Comment".
Default Special Function Keys
There are several special function keys predefined by the 9826A HPL Language system. The
meanings and use of these keys are discussed in this section. Note that although several keys
are predefined at power-up and whenever s fk (with no parameters) is executed, they may
be defined by the user at any time with the EDIT key and the stk statement.
re
* 1151
*cat
save
get
This is an immediate execute key that is appended to the FRONT of the
keyboard line which is then executed. Typically, this key would be used to
resave a program by first pressing k5 (the save key), typing in the program
name between the quotes, then pressing k1 to resave the program.
Press: Displays: save "" with insert cursor
Type: NAME Now looks like: save "NAME"
Press: Now looks like: resave "NAME"
Automatically executes resave "NAME"
This is an immediate execute key that list the program in memory to
the current system printer.
This is an immediate execute key that catalogs the system disc (set by
msi or drive) to the current system printer.
(ls) This is a typing-aid key that displays save™" on the keyboard line,
with an insert cursor between the quotes. The file name of the program to be
saved is then typed (and goes between the quotes). When EXECUTE is pressed,
the program in memory is saved to the current system disc drive (set by msi or
drive).
This is a typing-aid key that displays get" " on the keyboard line, with
an insert cursor between the quotes. The file name of the program to be
loaded is then typed (and goes between the quotes). When EXECUTE is pressed,
the specified program is loaded into memory (it one exists on the disc).
Getting Started 2-15
ms i This is a typing-aid key that displays msi" :" on the keyboard line,
with an insert cursor between the colon and the second quote. The mass stor-
~ age unit specifier is then typed (and goes between the colon and the quote).
When EXECUTE is pressed, the disc specified becomes the system mass storage
device.
list This is a typing-aid key that displays 1ist on the keyboard line. Its
use is essentially the same as the LIST key was on the 9825A. |
erase This is a typing-aid key that displays e rase on the keyboard line. Its
use is essentially the same as the ERASE key was on the 9825A.
Program Control Keys
The PAUSE, RUN, CONTINUE and CLR 1/0 keys allow you to control execution of the program
stored in the computer's memory.
Starts program execution from the beginning.
Pauses program execution after the current line, returning computer control to
the keyboard.
PAUSE
Resumes program execution from where it was paused, or enters data for an
active ent or enp statement. |
CONTINUE
= Stops program execution immediately without erasing the program or data mem-
tit [J or The HPL READY message indicates that the computer is ready for your
command. This is the equivalent of the 9825 RESET key
shift- [==] Stops program execution after the current line, as by pressing the PAUSE key.
2-16 Getting Started
Arithmetic Operations
The arithmetic operators are located within the numeric keypad. Their operations are listed in
the arithmetic hierarchy of HPL.
V Square root
“ Exponeniation
no operator
À /
Implied multiplication
/ Multiplication and division
+ — Addition and subtraction
If you prefer, you can also use the same characters found within the typewriter keyboard.
To perform arithmetic operations, first clear the display's “keyboard” area by pressing
(CLR IN ). Then simply type-in the problem and press [ EXECUTE ). Try these examples:
First. how many characters can be entered into the computer s complete 50-character wide by
18-wide by 5-page alpha-display area?
Enter: 50*+18x5
Press: | EXECUTE |
\_
=.
. *
a
Co
D0*18*%*%5
4500,00 (characters)
msi
If you spend 3% of your time today reading this manual, how much of your eight-hour
workday is left for work?
Enter: 8-8*, 03
Press:
8-8*,03
7.76 (hours left)
| CETTE est ri
If the floor in your office is square, with each side measuring 6.2 metres, how many square
metres of carpeting are needed to cover it? You can either multiply 6.2 * 6.2, or you can find
the square of 6.2 by raising it to the second power (6.2 2):
Enter: 6.2°2
Getting Started 2-17
Notice, in each case, that the computer displays the result in the line below where you entered
the problem. This allows you to either recall the problem (press ( RECALL )) and compare it
with the result, or recall the result (press (_ RESULT J) and use it as part of another problem. For
example:
Enter: 98+ 26 | EXECUTE 124,00
Enter: 25% ( RESULT 25%res
Press: { EXECUTE | 3100,00
Enter { RESULT | / 37 res/37
Press: ( EXECUTE 83.78
I
N
2-18 Getting Started
Getting Started
Please notice that this is only a practice exercise. You can't EXECUTE or ENTER the lines; the
computer wouldn't recognize them as either a command or a program line. It would, howev-
er, beep and display an error message. Go ahead and try it: it won't be the last time you ll
hear that beep!
System Control Keys
IR ee ol The keys in the upper-right corner control various system functions re-
[om PO nova || onammos || sree | . . … ,
lated to the display, printer and editing operations. Most of these keys
Creams] execute their functions immediately, as the key is pressed.
Enters the edit command. The programmer uses the edit mode when entering
and editing programs.
sw Sets a display-functions mode, allowing you to see special control characters such
shit- [= as line feed (If) and carriage return (cr) in the display output area. Press shift-EDIT
again to cancel the display-functions mode. A complete set of display-functions
characters is shown in the ASCII table at the back of this manual.
These keys allow you to view either one or both of the display modes, normal
alpha or graphics. For example, if a program sets the graphics mode and outputs
a graphics display, you can return to the alpha mode by pressing ALPHA. You can
later return to the graphics mode by pressing GRAPHICS.
Pressing ALPHA or GRAPHICS once sets that mode but doesn't reset the other
mode. Pressing the key a second time resets the other mode. So you can view
both display modes simultaneously if you wish.
2% Enters the adump command. Pressing EXECUTE causes the complete alpha dis-
shift- play to be output to the current prtsc device. See chapter 4 for details.
ww Enters the gdump command. Pressing EXECUTE causes the graphics display to be
shift- output to the current prtsc device. See chapter 4 for details.
Allows the programmer to step through a program, one line at a time. Using STEP
to debug programs is covered in the 9825 Operating Programming Reference
manual.
m Shows each available display character. First press shift-STEP. Then enter any
shift: [=~] three-digit number from 000 thru 255. The computer automatically displays the
equivalent character. The programmer uses this function when developing prog-
rams. A table of characters and their decimal values is in the ASCII table at the
back of this manual.
Clears the display input line and the message/result line.
| еб (Clears the entire alpha display, including the input line and the scrolling buffer,
shift: [=x | and turns on key labels.
2-9
3-1
Chapter 3
Program Transfer
Introduction
This section ddresses a major concern of 9825 owners and programmers, namely, how to get
9825 programs and data into the 9826. There are two approaches possible: one, simply save
the. 9825 programs and data on a 9885 or 9895 disc, then reconnect the disc drive to the
9826 Computer and read the programs and data in. This approach is a natural for those users
already using the disc extensively. The second approach uses I/O to transfer programs and
data, and requires a bit more coordination between the two computers (and work on your
part). The best interface to use to avoid complications from losing data is the HP-IB interface,
which is internal to the 9826 and is the 98034 interface card for the 9825.
Disc Transfer
The 9885 and 9895 discs offer the simplest means of transferring programs and data from the
9825 to the 9826 (and vice-versa, if desired). In addition, disc file transfers offer the only
method of transferring key files from the 9825 to the 9826. Once the disc drive is installed on
the 9826, the same commands that were used on the 9825 can be used on the 9826. For
example, to load a 9825 program ‘‘Progl’ into the 9826 (from a 9885 disc, unit number 0 at
select code 8), the following statements could be used:
drive 08
det "Progl"
The above sequence can be shortened by using the new mass storage unit specifier (msus)
available on the 9826:
det "Progl:F8 +0"
Disc data files can be accessed from the 9826 in the same manner as from the 9825, using the
same program statements. One additional statement may need to be added to your programs
if they assume default drive parameters of unit number 0, select code 8. On the 9826, to
access an external disc drive (9885 or 9895), a drive or msi statement must be executed
explicitly stating the unit number and select code of the disc drive. (The default drive on the
9826 is the internal minifloppy.)
There are additional disc programing capabilities offered by the 9826: vou may wish to refer
to Chapter 4 of this manual for specific details of the 9826 disc programming enhancements.
3-2 Program Transfer
Interface Transfer
Interface transfers offer a means of getting programs and data from a tape-based 9825 system
into the 9826. The concept is fairly straightforward, and there are just a few minor details to
take care of to implement the transfer. To keep matters simple, the example presented
assumes an HP-IB interface for the transfer operation.
Programs
The actual operation is a simple 1ist # 731 of the program from the 9825, and a short
program on the 9826 that reads in the program and stores it into 9826 memory. You then
save the program on the internal minifloppy disc drive of the 9826.
The first step of the process is to connect the two desktops together and power them up. The
9825 requires the 98034 interface, which is connected to the built-in HP-IB interface of the
9826. The 98034 is assumed here to be set at factory default switch settings: most importantly
System Controller and bus address 21.
From the 9825, execute pct 731 to pass controller functions to a non-existent bus device.
This makes disassembly and reassembly of the 98034 unnecessary.
Now from the 9826 execute wtc 7 »30 to change the bus address of the 9826 so there won't
be a conflict with the 9825's bus address. (Both have bus addresses of 21, unless the hard-
ware switch settings from the factory have been changed.)
On the 9825, load in the desired program (for example, t rk1 31 df8).
the 9826, RUN the following program:
"Loader" :dim AS[LB5)irnal>N:721>25
o
(E
1: "inpPut":redS,Atsif len(A%)<=239t0 "input"
2: 1f A$S$[1,1]="x"ig9to "done"
3: "store":on err "error"isstore A%snal
d: gto "input"
5: "error": "42 "RAB>A$1dgto "store"
6: "done":red S,A$,A$,AS:sral>
7: Prt "Record the program on the desired track and file"
В: prt "(or file name), from line N through line X."
9: prt "For examples 'trkKlircf В ,‚М,‚Х’, Then delete the"
10: prt "old program and re-run this Program for the”
11: prt "next Program to be transferred," ifxd O
12: Prt "To delete the saved Programs use "del" Ns, "0," "7"
13: end
#17613
On the 9825. execute 1ist #731. The 9825 program is now transferred to the 9826.
Program Transfer 3-3
Data
Now that you have seen the program transfer process, you must consider the data transfer
process. The machine set-up for data transfers is identical to that used to transfer programs,
but now you need a program in each machine. The programs must be specifically tailored for
the particular data files to be transferred. A simple example here will illustrate the concept.
The task is to transfer ten 3000 character string files from the 9825 tape to the 9826 internal
disc. The string files will be saved as tape files on the 9826 disc for maximum simplicity.
9825 Program
O: dim A$S[L3000];% "This line changes according to your own data structure"
1: trk 135for I=0 to 03% "Again, modify according to your data structure"
2: 1Af I,A$tswrt 731 »sA$
3: rext Isprt "Transfer complete. "send
9826 Program
+
O: dim A$S[3000];% "This line must be identical to the 9825 program line O"
1: trk 13for I=0 to O3Z "Adaln: this must agree with 9825 Program above"
2: red 721,A$ircf I.,A$:% "This line is the only one different"
3: next Iiprt "Transfer complete." serd
Both programs are essentially the same except that line 2 of each is suited to the particular
function that is being performed: the 9825 is taking data from the tape and sending it to the
9826: the 9826 is reading in the data from the 9825 and saving it on the disc.
3-4 Program Transfer
4-1
Chapter 4
9826 HPL Programming
Introduction
This section summarizes the enhancements and differences between the 9826 HPL operating
system and the 9825. Organization is presented by 9825 ROM function so that you can easily
understand new material in relationship to the 9825.
4-2 9826 HPL Programming
Mainframe Programming
The Read, Data, and Restore Statements
To assign constant values to string and numeric program variables, the data and read
statements can be used.
dat a string or numeric constant | »string or numeric constant]...
re ad variable name [ svariable name]...
rst r [label]
The data statement provides string and numeric constant values to be assigned to program
variables. String constants may be quoted or unquoted. Each constant is separated from the
next by a comma. The read statement assigns the constants provided by data statements to
variables in the read statement variable list. one constant per variable. As each constant is
read from the data list, the data pointer is positioned to the next constant in the data list. This
data pointer can be reset either to the first data statement occurring in the program or to the
specified line label by using the restore statement, rst r. A short example will help clarify this
concept:
О: dim ASEO]
1: data 100,"item 1",200,"item 2" ,300," item 3"
2: "line ?":data A400,"item 4" , 500,"item 5" 600:"1tem 6"
3: data 700,"item 7" ,B00,"item 8" , 9g0O0,"item Y"
4: for I=1 to Isread X:+:A$iPrt K.A$
S: if I=Girstr "line 2"
6: next Iiend
100.00 item 1
200,00 item 2
300,00 item 3
400,00 item 4
300.00 item 5
600,00 item 6
400,00 item 4
500,00 item 5
500.00 item 6
Note that after the sixth data item pair was read, the rstr statement was used to reset the data
pointer to "line 2", data item 4. If line 5 of the program is changed to
5: 1f I=Girstr
the printout looks like this:
100,00 item 1
200,00 1tem CZ
300,00 1tem 3
400,00 1tem 4
00,00 1tem >
600,00 item 6
100,00 item |
200,00 item £
300,00 1tem 3
The data pointer was reset all the way back to the first line of the program. which meant that
the next data item read was data item 1 on line 1.
9826 HPL Programming 4-3
The Programmable Beep Statement (O&P p.3-16)
Pbeer [frequency[ »duration]]
This statement drives the internal beeper with a programmable frequency and duration.
Allowable frequencies range from 0 Hz through 5167 Hz. The frequency is taken as a mod-
ulus of 81.23 Hz, which means it is ‘rounded’ to the nearest multiple of 81.23 Hz. Allowable
durations range from O through 2.56 seconds. The number of seconds duration is rounded to
the nearest hundredth of a second, (.01 sec).
CRT Display Control (O&P p. 3-16)
The Clear Alpha Statement
acl r[number of scrolling pages]
The acl r statement clears the alpha screen and optionally assigns the number of scrolling
pages for the scrolling buffer. If not specified, the number of scrolling pages selected is left
unchanged from the previous value (four at power-up). Each page is 18 lines of 50 characters
and uses 900 bytes of read-write memory. The following program line sizes the scrolling
buffer according to the amount of memory remaining, leaving enough room (1800 bytes or
more) for most stack operations. Remember, large string operations require that enough
memory be available for the operation!
aclrint (avm/900)-2
The graphics screen is not affected by aclr, key labels are caused to be displayed, the Run
screen format of the CRT is selected (as opposed to the Edit screen), and Display Functions is
turned off when aclr is executed.
The Alpha On, Alpha Off Statements
aoff
aon
The ao ff statement turns off the alpha display without affecting the contents of alpha mem-
ory. When an aon statement is executed, the alpha screen is displayed. All screen operations
(prt, dsp) function normally whether the display is turned on or off. Key labels (SFK labels)
are not affected - see the K1of f and Klon statements.
( -4 9826 HPL Programming
The Key Labels On/Off Statements
Kloff
Klon
The k1of f statement turns off the display of special function key labels. The contents of the
labels are not affected, so that executing a Klon statement causes the original labels to be
displayed. (Note that the sf K statement - Systems Programming - can be used to define
SFK's labels from a program.)
The Dump Alpha Statement
adumrlselect code or buffer[ snumber of lines]]
The adump statement sends the specified number of alpha display lines to the desired select
code or buffer. If no parameters are specified, the first 18 lines of the alpha screen are sent to
the system printer (prt sc device). *
The Tab X-Y Statement
tabxy column row
The takx» statement directs CRT printing (and reading!) operations to the character and
line position of the screen as specified by the “column’’ (character) and ‘‘row’’(line) para-
meters. The column parameter must be within the range of 0 through 49. The row parameter
should be within the range of O through 17. Specifying row greater than 17 causes the row
parameter to be truncated to 17 (you cannot tab below the bottom of the screen).
The Read CRT Statements
red 16[.format number] + variable list
rdb ( 16 )— variable
Data can be read from the CRT in much the same manner as from an external device. Data is
taken from the CRT at the present cursor position and assigned to variables in the variable list
according to any formatting in effect. Read binary (rdb) operations from the CRT operate in
the same manner as for external devices.
Note
There are no “hidden” control characters on the screen. Unless
“Display Functions’ is on. control characters such as carriage-
return and line-feed are not part of the CRT data. Also, reading
past the end of scrolling memory simply returns blanks (decimal
32).
9826 HPL Programming 4-5
The System Printer Select Code Statement
Prtsc select code or buffer swidth]
This statement directs all print operations to the specified select code or buffer. This affects
statements such as prt, tlist, arrt, spc, 1istk, cat, list, and also directs PRINT
ALL messages. The optional “width” parameter determines the number of characters to be
printed before a carriage-return/line-feed is sent by the aPrt and listK statements. Power-
up default for Prtsc is to the 9826 CRT, width = 50. (No, executing Prtsc 1680 will
not cause 80 character lines to be displayed on the CRT, and Prtsc 16 +16 will not emulate
the 9825 strip printer!)
Math Functions (O&P p. 3-22)
«
s q r expression
Returns the square root of a non-negative expression. Identical to the VV operator.
P1
Returns the value of pi (7). Identical to the function.
Flags (O&P p. 3-28)
There are 32 program flags available, numbered O through 31. Flags O through 15 are ident-
ical to 9825 program flags, with special meanings for flags 13, 14, and 15. Flags 16 through
31 are strictly user program flags, not affected by the system.
The Cross Reference Statement (O&P p. 4-32)
The x ref statement now lists references to p-numbers.
4-6 9826 HPL Programming
Tape Cartridge Operations (O&P chapter 5)
A program utilizing tape cartridge mass storage operations will in general be able to run un-
modified on a 9826 HPL operating system. However, do not try to insert your tape cartridge
into the disc drive!
The actual method used to implement tape operations on a disc is to create files on the disc
that correspond to 9825 marked tape files. This is done automatically by the operating sys-
tem: you don’t have to worry about how to do it. However, this has some implications that
you should be aware of.
e You can do tape operations to any disc drive supported by 9826 HPL: 9885, 9895,
8290x, and the internal minifloppy drive. Tape operations are directed to the current disc
drive, set by drive or msi (see Disc Programming).
e The files accessed by the tape statements are more or less ordinary disc files which have
been named according to a special convention. This convention was established so that
given a track number and file number, the file name is uniquely defined. The convention
15:
TxF yyy
where x is a single-digit track number, 0 or 1 and y is a three-digit file number, 000 to
999. An example tape file name, track O file 15 is:
TOFO15
e Three new disc file types have been created to allow tape statement emulation. These
new types are:
NULL (tape file-type 0): file with current size of Ô
NBDATA (tape file-type 2): file with numeric data
SBDATA (tape file-type 3): file with string or mixed data
e The mrk and ert statements do not initialize the disc media, rather they simply create and
purge disc files on an initialized disc. Therefore, an uninitialized disc must first be initial-
ized (with an init statement) before the tape files can be marked.
e The format for a tlist printout has been modified to take advantage of the new 50 charac-
ter line width of the CRT. A tlist now indicates the secured/unsecured status (scd) of the
program, and the file type is now listed as a mnemonic rather than a number.
9826 HPL Programming 4-7
Track# Secured Program Current msi Device
indicator
trk 1 msi "1,0"
file sed trre (2%) cur_size abs-_size
ARS + PROGRM (6) 432 212
Files #1 KEYS (5) 46 256
* NBDATA (2) 304 =
* 3 NULL (О) 0 О
File Type Mnemonic File Type Number Current File Size Absolute File Size
(same as value returned by idf) (bytes) (bytes)
e Disc files are always sized as a multiple of 256 bytes per record. Thus, any tape file will
necessarily have to be rqunded up to a multiple of 256 bytes, even if you specity it to be
less. (For instance, although you executed “mrk 1,50”, you actually got one file of 256
bytes.)
e Due to the increased memory size of the 9826, recording strings (ref N:A%) requires
two extra bytes overhead per string on a file. Usually, this will cause no problem for an
old 9825 program being run on a 9826. because all files on the 9826 are rounded up to
a multiple of 256 bytes.
eAtlist will list only tape files of the tape file-name convention, and they will be listed
in order by file number, regardless of their order in the disc directory.
eA cat (catalog) of the disc will list both tape files and disc files. The order of the file
names in the directory is unimportant. Both tape and disc files are allowed on the same
disc.
e Auto-verify (avd, ave) affects only tape statements, as expected. Verify (von, voff) affects
only disc statements. Defaults at power-on, reset, and erase a, are ave and voff. These
are identical to the 9825 defaults.
e Record and load memory (rem, ldm) are not implemented on the 9826. (Imagine rem on
a 4 megabyte machine!)
e Disc statements can access files created with tape statements (mrk) and tape statements
can access files created with disc statements provided they conform to the tape file-name
conventions listed above.
Note
It is highly recommended that only tape statements be used to ac-
cess tape files and only disc statements be used to access disc files!
There are a number of subtle points affecting file access that must
be considered, as described above. If you wish to mix statement
and file types between tape and disc operations, it is suggested that
you do so on non-critical data at first. until you feel confident that
you understand the interactions! Refer to the discussion on “Binary
Data File Support’ in the “Disc Programming Technical Appendix’
at the back of this manual for more details on tape files on disc.
4-8 9826 HPL Programming
Record Binary Statement
rcb file number
The record binary statement stores the binary program in memory onto the specified tape file.
The file number is any numeric expression, and if ommitted file O is assumed.
String Variables
Value Function (O&P p. 6-17)
val (string expression| »base] )
By specifying an optional second parameter “base”, string expressions representing numbers
of any base (2 thru 36 inclusive) can be converted to base 10.
String Function (O&P p. 6-19)
str {numeric expression| sbase])
By specifying an optional second parameter, ‘’base’’, numeric expressions can be converted
from base 10 to a string expression representing a number in any other base (2 thru 36
inclusive).
Examples: val ( "FF" ,16)——A A = 255
str(10,2)—A$ A$ = “1010”
Read Statement (O&P p. 6-32)
The general I/O red statement now allows substrings as data destination variables.
Example: red3,B$[ 15,250]
9826 HPL Programming 4-9
Systems Programming
Intelligent Terminal Instructions (O&P p.7-7)
Additional capabilities for program emulation of intelligent terminals are provided by the 9826
HPL Language system. In addition to program response to keypresses, the program can also
respond to rotation of the Rotary Control Knob.
The On Knob Statement
on Knob [label}]
Kret
This statement zeroes the knob-count, then enables program interrupts from the Rotary Con-
trol Knob. Whenever the knob is rotated, the knob-count accumulates at a rate of 120 units
per revolution and an end-of-line branch to the on-knob service routine is taken. The
accumulated knob-count can be accessed via the Knob function, which indicates both direc-
tion and amount of rotation. The on-knob service routine can also access the status of the
CTRL ) and (SHIFT) keys (for shifted-knob and control-knob functions) via the ks tat function.
The on-knob service routine exits with the K re t statement, which returns control back to the
main program.
The Knob Function
Knob
The knob function returns the accumulated RPG, or knob, count, indicating both direction
and degree of rotation. The knob count is approximately 120 units per revolution, or three
degrees per unit count. This is an approximate count, suitable for relative positioning informa-
tion only. (Counts may be missed when the knob is spun very rapidly.)
Negative values for knot indicate clockwise rotation. Positive values for knot indicate coun-
ter-clockwise rotation.
4-10 9826 HPL Programming
The Knob Status Function
kstat
The Kstat function returns an 8-bit knob status. This is a self-zeroing function that zeroes
when read and is set when an on-knob end-of-line branch is taken.
The meanings assigned to Kstat bits are as follows:
Most Significant Bit Least Significant Bit
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit O
1 1 Control Shift 0 0 0 0
Value = 128| Value = 64 | Value = 32 | Value = 16 | Value = 8 Value = 4 Value = 2 Value = 1
Bits 0-3: Always zero
Bit 4: Zero if is pressed
Bit 5: Zero if is pressed
Bit 6: Always one.
Bit 7: Always one
The kst at function is useful in determining whether the user is pressing the (SHIFT) or the
CTRL) key while rotating the knob. Your program could then perform an alternate function
for the knob's rotation.
The Key Buffer Empty Function
Key
The key function is essentially unchanged from the 9825 Ke” function, in that it returns
unprocessed keycodes. The Kev function now returns 9826 hardware key codes, but the
asc function can be used to obtain the ASCII codes for keys. These ASCII keycodes are
identical for both computers. For example, the hardware keycode for “5” on the 9825
numeric keypad is 83 while on the 9826 the same key has a code of 2885. On both compu-
ters however, the ASCII code is 53.
your programs depend on the 9825 hardware keycodes, they will have to be converted to
function correctly with the new 9826 keycodes. Refer to the Keycode Conversion Table for
the corresponding values of 9825 and 9826 keys, or you can use the keycode conversion
utility function “9825 key” to achieve program compatibility.
9826 HPL Programming 4-11
Serial Interface Control (O&P p. 7-14)
The Remote Keyboard Statement
rkbd select code [ »type]
The 9826 rkbd statement operates in an identical fashion to the 9825 rKbd statement
except that the type 0 remote keyboard now requires 9826 keycodes. Note that the type 1
remote keyboard (ASCII) operates the same for both machines.
For power-up remote keyboard operations, there is a jumper on the 98626A Interface that
must be cut (as with the 98036A). Refer to the 98626A interface diagram in the appendix to
this manual for the location of the remote keyboard jumper.
The Press Keyboard Statement
p Kb d[string expression].
The press-keyboard statement effectively ‘pushes’ keys on the keyboard, exactly as if the
human operator were pressing those keys. System control keys are pressed by putting their
ASCII value in the press-key string. For example, a decimal 10 character (line-feed) is the
character for the EXECUTE key, and has the effect of executing previous characers in the string.
The statement
PKbd "S*2Le" results in a display of 10,00.
The Pkbd statement has several potential uses. One use is to give the user “live keyboard”
capability even though a running program has an “on key” service in effect. Now, instead of
having to write a complete interpreter within the program to implement “live keyboard,” the
program merely has to PKbd those ASCII keycodes that need to be executed by the system.
For example, to emulate a full live keyboard with a running program:
О: on Key "suc" Set up service routine
1: 410 +0 Гоор
2: "syc":1f not (asc Kev>K)jiKret Test for and exit if empty buffer
3: if K#1iPkbd char(K)ikret Else “push” key and exit unless
d: end PAUSE key was pressed: stop.
*3629
4-12 9826 HPL Programming
The Define SFK Statement
s f Kk [key number| »definition string| +label string}]]
The sf K statement allows special function keys to be defined from a program. Keys can be
labelled with the optional label string, and defined to be any valid key sequence with the
optional definition string.
sfk 9 erases the definition for SFK#9
s fk erases all key definitions; replaces them with their de-
fault settings
sfK By "wrt 705," defines key #8 to be the string “‘wrt 705.”
sFfK3 "HELLO JIM" »"LOGON" defines key #3 to be labelled a log-on key sequence
for a terminal emulator
The length of the definition string plus the label string must not exceed 77 characters. Specify-
ing a definition string only (with no label string) allows 80 characters of definition.
The ASCII value of special function keys on the keyboard range from 128 (k0) through 160
(k19). and can be defined by the program using sf K and ‘‘pressed’’ by the program using
PKbd. The following example extends the live keyboard emulator to allow you to type con-
trol characters on the keyboard (CTRL A for example) and not have them be executed as
control keys. With the previous example, CTRL A effectively executed a PAUSE. With this exam-
ple, an ASCII “+” character is displayed, just as if there were no program running.
® pkbd char(K)ikret
. end
O: on Key "suc"
1: gto |
2: "suc”":asc (key>A)>kK
3: if bit(9,A)=0 and K<323sfk 31lorchar(K)isekbd char(159)5kret
4
5
9826 HPL Programming 4-13
Systems Programming Instructions (O&P p. 7-21)
The System Boot Statement
sysboot ["file name"]
The sysboot statement allows you to “boot” or start up any ROM or soft operating system,
including a re-booting of the current system. Omitting the file name parameter causes the
current operating system to be reloaded and initialized.
Specifying a file name of one character followed by a null character (ANY CHR of 000) will
cause the soft system file name "SYSTEM_x" to be booted from the internal minifloppy, if
the system file is present. (The character “YX” of the system file name is the same character
specified in the srsboot statement.) If no disc is present with the "SYSTEM. file on it, the
ROM operating system “x” will be booted and initialized.
Example: sY stoot "Bula. Boot BASIC ROM language system (if BASIC soft
(null system is not present)
syshoot "SYSTEM_B" Boot BASIC soft system
Matrix Programming
Array Output (Matrix p.8)
ap rt array variable[ sarray variable]...
The array print statement prints the elements of an array to the system printer. The rightmost
subscript now increments most rapidly. This is different from array prints for the 9825, which
incremented the leftmost subscript most rapidly. In addition, ap rt now utilizes the full width
of the printer to print the array: the printed array is no longer formatted as if it were being
printed to the 9825's strip printer.
4-14 9826 HPL Programming
Disc Programming
In general, disc operations on the 9826 operate identically to 9825 disc operations. However,
there are some optional extensions to the Disc Programming Syntax that allow you to access
some additional disc drive types and some new capabilities (such as having different file poin-
ters on different disc controllers, and accessing tape files on disc).
If you are familiar with disc programming, reading this section should give you enough in-
formation to utilize the new 9826 disc programming capabilities. If you should need more
information about performance or implementation, refer to the Disc Programming Technical
Appendix at the back of this manual.
If you are not familiar with disc programming, you should first read the 9825 Disc Program-
ming Manual, then refer to this section for information regarding the extensions made to 9826
disc programming.
The Mass Storage Unit Specifier
A mass storage unit specifier, or msus, is a string expression giving a formal description of the
mass storage device being accessed:
1. The device and format being used;
2. The device select code (and bus address, if applicable);
3. The device unit number.
The following table summarizes mass storage unit specifier parameters.
Device Format Table
Device Disc Type Disc Format Select Code HP-IB Default Unit Number
Format Range Address Select Code Range
Specifier Range Value
| Internal LIF! - - - 0
M 8290x LIF 1-15 0-7 700 0-3
F 9885 9825 Compatible 1-15(not 7) - 8 0-3
G 9885 LIF 1-15(not 7) - 8 0-3
H 9895 9825 Compatible 1-15 0-7 707 0-3
J 9895 LIF’ 1-15 0-7 707 0-3
1 LIF: Hewlett-Packard Logical Interchange Format: File type ASCII is compatible with 9826 BASIC language ASCII files and with HP 2642A
Terminal files
9826 HPL Programming 4-15
The format for a mass storage unit specifier (msus) is
: [device format [select code]] [ »unit number]
Normally, only the device format need be given. Each device format specifier has a default
select code and unit number. However, certain critical statements require you to specify all
the msus parameters due to the potentially destructive effect of those statements (init,
killall and disc cor»).
The select code parameter must consist of 1 to 4 digits only. The unit number parameter must
consist of a single digit only. Plus or minus signs, periods, or “e” are not allowed. This means
that if functions such as the str function are used to generate the desired string expression,
fxd0 or equivalent must be in effect. ’
Note that when specifying the internal drive as the mass storage device, there is no associated
select code, so that parameter is omitted. Some examples help clarify the msus concept:
:FB 0 Specifies 9885 disc, 9825-compatible format, select code 8, unit number O.
: 1 Specifies internal disc drive.
+ J707 ‚2 Specifies 9895 disc, LIF format, select code 707, unit number 2.
tH 3 Specifies 9895 disc, 9825-compatible format, default select code for “H”,
unit number 3.
Specifies current device format and select code, unit number 2.
The msus is allowed as an extension to a file name parameter as shown in the following
examples:
asdn "Datal:H707 +3" 1
asgn "DataZ:I" »2
kill "OldProg:FB +1"
All disc programming statements except the files statement that use the “file name” para-
meter can now use the “msus’’ parameter appended to the file name.
4-16 9826 HPL Programming
The Mass Storage Is Statement
There is a new statement, msi, added to the Disc Programming Syntax to allow you to
specify the current mass storage device (as was accomplished with the d rive statement on
the 9825) with a mass storage unit specifier (msus). This allows access not only to 9825-
compatible discs, but also to LIF discs. The syntax is:
ms i[msus]
where msus can be any suitable string expression that conforms to the format already defined.
Executing msi with a specified msus will set the value of the current default msus (current
drive and format). That value will remain in effect until it is explicitly changed with another
msi or drive statement, or until a power-up, reset, or erase a Occurs.
Executing ‘msi with no parameter will restore the power-up default msus of ": 1" for the
internal minifloppy.
Some examples of the msi statement follow:
msi Restore power-up default (":I" for internal
drive)
fxd05":J"—M$ 3; 707535 2—U Set mass storage device to 9895 disc select code
msi M$RSstr(5)8" ,"Rstr(U) 707, unit number two, LIF format.
The Assign Statement (Disc Programming p. 3-5)
as gn file name » file number [ »unit number [ »return variable]]
The assign statement has been extended to allow you to include the msus with the file name
in order to completely define the characteristics of the file and drive. When the msus exten-
sion is being used and the return variable is given in order to obtain file status, you can specify
a “unit number’ of -1 which prevents overriding the msus unit number. This becomes, in
effect, a “place holder” in the parameter list. An example illustrates this:
asgn "Datafile:H701 »3" 36 +-1 »A
This assigns file number 6 to file “Datafile” on a 9895 disc, 9825-compatible format, control-
ler address 701, unit number 3. The -1 unit number is a place holder, and X is the return
variable for the file status.
asgn "Datafile:H701 3" 16 +0 4%
This statement has all the same effects as the one above, except that now unit number O is
selected, overriding the msus unit number of 3.
9826 HPL Programming 4-17
The Drive Statement (Disc Programming p.1-14)
The drive statement is essentially unchanged from its 9825 definition except that file pointers
are no longer cleared if the select code is specified. However, the select code range for a 9885
disc is now 1-6 and 8-15. (Select code 7 is reserved for the internal HP-IB.) Note that you
cannot direct disc operations to an LIF format disc by using the drive statement. The drive
statement can be used to change just the current unit number leaving other specifications
unchanged. This can be done regardless of the current device format in effect, even if it is an
LIF disc.
The Initialize Statement (Disc Programming p.4-3)
init unit number + select code [ interleave factor]
or
init complete msus [ sinterleave factor[ snumber of directory records]
The initialize statement can be used as a strictly 9825-compatible statement as shown in the
first syntax. Only 9885 and 9895 discs of 9825-compatible formats (F and H formats) can be
initialized when the first syntax version of init is used.
The second syntax shown for the init statement allows the complete range of 9826 HPL
supported discs and formats to be specified, as per the “msus” specifier.
With either version of the init statement, the complete disc drive msus specifications MUST
be given. This information is always printed on the first line of a catalog listing of a disc for
future reference.
Allowable interleave factors are 1-15 for 5-1/4" minifloppy discs, and 1-29 for 8" discs. The
default interleave factor for a given disc drive yields the best performance possible under a
wide range of conditions. However, in certain cases,you can increase the performance of the
disc system by specifying a different interleave factor (but if you go below the recommended
minimum, extremely poor performance may result!). Some of the cases where better perform-
ance may be obtained by specifying a smaller interleave factor are:
e Using a DMA card with a 9895 disc drive to obtain better HP-IB transfer rates.
e Using a disc primarily for backup purposes, and autoverification is disabled (voff).
e Using a disc primarily for tape operations, and autoverification is disabled (avd).
e NOT using a disc for large numeric array or large string transfers to TDATA or ASCII file
types.
e NOT using a disc for large numbers of random accesses to consecutive records of a
TDATA type file.
4-18 9826 HPL Programming
Disc Interleave Factors
Disc Drive Default Overall Optimum | Suggested Minimum
Interleave Factor | Interleave Factor Interleave Factor'?
Internal 2 2 1
8290x 5 5 3
9885 2 2 1
9895 no DMA 4 4 3
9895 with DMA 4 3 2
You can now specify on a LIF disc the number of records used to hold the directory. Each
directory record can hold up to 8 directory entries. The default number of directory records
for minifloppies (5% inch) is 14, or 112 entries. The default for 8 inch floppies is 28 records,
or 224 entries.
Those records not used for directory entries are available for programs and data. Depending
upon your application, you can trade off directory records for data records or vice-versa. If
you have a great number of small data files, for instance, you may need more than the default
number of directory records to hold a greater number of directory entries. You can specify
from 1 to 500 records for the directory depending upon your needs. Normally, the default
number of directory records will suffice.
The following table suggests some practical guidelines for selecting a maximum number of
directory records per disc type to allow one directory entry for each sector (256 bytes). (This
configuration would be necessary if a data disc needed a maximum number of files of 256
bytes or less.)
Maximum Practical Number of Directory
Records for LIF Discs
Media # of directory # of directory # of user records
records entries
Minifloppy 118 944 936
9885 210 1680 1678
9895 sgl sided 244 1952 1944
9895 dbl sided 500 4000 3998
Both the default interleave factor and default number of directory records can be selected by
specifying a parameter of — 1 in the parameter position. For example,
init ":J707 30" +—-1 ,-1
1 See considerations listed above Also. if an internal disc is used primarily as a system disc. the suggested minimum interleave factor may be
used
2 The suggested minimum interleave factor yields the optimum performance obtainable for a given disc. under optimum conditions. This
must usually be arrived at experimentaliy. as different programs and access requirements may need larger interleave factors to attain
maximum performance.
9826 HPL Programming 4-19
The Disc Type Function (Disc Programming p. 1-15)
dtvype
The dtype function now returns a value of 9 for either the internal minifloppy or external
8290x minifloppy drives. However, the open drive door status returned by dtype is different
for the two drives.
Internal drive: status check indicates “disc changed” but not “door open” or “disc present”.
A value of 1 is never returned, and values of 2 and 9 do not guarantee that
the door is now closed and disc is present.
8990x drive: status check does not indicate a condition of “door opened”, so a value of 2
; is never returned.
4-20 9826 HPL Programming
The Catalog Statement (Disc Programming, p. 1-16)
9826 HPL supports 3 new file types on 9825-compatible discs. All three are related to 9825
tape statement emulation. The same file types are also supported on LIF discs. The file type
mnemonics used in 9825-format disc catalog listings for these new files are:
Z (NULL) null file - 9825 tape file type O
N (NBDATA) numeric binary data - 9825 tape file type 2
S (SBDATA) string/mixed binary data - 9825 tape file type 3
The catalog listing format for 9825-compatible discs is identical to that of the 9825/98228
ROM combination. Old 9825 programs which do cat's to buffers to access the catalog in-
formation should have no problem doing the same with 9825-compatible discs on 9826 HPL.
The catalog listing format for LIF discs, however, is different from the 9825-compatible disc
catalog listing due to the fact that the 9825-compatible disc catalog listing only has space for
6-character file names, whereas LIF file names can be up to 10 characters in length. Thus, the
9825-compatible & LIF catalog listing formats are somewhat different. An example of a LIF
catalog listing from the 9826 internal minifloppy is shown below:
MSI ":1,0"
AVAILABLE RECORDS 1002
FILE NAME SCD TYPE #BYTES #RCRDS ADDRESS
grades TDATA 10 16
Class PROGRM 96 1 26
Count PROGRM 62 1 27
Name PROGRM 242 1 28
give TDATA 10 29
Kevs KEY 200 1 39
null _file NULL О 10 50
secured_rpr + PROGRM 242 1 DO
ascii_rfile ASCII 1 Di
numeric_bd NBDATA 24 1 de
string_bd SBDATA 134 1 53
Notes:
1. The “complete msus” is given on the msi line. Users may find this useful for reference,
since the new alternate syntaxes for init, killall, and disc copy require the “complete
msus’ .
2. The “SCD” field, following the file name, is used to indicate secured programs. If a “x
is present in this field, the program is secured.
3. The file address is given as a single logical record address, as opposed to breaking it up
into separate logical track and sector addresses.
797
9826 HPL Programming
The Killall Statement (Disc Programming p. 1-18)
killall unit numbers select code
or
killall complete msus
The killall statement can be used as a strictly 9825-compatible statement, but only discs
of device format types F and H can be accessed when this syntax is used (first syntax).
The killall statement can also be used with the full range of 9826 HPL supported discs
and formats by specifying the second syntax, which allows the msus specifier.
The Open Statement (Disc Programming p. 3-2)
The open statement now allows you to specify the desired type of file when opening a data
file. The new syntax is shown below.
ha Y
open file name » number of records [ »file type]
where file type is a string expression having the value “ASCII”, “NULL”, or “ТОАТА”.
The open statement in 9826 HPL can be used to create two new file types besides typed-data
(TDATA) files. (“TDATA” corresponds to the old 9825 typed-data files, designated by a “D”
in the catalog listing.) The two new file types supported by 9826 HPL are “ASCII” and
“NULL”. The default file type is “TDATA”. As with “TDATA”’ files, when an “ASCII” file is
created, each record of the file is initialized with logical end-of-file marks. The records of
“NULL” files, however, require no initialization; thus, none is performed.
“ASCII” files provide compatibility between 9826 HPL and other 9826 programming lan-
guages. “ASCII” data files are also used to provide transportability between the 9826 and
other computers or terminals with LIF ASCII file capability. Their use is identical to that of
regular data files (TDATA”), with some exceptions. Technical considerations in the use of
ASCII files are discussed in the Disc Programming Technical Appendix at the back of this
manual.
“NULL* files are essentially unused “tape” emulation data files. Their use from a program-
ming standpoint is like accessing data files on the 9825 tape cartridge. “NULL” files become
either “NBDATA”” (Numeric Binary Data) files or “SBDATA” (String or Mixed Binary Data
Files) files when data is stored to the file. These files can be accessed either with tape cartridge
operations or disc programming operations. Their use with tape cartridge operations (rcf, Idf)
is discussed under the Tape Cartridge Operations section of this manual and in the Disc
Programming Technical Appendix.
4-21
4-22 9826 HPL Programming
The Disc Copy Statement (Disc Programming p. 4-7)
copy [source drive number [ » select code] »]"to"
[ + destination drive number [ » select code]]
The original syntax of the (disc) copy statement with select codes in 9826 HPL works exactly
as it did on the 9825: it allows access to 9825-compatible 9885 and 9895 drives. However, if
the source or destination select code is omitted, the current default device format and select
code are used in each case, whatever they may be.
The original syntax of the (disc) copy statement without select codes in 9826 HPL works like
the new drive statement: the unit number, if given, modifies only the current default drive
number, and uses the current default device format and select code, whatever they may be.
Examples:
coPY 0,B,"toao",1,707 ‘Copy source disc, 9825-compatible 9885, select code 8,
unit number 0, to destination disc, 9825-compatible 9895,
select code 707, unit number 1.
msi ":G"icopy "to" +1 Copy source disc, LIF-type 9885, select code 8, unit num-
ber 0, to destination disc, LIF-type 9885, select code 8,
unit number 1. |
CAUTION
EVEN THOUGH THE SYNTAX DOESN'T REQUIRE IT, IT IS
HIGHLY RECOMMENDED THAT THE COMPLETE INFORMA-
TION BE EXPLICITLY GIVEN, FOR THE USER'S OWN PRO-
TECTION, DUE TO THE “SERIOUS” NATURE OF A DISC
COPY.
NOTE
With the 9825/98228 ROM, you were not prevented from doing
disc copy from a single-sided disc to a double-sided disc, in which
case the double-sided disc would end up with the same amount of
user space as the single-sided disc! Due to this unfortunate possibil-
ity as well as the even worse possibility of copying a minifloppy to a
double-sided full-sized floppy (resulting in a 75% loss in capacity!),
a test is performed by the operating system to prohibit disc copies
between “significantly” different-sized media. If the destination disc
is 50% larger than the source disc, the copy will not be allowed.
9826 HPL Programming 4-23
New Alternate Syntax for Disc Copy
copy complete source msus + to” , complete destination msus
With the new alternate syntax, all supported device/format specifiers can be accessed. De-
faults are not allowed in the msus; select code and unit number must be specified EXPLIC-
ITLY.
Examples:
copy ":M700,0" , "to" ,"IT:0"
copy ":FB,0","to",":H707,0"
Regardless of the syntax used, disc copies are not allowed from a LIF disc to a 9825-
compatible disc or vice-versa.
The File Copy Statement (Disc Programming p.4-7)
copy source file name [ + drive number [ + select code]] >
destination file name [ » drive number [ » select code]]
In general, almost all 9826 HPL files can be copied back and forth between LIF and 9825-
compatible discs without any problems. There are, however, some complications associated
with differences between LIF and 9825-compatible discs, which might prevent a file copy
from taking place.
1 Invalid file name (error D3): LIF allows up to 10 characters in a file name, while 9825-
compatible discs only allow up to 6.
2. Wrong file type (error D6): Some file types supported with LIF are not supported on
9825-compatible discs. ASCII files are the only 9826 HPL -created files with this charac-
teristic.
3. Directory entry field overflow (error f3): Certain fields in a 9825-type directory entry are
smaller than their counterparts in a LIF directory entry. This makes a directory entry
field overflow possible when copying the file from a LIF disc to a 9825-compatible disc.
The field most likely not to fit is the file size field. 9825-compatible discs cannot support
files whose size in bytes is greater than 65536. Note that this does not apply to
“TDATA” files, where the file size field is not used. Also, one field in a LIF directory is
smaller than its counterpart in a 9825-type directory. This field is guaranteed not to
overflow when copying a 9826 HPL-created 9825-compatible disc to a LIF disc, but
with 9825-compatible files created by other mainframes, it might.
4-24 9826 HPL Programming
As with all other 9826 HPL statements having the “file name” parameter, file copy's “file
name” parameter has been extended to allow appending an optional msus. However, since
the file copy syntax supports an optional unit number and select code in addition to the “file
name” parameter, there may be confusion as to which select code and unit number will take
precedence. the following rules apply:
1. If the “file name’ does not contain an msus, the current default device format, select
code, and unit number will be used, unless explicitly overridden by the optional unit
number and select code. If the optional select code parameter is given, 9825-
compatible 9885/9895 format is implied, the same as for the drive statement.
2. If the “file name” parameter contains an msus, the optional select code parameter
(outside the msus) is not allowed.
3. If the “file name” contains an msus, and the optional unit number parameter (outside
the msus) is given, it will override the unit number specified or implied by the msus.
4. The source and destination file names with their optional unit numbers and select codes
are completely independent, that is, one can contain an msus while the other has the
optional select code.
Examples:
coPy "file1"¿,"”filelb"
coPy "file" ,O0,"”file" +1
coPy "file" ,0,B,"fi1le:1I"
The Save Binary Statement
saveb file name
The save binary statement stores the current binary in memory to the specified disc file. 9825
binaries and 9826 binaries are in no way compatible. Binaries written for the 9825 are proces-
sor-dependent and as such would have to be completely re-written to run on the 9826. Be-
cause the file types for 9825 and 9826 binaries are identical, a user cannot merely look at a
catalog listing and determine whether an unknown binary is for a 9825 or for a 9826; both
show up as type “B” on 9825-compatible discs and “BINARY” on LIF discs. However, 9826
HPL sets a flag in the directory to enable it to distinguish between binaries, so a 9826 will not
attempt to load a 9825 binary. To do so would have completely unpredictable results. The
9825, on the other hand, does not look at the flag, so it will attempt to load a 9826 binary if
directed to do so by the user. This will certainly generate unpredictable operation of the 9825.
Don’t do it!
9826 HPL Programming 4-25
Unimplemented Disc Programming Statements
Four disc statements have not been implemented in 9826 HPL. They can be syntaxed,
stored, listed, recorded with programs, and loaded with programs. However, any attempt to
execute one of them will result in error f9 (Statement not implemented). The unimplemented
statements are:
dump
load
savem
getm
Unimplemented 98217 ROM System Cartridge Binary Statements
9826 HPL, like the 9825’s 98228 ROM, does not implement the statements contained in the
binaries on the 98217 ROM's Disc System Cartridge (init and killall are implemented with a
different syntax). These statements are:
dt rk
tinit
ltrk
direc
boot
ufyl
Ptrntst
cKrd
init (implemented with different syntax)
killall (implemented with different syntax)
4-26 9826 HPL Programming
More 1/0
Interface Control Operations (I/O p.4-14)
In general, 9826 HPL Language System register and interface programming operations oper-
ate identically to their 9825 counterparts. This is due to an emulation of the 9825 interface
registers. You should be aware however, that the 9826 interface hardware is indeed different
from that of the 9825, and that this prevents a 100% accurate emulation. The following tables
list the primary differences between 9825 interface operations and the 9826 HPL emulation
of those operations.
Select Code Summary Table
Select Code | 9825 Source/Destination |9826 Source/Destination
O READ Keyboard (KDP) Keyboard
WRITE Single line display Display line of CRT
1 Reserved for tape cartridge | External
2 External
7 | Internal HP-1B
8 External
16 READ Keyboard (KDP) Read from CRT
WRITE Internal printer Write to CRT
NOTE.
- Select code 1 of the 9826 is available for external devices
- Select code 7 of the 9826 is reserved for internal HP-IB
- Read from select code 16 does not return keycodes on the 9826, but instead reads data from the CRT print area
- Read from select code 0 of the 9826 returns 9826 hardware keycodes, completely unlike 9825 hardware keycodes
9826 HPL Programming 4-27
9826 Select Codes 0 and 16
Operation
Select code 0
Select code 16
rdb
red
wth
Wrt
rds
wtc
wtid
wtid
wti6
wti 7
rdi(4)
rdi(5)
rdi(6)
rdi(7)
Wait for keypress, then
return 9826 keycode
Not allowed
Write bytes to display line
Formatted write to display
line
Always returns value of 8
Select language jumper
(Wtc 0,5 selects Katakana)
No operation
No operation
No operation
Select language jumper
Always returns value of 0
Always returns value of 8
Always returns value of 0
Always returns value of 0
Read a byte from CRT at current
print position
Formatted read from CRT at
current print position
Write bytes to CRT at current
print position
Formatted write to CRT at
current print position
Always returns value of 8
Select language jumper
(wtc 16,5 selects Katakana)
No operation
No operation
No operation
Select language jumper
Always returns value of 0
Always returns value of 8
Always returns value of 0
Always returns value of 0
NOTE:
- Wti5 on the 9825 could control features such as insert/replace cursor
trigger display. These are not accessible on the 9826.
- Read and write operations have different effects of 9826 select codes O and 16. On the 9825. rdb(0) = rdb(16).
- rdi(4) on the 9825 reads the hardware keyboard scanner. There is no equivalent on the 9826.
- wti4 and wti6 on the 9825 wrote bytes to the display and printer buffers. There is no equivalent operation on the 9826.
type, run light on/off. trigger beeper. trigger printer. and
1-28 9826 HPL Programming
98623A BCD 1/0 Operations
For BCD input, operation of the 9826 BCD Interface is identical to its 9825 counterpart, the
98033A. However, there is also an 8-bit output latch available to the user. This is to be
considered simply an output latch, with no dedicated handshake lines. Access to the latch is
via binary operations. For example to latch a byte “N” to a BCD interface on select code 3:
Wwti0 +33 wtid oN
or simply
wth 3 +N
Executing-a write-control (wtc) to a BCD interface with the RESET bit set (bit 5=1) will reset
the interface and terminate any active t f г for the interface.
98622A GPIO Operations -
The 98622A GPIO Interface operates identically to its 9825 counterpart, the 98032A, except
that now when the invert-data jumper is installed, all data is inverted regardless of the transfer
type selected. (Recall that the 9825 and 98032A did not invert data for DMA or fast read-
write transfers, or for register 1/0.) Also, a software RESET of the interface now will terminate
any active t f r to or from the interface.
9826 HPL Programming 4-29
9825/9826 HP-IB Operations
There are some slight differences between register operations with the 98624A HP-IB inter-
face and its 9825 counterpart, the 98034A. Please note that all high-level operations (wrt,
red, tfr, pct, etc.) are compatible with 9825 operations! The following table serves to summa-
rize HP-IB operations for the 9825 and the 9826.
HP-IB Operations
Operation 9825 Result 9826 Result
rds (5,A8,8,C)—>D | HP-IB Extended Status HP-IB Extended Status
A 0 | 0] O| O| O} DCL] О | Error 0{0| REM] LLO| GET] DCL} IFC} Error
LOC
B [1T1] 0] -HPIB Address -_| [1]1]0] - HPIB Address -_]
EOI| REN| SRQ¡ ATN EC) ND| NR| DAV EOI| REN SRQ| ATN] IFC) ND| NR | DAV
AC|FD AC{FD
. - REN, IFC may be incorrect’ if System
Controller
- ATN indicates attempted drive status, not
actual state of line if Active Controller
- SRQ may be incorrect! if Active Controller
- EOI may be incorrect’ if Active Talker
- NDAC, NRFD may be incorrect’ if not Active
Talker or Active Listener
D E ca) TA| LA| sc| | SPL | EOI |SRQ| СА| ТА| LA| 5С| Ц o| EO |
- SRQ reflects current state of SRQ line: this is
not latched as it was on the 98034 Interface
- The 98034 SPL bit is now always false on
the 98624A
rds (s) Return fourth HP-IB status byte (D, above) Return fourth HPIB status byte (D, above)
wtc SX If X< = 31. then software reset and
terminate transfer. If X<31 then HPIB
address is set to X. If X=31 then no further
action. If X>31 then configure parallel poll
response:
Bit 4=1: disable ppoll response
Bit 4=0: enable ppoll response
Bits 0 — 2: define ppoll response line 0 thru 7
Bit 3=0: “0” true ppoll response
Bit 3=1: ‘‘1’’ true ppoll response
rdid Immediate read of R4 Always 0
rdi5 Immediate read of RS Always O
rdi6 Immediate read of R6 Always O
rdi?7 Immediate read of R7 Always O
wtidorB Immediate write to R4/R6 Wait for FLG then write to R4/R6
wtid Immediate write to R5 (Not recommended) No operation
wti7.X Immediate write to R7 If bit 7 of X=0 then bits 0-7 define serial poll
response byte. If bit 7 of X=1 then
Bit 2 (ATN): 1=TRUE
Bit 4 (EOI): 1=enable EOI with next data byte
ios Return 98034 STS line. Identical operation to 9825.
iof Return 98034 FLG line If the 9826 HP-IB is addressing or talking to the
bus then iof=1 when ready for next data item,
else iof=0.
1 These lines are driven from the 9826 in the specified state. However. the actual status of these lines may be different from that indicated by
simply reading status. (Consider the case of an HPIB analyzer or a defective instrument forcing a line to a state different from the attempted
drive state of the 98624A HPIB interface card.)
4-30
9826 HPL Programming
HP-1B Operations (Cont’d)
Operation 9825 Result 9826 Result
elr ROT CAT TATLAT Internal | Err | EOI SRI CAT TAT LAT Internal} [FC] EOI
Use |DCL Use | GET
Only | SDC Only | DCL
NOTE: CA, TA. LA interrupts do NOT wait for ATN
to go false before triggering! (The 98034A
triggered these interrupts when ATN went false.)
The user service routine should wait for ATN
false before accessing the bus.
t f r (buffer type 5) Not allowed Byte DMA transfer if DMA card is present.
tfr701,1+"buf" Format ignored Terminate on EOL
tfr701.2,"buf" Format ignored Do not terminate on EOL
tfr"buf,"701.1 Format ignored Send EOI with last byte.
tfr"buf "701,2 Format ignored Do not send EOL
Output to non- Completes. a Hangs. Card reset is required
existent device (wtc7.31 or SHIFT PAUSE)
HP-IB Capability Comparison
(from the 98034A Installation and Service Manual p. 4)
98034A 9826 HPL
SH1 (Complete) same
AH1 (Complete) same
T6 (No Talk-only) same
TEO (No Extended Talker) same
L4 (No Listen-only) same
LEO (No Extended Listener) same
SR1 (Complete) same
RLO (none) RL1 (Complete)
PP2 (Locally configurable only) | PP1 (Complete)
DC1 (Complete) same
DTO (none) DT1 (Complete)
С1,2,3,4,5 same
E1 (Open collector driver) E2 (Three-state driver)
98626A бега! МО Operations
The 98626A RS-232C Interface is nearly identical in operation to the 98036A RS-232 Inter-
face with the following exceptions:
9826 HPL Programming 4-31
e There is a new register, R30UT, that must be set before successful emulation of the
98036A Interface is possible. If a female RS-232C cable (DCE connector) is present, bit
0 of R3 must be set (=1). For male cable (DTE connector), R3 bit O must be clear (=0).
To enable CTS/DTR line transmitter control (this emulates the 98036A: any device con-
nected to CTS/ DTR could control the USART transmitter with this line), R3 bit 1 must
be clear (=0). To disable transmitter control, set R3 bit 1 (=1). >
R3 OUT
Most Significant Bit Least Significant Bit
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit ©
— — — — — — Handshake [Cable Type
Value = 128| Value = 64 | Value = 32 | Value = 16 | Value = 8 Value = 4 | Value = 2 | Value = 1
Bit 0: 1 = Female connector (DCE: Std cable)
0 = Male connector (DTE: Opt. 001 cable)
Bit 1: 0 = Enable transmitter handshake (CTS/DTR)
1 = Disable transmitter handshake
` USART Mode Word (R4C)
Most Significant Bit Least Significant Bit
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit ©
Number of Stop Bits Character Length 98036A Bit
00 = not valid Parity Type [Parity Enable 00 = 5 bits Rate Factor
01 =1 bit 0 = Odd O = Disable 01 =6 bits not used for
10 = 1.5 bits 1 = Even 1 = Enable 10 = 7 bits 98626A
11=2 bits 11=8 bits
Bits 0 and 1 (Bit Rate Factor) are ignored.
4-32 9826 HPL Programming
USART Control Word (R4D)
Most Significant Bit Least Significant Bit
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit O
Data Set
No Ready
Reset Status
Alwavs 0 USART „ONE Bits of Send Bread ¡Enable Data Enea Enable Data
ways Reset eques! О USART Character Receiver : Transmitter
. Send Pin 4 Status Word Terminal
(Option 001) Ready Pin 20
(Option 001)
Same as 98036A, except that bit 5 cannot be used to control the Clear-to-Send line on the
standard (DCE) cable. Instead, Clear-to-Send is controlled by Request-to-Send of the DTE
device.
USART Status Word (R4E)
Most Significant Bit Least Significant Bit
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
_ Alwavs 0 Framing Overrun Parity Transmitter | Receiver |Transmitter
ys Error Error Error Empty Ready Ready
Same as 98036A.
R6 Registers
R6 OUT (Opt. 001)
Most Significant Bit Least Significant Bit
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit O
Half/Full No No DSRS SRTS
Ш Ш Ш Speed Connect Connect pin 23 pin 19
Value = 128] Value = 64 | Value = 32 | Value = 16 | Value = 8 | Value=4 | Value=2 | Value = 1
- REOUT, Opt. 001 (DTE) cable has two no-connects. There is no U.K. Data Signal Rate
Select (pin 11): bit 2. There is no Special Purpose line (pin 25): bit 3.
9826 HPL Programming 4-33
R6 IN (Opt. 001)
Most Significant Bit
Least Significant Bit
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit O
Secondary Data
Ring
Carrier Carrier
1 1 1 1 1 Indicator
Detect in 22 Detect
pin 12 Р pin 6
Value = 128| Value = 64 | Маше = 32 | Маше = 16 | Маше = 8 | Уаше = 4 | Value =2 Value = 1
- R6IN, Opt. 001 (DTE) cable is unchanged.
R6 OUT (Standard)
Most Significant Bit
Least Significant Bit
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Half/Full Ring Secondary | Data
No Carrier Carrier
— — — Speed Indicator
Connect Detect Detect
Control pin 22
pin 12 pin 8
Value = 128| Value = 64 | Value = 32 | Value = 16 | Value = 8 Value = 4 | Value = 2 | Value = 1
- R6OUT, Standard (DCE) cable has one no-connect. There is no Secondary Carrier Detect
(pin 12): bit 2. Note that Ring Indicator and Data Set Ready (pins 22 and 6) are tied
together. The last one set will determine the actual line state of both.
R6 IN (Standard)
Most Significant Bit
Least Significant Bit
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit O
Secondary
No Request
1 1 1 1 1 0 Connect To Send
pin 19
Value = 128| Value = 64 | Value = 32 | Value = 16 | Value = 8 Value = 4 Value = 2 Value = 1
- R6IN, Standard (DCE) cable has one no-connect. There is no Data Signal Rate Select (pin
23): bit 1.
4-34 9826 HPL Programming
Internal Clock Access
The 9826 has a built-in real-time clock that is accessible from HPL for the purposes of keep-
ing time, reading time, and executing program routines at a set time, periodically, or after a
programmed delay. The following statements provide the capability to set and read the real
time. There are several new interrupt control statements provided to enable interrupts from
the real-time clock. Refer to the following section for the syntaxes of these statements.
The Set Clock-Time Statement (I/O p. 5-15)
st ime [seconds]
This statement sets the internal clock to the specified time (in seconds). The resolution of the
internal clock is .01 seconds, and the range is from zero seconds to 180 years. As an example,
the following routine sets the internal clock to a value relative to the year 1900 (1900 is time
zero) taking into account leap-years:
“
24: "Set-time":
25. prt "Type in 24-hour time and date as:"
26: Рг% "Нг(Н) ‚Мат (М) ‚Бес (5) "
27: Pprt "Month(M),Dav(D).Year(Y)”"
28: ent Н ‚№5 › М ‚О, У
29: if Y>19003Y-1900->Y
30: if M}23M-3>Migto 32
31: M+9I>MiIY-1>Y
32: stime (int(1461#Y/4)+int((153#M+2)/5)+D) #24#60#G0+H#3600+N#G0+S
33: ret
The st ime statement should be executed before any on-match, on-cycle, or on-delay inter-
rupts are enabled.
The Read Clock-Time Function (I/O p. 5-15)
rtime
This function returns the current number of seconds held by the internal clock. The resolution
is .01 seconds with a range of zero seconds to 180 years. The following routine displays the
clock time assumed relative to year 1900:
38: "Read-time":
39: data MAR , APR +MAY »JUN » JUL AUG SEP OCT NOV DEC » JAN/FEB
40: rstr "Read-time"ifor I=1 to 125read МФО утех 1
41: intCrtime)>Sii1rnt(S/(24*60*60))>D>Ziint (D*4/1461)>1
42: D-int(1461xY/4)>Diint((D*5-2)/153)>MID-int((153+M+2)/5)>D
43: 1f MI Y+1>"
44: S-24240*60*+50>5
45: S-(int(5/3500)>H) *3500>5
46: S-(int(S/60)>N)*GO>Sifxd ©
47: str(H)A":"Bstr(N)8B":"Bstr(5)8" "RME[M+1]J8str(D)8" ,” 8str(Y+1900)>T$%
48: ret
9826 HPL Programming 4-35
Interrupt Control (I/O p.5-5)
The On Interrupt Statement
oni select code [, label [ + abort byte]]
The syntax of the ori statement has been extended to allow the service routine linkage for a
select code to be cancelled. Executing oni with no service routine label cancels the interrupt
service routine linkage for that select code.
Interrupt Lockouts (1/0 p. 5-15)
The 9826 HPL operating system, like the 9825, has certain critical operations that lock out
interrupts for short periods. Unlike the 9825, however, the 9826 does not lock out interrupts
for long periods of time during tape drive accesses. (There is no tape drive.) The 9826 is also
capable of supporting two DMA operations simultaneously; therefare, utilizing one DMA
channel does not prevent initiation of a second, concurrent DMA transfer.
The On Clock-Cycle Statement (1О р. 5-15)
on cycle [period » label]
cret
This statement first zeroes the internal clock cycle count, then enables a periodic (cyclic)
interrupt from the internal clock of the 9826. The minimum period allowable is 10 mil-
liseconds (.01 second) and the maximum period allowed is one day minus 10 milliseconds
(24+60x60—.01). The “label” parameter specifies the line label of the on-cycle service
routine. The on-cycle service routine will be executed every “period” number of seconds as a
result of an end-of-line branch, and must eventually terminate with a c ret statement. The
on-cycle service routine must access the current clock-cycle count via the cycle function,
described next. The on-cycle routine cannot be exited (via cret) until after the cycle function
has been executed! Executing on e Y cle with no parameters disables on-cycle interrupt ser-
vice.
The Cycle Function
The cycle function returns the number of clock-cycles that have occurred since an on-cycle
statement was executed. (The on-cycle statement zeroes the clock-cycle count.) The cycle
function can be executed by the user program at any time to read the current clock-cycle
count, but it (cycle) MUST be executed within an on-cycle service routine before cret will
allow a return to the main program.
4-36 9826 HPL Programming
The On Clock-Delay Statement (1/0 p. 5-15)
on dela [wait » label]
dret
This statement enables a “wait” clock interrupt from the internal clock of the 9826. Once
or delay is executed, the internal clock starts counting down the “wait” number of
seconds specified (0.1 sec to 24+60+60 —.01 sec) until it reaches zero. At that time an end-of-
line branch is taken to the on-delay service routine specified by the “label” parameter. The
on-delay service routine must terminate with a dret statement to return to the main
program.
Executing the on-delay statement with no parameters disables pending on-delay interrupts
and service.
*
The On Clock-Match Statement (1/0 p. 5-15)
on match [alarm time + label]
mret
This statement establishes an “‘alarm’’ time interrupt for the internal clock of the 9826. Once
the on match statement is executed, the internal clock checks for a match between the “alarm
time” and the current time. When the two times match, an end-of-line branch is taken to the
on-match service routine specified by the “label” parameter. The on-match service routine
returns to the main program via the mret statement.
The allowable range of the “alarm time” is .01 seconds to 24x60+60—.01 seconds (.01
seconds less than one day). Executing on-match with no parameters disables any pending
match interrupt and service.
9826 HPL Programming 4-37
Buffered 1/0
Terminating I/O Transfers (I/O p. 6-9)
An VO transfer in progress to or from a select code can be aborted by resetting the interface:
GPIO-type transfer: wt c select code » 32
HP-IB type transfer: wt c select code » 31
1/0 Buffer Extended Status (1/0 p. 6-11)
The rds function can return optional parameters regarding buffer status. The syntax for
extended buffer status is:
rds ( buffer name [ +type [ sempty [ +fill [ »dim] JJ]? status
where “type” is buffer type (0-5), “empty” is the value of the empty pointer, “fill” is the
value of the fill pointer, and “dim” is the dimensioned length of the buffer. Note that the
value returned as “type” will be negative if the buffer is busy. “Status” is set to — 1 if the
buffer is busy and set to the fill value — the empty value if the buffer is not busy.
1/0 Buffer Pointer Control (I/O p. 6-12)
The wtc statement can be used to set values of buffer parameters “fill”, “empty”, and
“type”. You cannot execute wtc toa busy buffer, nor can the buffer ever be changed froma
word-type to a byte-type buffer (or vice-versa). Syntax:
wt c buffer name [ stype [ rempty | fill) ] )
where “type” is buffer type (0-5), “empty” is the value for the empty pointer, and “fill” is the
value for the fill pointer. A value of —1 for any parameter leaves that buffer parameter un-
changed. The following relationship must always be true:
0 <= empty <= fill <= dimension
The wtc statement now gives you the capability to re-transmit a buffer that has been
emptied. The following example illustrates this:
: buf "A" 1271
. % " Put data in buffers» and save value of fill pointer”
» wrt "A" "This could be waveform data" irds("A")>5
: tfr "A",705
+ % " Wait for tfr comrletion"
imp rds("A")#-1
: 7 " Rewrite fill po1nter and restart transfer”
: wtc "A",-1:,0,9i9to -5
== = 00 00 —) С) Л В 3) О) = <
— 0 ee … в “ow + .. + * ee »
pb
r)
13: end
4-38 9826 HPL Programming
Saving String Buffers to Disc (I/O p. 6-14)
There are now three methods of saving string buffers on a disc: rc f and two types of sPrt/
rert. The rcf to disc is the fastest method, and all buffer pointers are preserved as they
were for tape. To use sPrt/rrrt, either the buffer status must be written to the disc separ-
ately, or the sprt/rp rt operation must be directed to a binary-type data file (“NBDATA"),
which preserves the transfer pointers automatically. The following example illustrates how to
save the transfer pointers explicitly (non “BDATA”-type data files):
rds ( "Buffer" ,T,EsF)>Liisprt 1:B$:E.F Save Empty and Fill pointers with
the string buffer.
(B$ is the string buffer ‘‘Buffer’’). Now to retrieve and restore the buffer status, use wtc:
sread1,B$,E.sFiuntc "Buffer" ,-1,E.F
The wtc leaves Type unchanged, and sets Empty and Fill to their original values.
The following examples illustrate saving only the active portion of a buffer (so you won't have
to save 10 kbytes of string buffer when only 50 bytes are used).
e Byte-type buffer:
rds ( "Buffer" ,+T.+E,F)>L33 sert 1:E.:F »DB$SLE+1+F]
sread1,sE,Fisread1,B$LE+1+»F]iwtc "Buffer" +—1:,E:+F
e Word-type buffer:
rds( "Buffer" ,+T,+EsF)>L: sert 1 EF sB$L[2E+1,2F]
sread1,EsFisread1,:B$C[2E+?F]i3wtc "Buffer" ,»—-—1,E:F
9826 HPL Programming 4-39
Plotter Control (VO p. 7-4)
Internal Graphics Control
The 9826 Computer has a built-in graphics screen capable of displaying 300 vertical by 400
horizontal dots, or pixels. Operation of the internal graphics is much the same as operation of
an external plotter, only faster. Programs designed to drive an external plotter will operate
nearly identically with the internal graphics. Obviously, there are certain physical differences
between the two types of device, such as pen selection, line resolution, and device size.
There are two capabilities of external plotters not offered by the internal graphics device:
digitize (di 9) and line-type (line). These statements are nof illegal when directed to the
internal graphics screen, they merely have no effect. Thus, multi-line clusters that have a
definite visual impact with a four-color plotter may appear confusing on the internal graphics.
Additionally, the 9825 character set is not selected on the internal graphics screen when
PElris executed.
`
The Plotter Select Code Statement
Selecting the graphics screen as a plotting device is done by executing
psc 16
where 16 is the select code of the internal graphics screen. If an external plotter is selected, it
must be an HPGL -type plotting device such as a 9872 or 7225 plotter.
The Pen Select Statement
The pen select statement Pen* has different meanings, dependent on the current plotting
device. For the internal graphics screen, the Pen* syntax is:
pen# type
where “type” selects pen off (0), pen on (>), eraser (— 1), and exclusive-or (—2). An exclu-
sive-or pen turns off dots that are on and turns on dots that are off.
External plotter pen control is unchanged.
Graphics Screen Control Statements
The graphics screen may be turned on and turned off with the following two statements:
goff (turn off graphics screen)
gon (turn on graphics screen)
These statements have no effect on the contents of the graphics memory. To clear the
graphics screen use the clear graphics statement:
gclr (clear graphics)
4-40 9826 HPL Programming
The Dump Graphics Statement
A hard copy printout of the graphics screen can be obtained with a dot-matrix printer com-
patible with the HP Raster Scan Standard, such as the HP 9876 and HP 2631G printers. The
following statement implements the hard-copy graphics dump:
gdump [select code]
The select code must include the bus address of the printer if an HP-IB printer is used, for
example, "sdumr 705". If the select code parameter is omitted, the system printer (prtsc)
device is the default. 300 lines of 400 dots are always sent, unless terminated by pressing the
PAUSE key.
The Graphics Pointer (Cursor) Statement
Interactive graphics can be achieved with the use of either an external digitizer (or data tablet)
or the 9826 keyboard and knob. A graphics cursor can be drawn at point x,y using the
statement:
gptr x-coordinate » y-coordinate [ +typel
The x and y coordinates must be specified, and are measured in the units set by the sc1 and
ofs statements. The “type” parameter specifies whether the cursor is to be turned OFF
(“type” = 0) or ON (“type” # 0). Default (“type” not specified) is ON.
Binary Graphics
The high-speed nature of CRT graphics makes certain speed enhancements even more desir-
able for applications such as animation or real-time information display. These enhancements
are EXTENSIONS to the plotting capability of the CRT, and as such cannot be used with an
external plotter. The first extension to be discussed is binary plot.
9826 HPL Programming
The Binary Plot Statement
brlt string expression » bytes-per-linel function]
The binary plot statement loads the binary information contained in the string expression into
the graphics memory at the current pen position. Because there are no computations in-
volved, this is a very high speed operation. The specified number of bytes are taken from the
string and placed on a line, with the high-order bit of each eight-bit string character corres-
ponding to the leftmost pixel of eight pixels. To conceptualize this, suppose that you want to
draw the following character on the screen:
Character Binary Decimal
e 00000001 (1)
000000 01111110 (126)
eo © 10100100 (164)
e e. 00100100 (36)
e © 00100100 (36)
e e 00100100 (36)
e e 00100100 (36)
e e 01001000 (72)
The graphics representation is on the left, the binary representation is in the middle, and the
decimal equivalent is to the right. The following statements assemble the string and bp lot it:
: dim A$S[BO] sPsC 1659clripeniplt 3:3
: char(1)&char(126)&char(164)&char(36)&char(36)>A$
; Astchar(36)8char(36)8char(36)8char(72)>A$
: brlt At:1
y & U M + ©
Note that by specifying one byte-per-line, each byte, or character, of A$ corresponds to one
line of graphics pixels. Specifying two bytes-per line causes two bytes oi A$ to be drawn on a
line, and 16 pixels are then defined on the line. To define 3 lines of 16 pixels per line requires
a 6 byte string, with a correspondence as shown below:
А$[1,1] <........ > <........ > A$[2,2]
А$[3,3] <........ > <........ > A$[4,4]
A$[5,5)<........ > <........ > A$[6,6]
The optional “function” parameter specifies the interaction of the bP1t string with graphics
memory. If not specified, the bp lt statement performs a binary OR of the string expression
with graphics memory.
function=0: performs a binary OR function (default)
function=1: performs a binary AND function
function=2 performs a binary EOR function
function=23: performs a STORE (overwrite) function
The trlot statement does not affect the pen coordinates (x,y) or the pen position (up or
down).
4-41
4-42 9826 HPL Programming
The Graphics Load and Graphics Store Statements
Two other statements facilitate high-speed graphics displays: sstore and gload. With
these two statements it is possible to plot a series of pictures (using standard plotter com-
mands), store each picture into a string variable, then later recall the picture series at high
speed by sequentially loading each string variable into graphics memory. Because no com-
putations or decisions are being made when loading the strings into the graphics display, this
occurs very rapidly.
The syntax for these statements is shown below:
{store string variable
gl o ad string expression
The 3store statement saves the graphics display into a string variable with the leftmost bit
of the top line corresponding to the most significant bit of the first character in the string. The
following diagram illustrates this:
7— ASI1.1] —AS!2.2) А$[50.50]
First row Po Narea. o ee TT —— (400 pixels)
Second roW | ..... 2... cee aaa о (400 pixels)
` —G 3e — — Km rm
A$[51.51] A$[52.52) A$[100.100]
A$[14951.14951] A$[15000.15000]
300th row q == ena ee cee LL AU (400 pixels)
9826 HPL Programming 4-43
As you can see, a 15,000 byte string is required to hold the entire 50 byte by 300 line display.
If a smaller string is specified, the display will be saved up to the point where the string
becomes full.
The sload statement performs the converse operation of the store statement, loading
the graphics memory from the specified string expression. The transfer always begins at the
upper-left corner of the display and with the first byte of the string expression, filling the
screen until either the string length is reached or until the screen is full.
The graphics strings can be loaded from disc and stored to disc, or saved in memory and
sequenced through the graphics display. This sequencing can be used to create the illusion of
motion or more simply to present information to the viewer more rapidly than is possible by
using plotting commands.
4-44 9826 HPL Proramming
Appendix A
Disc Programming
Technical Appendix
Supported Device/Format Combinations
9826 HPL will support 4 distinct disc drives and 2 different mass storage directory formats.
The supported drives are:
9826 internal minifloppy (5% inch double-sided discs)
82900 Series minifloppy 15%4 inch double-sided discs)
9885 floppy (8 inch single-sided discs)
9895 floppy (8 inch double or single-sided discs)
The supported directory formats are:
HP Corporate Logical Interchange Format (LIF)
9825 format (also 9835/9845 etc.)
The 9825 format is supported on the 9885 and 9895 drives as “F” and “H'” device format
specifiers, providing backward compatibility with the 9825/9835/9845 series computers.
Program, data, and key files are fully compatible with 9825 files. Data files are compatible
with 9835/9845 data files, provided the logical record length is 256 bytes per record (the
default). Moreover, 9825 bootstraps are not required on discs, enabling compatibility with
9835/9845 initialized discs.
LIF is supported on the internal and 8290x series drives, enabling data interchange with 9826
BASIC discs and others via ASCII (INTERCHANGE) files. LIF is also supported on the 9885
and 9895 discs, both for the unique features it offers, and for compatibility with future main-
frames.
Device Format Table
Device Disc Type Disc Format Select Code HP-IB Default Unit Number
Format Range Address Select Code Range
Specifier Range Value
I Internal LIF - - - 0
M 8290x LIF! 1-15 0-7 700 0-3
F 9885 9825 Compatible 1-15(not 7) - 8 0-3
G 9885 LIF' 1-15(not 7) - 8 0-3
H 9895 9825 Compatible 1-15 0-7 707 0-3
J 9895 LIF’ 1-15 0-7 707 0-3
1 LIF: Hewlett-Packard Logical Interchange Format: File type ASCII is compatible with 9826 BASIC language ASCII files and with HP 2642A
Terminal files.
A-2 Technical Appendix
9826 HPL’s Implementation of LIF
HP Corporate Logical Interchange Format (LIF) is a standard defining the logical structure of
mass storage media, notably discs. The standard concerns itself with:
Layout of file structure on the disc
Location and configuration of directories
Interchange data types
Location and configuration of the volume label
hw ho
Most of these concerns are transparent to the user, since they are automatically handled by
the HPL operating system, however, there are several topics the user should have a know-
ledge of with respect to how LIF affects him. These topics are discussed below.
LIF Disc Structure
The structure of LIF discs is simple compared to 9825-format discs. Sector contains the LIF
volume label (system record); sector 1 contains all Os as defined by the standard: and sector 2
contains the first record of the directory. The user file space begins following the last record of
the directory. and spans the remainder of the disc. There is no backup directory.
With 9826 HPL. the default directory size is the number of records required to fill up the first
track. For 5% inch minifloppies (16 sectors per track), this yields 14 directory records; for 8
inch floppies (30 sectors per track) this yields 28 directory records. The initialize statement has
been extended to allow the user to specify how many directory records he wants. Refer to the
section on the initialize statement for details.
Rules for Legal File Names
The LIF standard has rather stringent restrictions for file names. File names are from 1 to 10
characters in length; the characters are to be of the set of uppercase English alphabetics and
the digits O through 9: furthermore, the first character is to be alphabetic.
9826 HPL's LIF implementation has relaxed the file name restrictions, allowing 9825 type file
names to be specified. If you wish to interchange a 9826 LIF disc with that of another compu-
ter, however, you MUST adhere to the restrictions described in the paragraph above!
The test for legal file names is applied only when 9826 HPL creates a file name entry, not
when 9826 HPL merely accesses a file name. Any file name can be referenced, as long as it
does not contain a colon, a null character, or imbedded blanks. Blanks preceding, imbedded
in, or trailing the file name are ignored.
If the user wishes for his disc to conform fully with the LIF standard. then it is his responsibility
to name his files accordingly.
Technical Appendix
LIF Directory Entries Support Larger File Sizes
Due to limitations with the 9825-format directory, most files on these discs are restricted to be
65536 bytes or smaller in size. This applies to PROGRM, KEYS, SBDATA, NBDATA, and
BINARY files: this does not apply to TDATA files! Since the maximum user memory size for
the 9825 was 62K bytes, this size restriction was never a problem. However, with 9826 HPL
supporting a MUCH larger user memory size, it is easily possible to run into the 65K byte limit
on 9825-compatible discs.
Because of larger fields in the LIF directory, LIF discs do NOT have this file size restriction;
and are capable of handling any size file required by 9826 HPL.
LIF Discs May Require More Frequent Repacking
Under certain conditions, attempting to create a file on a LIF disc may result in error D8,
(insufficient storage space on disc), even though the catalog listing shows that enough space is
available. This same error can occur with 9825-format discs: stemming from the fact that the
available space may not be contiguous. If a repack is performed (with the rerk statement),
the available space will all become contiguous, and files can be created to consume the re-
maining available space.
With LIF discs, though, there is an additional complicating factor associated with the creation
of files: the order of the actual files is required to be exactly the same as the order of the
directory entries of those files. Thus, even if a large enough block of contiguous space exists
out in the user area, an open slot must also exist in the proper place in the LIF directory, else
error D8 will be issued. A simple disc repack will cure this problem, allowing the creation of
the additional files. The bottom line is: LIF discs may require repacking more often than do
0825-format discs.
LIF ASCII Files
“ASCII” (or interchange) files are defined by the LIF standard, and are fully supported with
9826 HPL. “ASCII” files created by all mainframes that implement the LIF standard should
be completely interchangeable. LIF “ASCII” files are the primary data interchange mechan-
ism between 9826 HPL and 9826 BASIC.
LIF ASCII File Support
Defined under the HP Corporate Logical Interchange Format Standard (LIF), ASCII files pro-
vide the main data interchange mechanism with 9826 BASIC. They are anticipated to provide
the main data interchange mechanism with future mainframes. ASCII files are not supported
on 9825-format discs.
Creating ASCII Files
ASCII files are created with the open statement. Refer to the section for the o ren statement
for a discussion of syntax.
Example:
open "ascii_file" , 10," ASCII"
A-4 Technical Appendix
Assigning ASCII Files
ASCII files are assigned with either the files or the as gn statements, exactly in the same
manner as typed data files are assigned, with the exception that if a return variable is present
with the assign statement, it will return a value of 10 instead of a value of 0.
Examples:
files ascii_file
asgn "ascii_file:M702 , 2" ‚2; - 1 ‚К
Accessing ASCII Files
ASCII files are accessed via the sprt and s read statements. ASCII files are, by definition,
strictly serial in nature. Any attempt, with one exception, to access them with rert or
rread will result in an error. The one exception is "rread N +1"; it is allowed for the
purpose of resetting the file pointer back to the beginning of the file. All syntaxes and variable
list items allowed on typed data files with sprt and sread and also allowed on ASCII files. This
includes simple numerics, numeric arrays, simple strings, string arrays, and others. As for
typed data files, arrays are printed and read on an individual element basis.
Autoverification of s P rt to ASCII files is governed by von/voft.
Each data element in an ASCII file is, by definition, a string of ASCII characters. Though
referred to as an “ASCII character”, each character is allowed to have any 8-bit binary value
(0 to 255 if interpreted as 8 bit unsigned; —128 to 127 if interpreted as 7-bit signed).
Numerics printed to an ASCII file undergo a BCD to ASCII conversion similar to the str
function conversion. The precision and format are determined by the current fxd/flt setting.
Unlike the st r function, however, the “E” produced as a result of a fit setting will be upper-
case as opposed to lowercase; this is required by the LIF standard. Numerics read from an
ASCII file undergo an ASCII to BCD conversion similar to the val function conversion. Unlike
the val function, however, either a lowercase or an uppercase “E” will be accepted as being
part of a floating point number.
Fach ASCII file data element consists of a two-byte header, designating the number of char-
acters in the element, followed by the actual characters. The character count must be between
0 and 32767, and the header itself does not contribute to the character count. If the count is
odd, a null byte is inserted after the last character, so that the next data element header will
always begin on a word boundary. A character count of —1 designates a logical end of file.
The standard defines all other negative character counts to be illegal; 9826 HPL treats them
as logical end-of-file marks, and no error is issued.
ASCII data elements pay no regard to physical record boundaries (except the physical end of
file). and thus they incur no additional overhead when they cross physical record boundaries.
However, this implies that the only way to traverse an ASCII file is to start at its beginning,
and read or print serially. In other words it is impossible to look at an arbitrary record and
determine where data elements begin or end. Random reads and prints are disallowed.
Technical Appendix A-5
With ASCII file serial prints, the “end” and “ens” parameters work in a way as identical as
possible to the way they do with typed data files, considering the fact that ASCII files have no
logical end-of-record mark. Here are the rules:
1 Fneither “end” or “ens” is specified, a logical end of file mark is printed after the last
data item, if physically there is room in the file.
2. If “end” is specified, an attempt is made to write a logical end-of-file mark after the last
data item. If not enough room exists, a file overflow error message is issued. (This is
consistent with typed data file behavior.)
3. K “ens” is specified, nothing is written after the last data item. Whatever was there
originally will remain. (As is with typed data files, this powerful yet dangerous feature
requires a thorough knowledge of file structure and access methods.)
Examples:
sprt 1 »"hi there!
dim A$[501B$[5 1001 AC1015sread 1 A sAL#1:AS DS
rread 1.1
Using the Type Function with ASCII Files
Use of the type function is allowed with ASCII files. The type function will always return a
value of 2 (meaning “full string”) or 3 (meaning “end-of-file mark”).
Example:
if type(1)#35sread 1,A$sPrt At simp O
Using On End with ASCII Files
Use of the on end statement is allowed with ASCII files. The on-end branch will be taken if
either a physical or logical end of file is reached.
Example:
on end 1+"end of file reached”
sread 1,A$iprt A$ijJmp 0
A-6 Technical Appendix
Binary Data File Support
Binary data files, corresponding to the 9825's tape file types 2 (numeric) and 3 (string), are
fully supported under 9826 HPL's tape statement emulation. In addition, the HPL disc-
oriented data file statements have been extended to allow them to access these same binary
data files. This enables the user to utilize binary data files without being forced to use tape
statements.
9826 HPL's binary data files are in no way compatible with 9835/9845 binary data files.
However, they have a similar set of advantages and disadvantages, when compared with
typed data files.
Advantages
e Binary data files can be accessed efficiently on discs that are initialized to their suggested
minimum interleave factor; efficient TDATA and ASCII file access requires a larger inter-
leave factor. Thus, up to a 2x speed performance can be achieved if the disc is initialized
to the minimum suggested interleave factor AND binary data files are used.
e Strings are recorded in their entirety, rather than by their current length. Thus, with string
buffers, the type, empty pointer, and fill pointer are always automatically recorded along
with the string.
Disadvantages
e The variables in the variable list must be a contiguous block in memory, as required
when recording data to the 9825 tape cartridge.
e The entire file is recorded/loaded as one block operation; individual portions of the file
cannot be accessed separately.
e If the file is string or mixed data (SBDATA), the data list for the read operation must be
identical in structure with the data list used to print the file. There is no way to deter-
mine the data list structure of an unknown file.
e Strings are recorded in their entirety. If a string is dimensioned 10,000 bytes long. all
10,000 bytes (plus overhead) will be recorded, even if the current length is only 10.
Creating Binary Data Files
Binary data files are originally created as a NULL files, corresponding to the 9825 tape file
type 0. When data is written into the NULL file, its type is changed to either NBDATA or
SBDATA, depending upon whether the data is strictly numeric or not. NULL files are created
with either the mrk statement or the open statement. The open statement is the more
flexible of the two, allowing arbitrary file names (and optional msus), whereas the m rk state-
ment creates file names corresponding to pseudo track and file numbers.
Examples:
open "b_file:M" »10 "NULL"
rewstrk Osmrk 5,2000
Technical Appendix A-7
Assigning Binary Data Files (for Disc-oriented Statement Access)
Binary data files are assigned with either the files or the as gn statements, exactly in the same
manner as typed-data files are assigned, with the exception that if a return variable is present
with the assign statement, it will return a value other than 0. The possible return values for
binary data files are:
4 SBDATA (String or Mixed Binary Data)
7 NBDATA (Numeric Binary Data)
12 NULL (Null - no data written yet)
Examples:
files b_file
asgn "h_file:F" »5
Accessing Binary Data Files
Binary data files are accessed with the sprt and sread statements exclusively. The other
disc data statements, rPrt, rread, trYre, and on end are not allowed due to the nature
of binary data files.
An sprt or sread access to a binary data file is identical to a rcí/Idf, with the following excep-
tions:
1. the “file number” parameter refers to an assigned file number instead of a tape marked
file number.
2 autoverification of sprt is controlled by von/voff instead of ave/avd.
3 hardware errors will result in disc hardware error messages instead of tape hardware
error messages.
Assigned File Pointers
on 8290x Series Minifloppies
In HPL, when a data file is assigned, a set of internal pointers is set up, pointing to the
assigned file's area on disc. Prints and reads to the data file then use the internal data file
pointers, not the disc directory. If HPL detects that the disc drive's door has been opened, it
clears all pointers associated with that drive, since they are now meaningless. Then, if the user
attempts to use those file pointers without reassigning them, he gets error F6 (Unassigned
data file pointers).
The hardware of the current 8290x Series Minifloppies, however, is incapable of detecting if a
door is opened between disc accesses. This makes it impossible for HPL to reliably know
when it is necessary to clear the file pointers when discs are swapped. A hazard exists if a user
assigns data file pointers to an 8290x Series drive, swaps discs, and then prints using those
same file pointers without reassigning them. Instead of error F6 being issued, the print will
take place, writing on the new disc where the assigned file existed on the old disc. Unpredict-
able results can occur. resulting in a loss of programs and/or data!
A-8 Technical Appendix
2885 Disc Access Requires
a DMA Card Present
The 9885 driver on the 9825 used the 9825's built-in DMA channel to access the 9885 disc.
The 9885 driver on the 9826 also needs a DMA channel; however, since the DMA card is an
option, it may not be present. If the DMA card is not present, and an attempt is made to
access the 9885, error f1 will be issued.
HP-IB Programming Considerations
(9895 and 8290x Series Discs)
Most of the HPIB Programming Considerations mentioned in the “9825 Disc Programming
Manual”, part # 09825-90220, are valid for the 9826. However, due to hardware and low-
level driver differences, items 1, 8, & 9 are not valid for 9826 HPL.
9826 HPL Disc Programming Error Messages
When 9826 HPL is unable to access a disc controller, it issues error message f0 instead of
flashing “DISK IS DOWN” or “UNABLE TO ACCESS DISC CONTROLLER”. This means
that the error is now trappable from your user program. There are 9 other new error messages
associated with 9826 HPL Mass Storage, as shown below:
{0 Unable to access disc controller
{1 9885 driver requires a DMA card present
f2 Invalid msus syntax; illegal device/format specifier
13 Directory entry field overflow
{4 Illegal structure on LIF disc; cannot be repacked
f5 Attempted disc copy to significantly larger disc
{6 Attempted disc copy of 9825-compatible disc to LIF disc or vice-versa
{7 System record not valid for LIF disc
f8 System record not valid for 9825-compatible disc
19 Statement not implemented
B-1
Appendix B
Code Charts
The table on the following page lists the ASCII control codes of the 9826 command and
cursor-control keys. This table is useful when developing programs that use the PKbd state-
ment, and also when controlling the 9826 from a remote ASCII keyboard (such as a ter-
minal).
The Keycode Conversion Table on pages B-3, B-4 is useful for designing a 9826-to-9825
hardware keycode conversion table. This is necessary only when a 9825 program was de-
signed to work with hardware keycodes (rdb(0)»K). To implement the conversion, two
methods are possible. One is to use a jump table (requiring no variables, but expensive in
memory used). This method is used in the utility “9825 key” for keycode conversion. The
other method involves a 256 byte string, with the position in the string corresponding to the
9826 8-bit keycode, and the character at that position corresponding to the 9825 keycode.
B-2 Code Charts
9826A ASCII Control Codes
CTRL | ASCII ASCII 9826A Key Displayed
of Value | Character Pressed’ Character’
@ 0 NUL reserved Mu
A 1 SOH PAUSE SH
B 2 STX REWIND S
C 3 ETX HOME LEFT Ex
D 4 EOT HOME RIGHT E
E 5 ENQ TO TOP Eo
F 6 ACK TO BOTTOM “x
G 7 BEL RESULT i
H 8 BS INSERT LINE Ps
I 9 HT » DELETE LINE "т
J 10 LF EXECUTE Ur
K 11 VT RECALL ‘т
L 12 FF RUN i
M 13 CR ENTER CR
N 14 so CLR TO END “o
O 15 Si CLR SCREEN Sa
P 16 DLE DOWN ARROW PL
Q 17 DCI UP ARROW о,
R 18 DC2 CLEAR LINE 6
5 19 DC3 PRINT ALL о
T 20 DC4 LEFT ARROW Pa
U 21 NAK RIGHT ARROW NA
V 22 SYN INSERT CHAR Sy
W 23 ETB DELETE CHAR “6
X 24 CAN STEP EN
Y 25 EM CONTINUE Em
Z 26 SUB DUMP GRAPHICS SE
| 27 ESC DISPLAY FUNCTIONS Ec
Ne 28 FS EDIT 5
29 GS CAPS LOCK ts
^ 30 RS ALPHA "ts
_ 31 US | GRAPHICS Us
1 Ths is the 9526A pkbd keypress and the key pressed from a remote ASCH keyboard
2 This is the shift") key on the Numeric Keypad
3 This is the displayed character if "DISPLAYED FUNCTIONS IS ON©
Code Charts B-3
Keycode Conversion Tables
982¢ Hardware ASCII 982% Hardware 782€ Hardware ASCII 9825 Hardware
Heycodes + Keycodes keycodes + keycodes:
DEC OCT HE CHAR DEC DEL aci HEX DEL OCT HE CHAR DEC DEL OCT HE»
ana aoû Ba = aug ang aan no art 114 aL € 161 ese 140 60
Gal aol 81 63e 9606 ena oa arr 115 4m I 046 946 056 e
ве: ав: az ег nu» aug ae 67€ 116 4E ) a41 641 651 29
вез ваз az asc aoc ace ag 079 117 4F ^ 894 694 136 SE
aed end a4 0 soc еее sû esa 126 Se 1 64% 943 061 31
65 067 0% ase 006 coo aa asl 121 5 2 656 as BEZ 3e
obe BoE Ge Bz Boo aap Go age 22 se = es! 051 063 23
any par а; Bz gag ana ве 05: 127 SS 4 ese 05 uba 34
Gas ale az 0: pag apa её 054 124 =4 = az ess 865 25
aus 011 GS Ir cao ава ве nes 2% SS E 054 954 MEE 36
ajo el: an az apa ago ao BE 12¢ Se ? ass 655 067 ©
all (5 QF az ana ace Gé OST ler Sr € ETE ceo eye 38
mir ald GC TE вай gag sg ar: 136 SE q ес 7 asr 671 39
alt #15 ар Dog dos bob aa Gog 121 = a a4s 64 aca зе
a14 Blé BE ALT веб aa ag ess 132 SH - 045 045 as 2D
els el aF azz 906 aa ca as1 135 SE = ect Bél 75 =D
ale aad 16 ose Bag apo cw as. 134 SC £ 091 164 ave ES
atv az 11 622 sas agi ав вез 1535 So ] вез 185 27 ES
ale azz 12 32 ue ana ее 854 126 SE , ass 657 73 ЗЕ
1° Ве: 15 TE aan Gea ее aa 127 SF 7 aa 176 Za EG
ac ara 14 62 eae вай es sé 14% 60 s n44 644 B54 Е
821 as 17 AT a E E ago ве aay 141 Él . Bar 046 BSE eE
BIC azó 1 € ar ag ead en Bec 193 Ec asr 047 as 2F
as Ber 17 asc em aaa go ass 142 67 er 22 usa <a
024 aa 15 + aza LE Goo ве 186 144 54 © 111 111 157 EF
825 pB=1 15 + 125 125 175 “I tal 145 ES F 112 11€ 16€ ve
don azz 1H ¥ 125 de 161 41 105 14e E к 167 167 155 éF
Br uNa 1F e 129 BEE 102 4 105 147 67 1 182 167 154 EL
@2 a=4 1c r 136 ne? 18: 4% 164 15e ES q 113 113 161 Pi
as aze 11 . 12 ave 108 4t 195 151 és uw 119 119 ler er
azo aze 1E 3 154 B7il 167 47 106 152 ER € 161 181 145 65
az as 1F 7 135 ave 116 45 167 153 SE r 114 114 162 re
és. 840 ей ; 171 der 183 44 195 154 ес t 116 116 164 74
LC aa] 21 - 132 Ges 185 45 16% 155 er Y 121 121 171 79
язя ade & E a mie aca 16 114 15€ SE u 117 117 165 75
e "a 22 fi al air Gz 11 111 157 EF 1 165 165 151 és
Qe 44 ca A 156 в 111 qd 112 160 va a Bey as 141 Él
GS? 37 25 - 127 ara 112 4H 117 1151 T1 = 115 115 16: "=
ass SE cé E: aro Bee aza 14 114 ler ve d 166 106 144 € 4
e ü47 ET " #1 Bl aca 15 115 les #3 f loz тег 14€ EE
SER asa E E, SEE Boo gla E 11€ 154 74 q 155 167 147 ÉT
agi as1 ея H, aus вяз atl as 117 165 ve ki 164 164 158 EE
a4c as: A + G11 811 el: GE 115 165 ce j 10€ 186 152 ея
od os: EF 5, IZ dec az Ре 119 ler Y für 109 169 155 er
044 Bod af Es azz 02% A: Ar 120 176 e z 122 122 172 7H
45 es. =D Si G14 ano aoû ве 121 171 = æ 129 126 178 TE
nae @ бе ZE Cy Hed Uco вся 14 lec 172 TH x Boo 0% 14% её 2
Bar as’ ZF Fr el ai 614 ac lez 175 TE . 112 11% 16€ ré
B48 Bei За F- ose ace ea 1£ 1-4 174 7C b ass ass 142 ее
ass Gel =1 un aa cas god ga 125 175 en ri 110 116 156 GE
ase ET 35 Me 631 Boo вай aa 12€ 17€ СЕ ate pao aaO a
ai ges 37 5 az4 a24 ea 1€ 127 177 TF B32 Aca ang an
Bs acd 34 E ale BIE dez le 12€ cad se azz ean gag ar
ges Bo 35 Q ва, выс aus oy 129 281 ci az: бай Boo ac
asa Gee Зе Ly es ara aes 17 136 Zar E haz gag aug aa
ass Ge? 37 4 25€ 966 ena ев 131 cas ET az ona een ей
а бб ат ze i вя 1 001 sal Gi 13€ 294d Ea 32 vag ena GO
ar Era те x 1 alt 21% er 133 cas 25 672 900 ena 06
ase ave ZH 5. azo 02 831 19 134 e ge ase вай enn es
nS a? ЗЕ Ly “16 916 el: GA 135 267 27 ae ena ena ar
aro 67d УС а use 873 116 4E 136 ate er arc Boo ano ве
Gel В = si . B36 ass 120 ce 137 211 es azz вай ana ag
aes ATTE ЗЕ ; G 44 629 151 59 12% el: SH ale 060 aan ag
fez ov ЗЕ + ad: 045 053 pig 2 139 217 SE ec Вен aña ca
de 166 46 1 ada aa 117 4F 140 214 Sn ez goo бей ее
BES 161 41 = 956 GTO 120 56 141 21% SD zz san ew en
añ 192 ЧЕ z 51 21 121 51 14: gite SE azz eno ago ur
Bev те: 42 - 045 ads ass eL 145 217 EF G=2 aug ena so
EZ 144 44 4 as. 182 lez ve 144 сей se 032 Boo aoû 60
es 105 5 pl 053 azz 123 55 145 “el al ase geo ao ве
его 186 4c а 654 054 124 54 146 22e se Bue aña ana ac
eri 167 47 + Maz 142 ace ZR 147 Ces a. Oc вас 566 er
arc 116 5 7 aso ass 125 55 143 224 4 e 066 ana 06
are 111 44 E mE ace 125 = E 149 25 3 65e сес aap eo
a74 11€ 4 A 9 Bez Get 127 Sr 150 get se ez post вов ва
ars 117 ЗЕ Ga? 047 a 2F 151 227 sr bse бей зай Bo
Lower © birts of EZ kevcode aniy.
B-4 Code Charts
98720 Hardware
RN CLOde: +
DEC OCT НЕХ
152 2306 se
152 231 as
154 232 SH
155 2373 YE
15¢ 234 Эс
157 23" as
156 EI se !
159 237 SE |
166 246 не
161 241 Hi
165 ne fs
1€7% 747 AZ
164 249 Ha
165 24945 q
15€ 4e He
167 Zar FT
LEE 234 A
1ES «51 A
176 - 25e HA
171 oz HE
172 254 AC
177 255 Ar
174 ST SE
175 257 HF
17€ ско En
177 261 Fl
175 ces EC
178 262 ET
186 24 Eg
181 “ts E,
1er EL FE
182 cr ET
184 Tu EE
185 E71 ES
1€&€ c'e EH
127 ато EE
155 74 EL
123 e ED
150 ve FE
191 art EF
19 зай се
19% 381 C1
144 38 De
195 sus Do
19É 304 C4
197 365 СЕ
195 E Ce
199 jar cv
све a1 ce
al 311 os
ès 21 CA
287 317 СЕ
204 314 Li
cas =15 Ii
“ue 21€ CE
Zar =17 LF
265 320 ре
cas Jel Ii
216 ee DE
211 227 I=
le 224 La
213 320 DS
214 26 TE
215 зат 1?
Zi 354 ne
Z17 331 Ta
le 33 DA
215 ZH DE
226 224 Ic
221 235 DI
Zee ЗВ TE
Zen 357 DF
224 2406 EG
225 341 E1
226 за EZ
227 347 Es
225 344 Ed
225 345 5
+ Lower © bits of
+»
+)
986 ann 96
125 175 7D
Br 117 4 E
976 114 4C
192 381 ci
196 364 C4
7 145 19 305 сё
а 141 194 3092 cz
3 142 195 363 Cs
E ae 144 сай 96
я MEE 195 1 s1
я 145 189 за? с?
A 147 гей 216 ce
i нес 146 224 94
E ana 149 225 9e
E. Jus 13e 218 E
Hi aus 137 211 Es
y mil 139 21 EE
= azz 156 con Ge
E, azz 151 227 97
a 251 наб gan ие
с, Aza 145 224 94
Fe alc 146, 214 er
Е. ar7 15€ 234 Эс
J 54 aña ane ей
= are gag ana aa
a 293 15: 23H se
7 als 14€ 222 az
4 E52 135 cor er
4 252 147 2232 93
= aa! nel ga! Gi
BS 12% 281 El
+ 613 141 215 ЭТ
E, a. 153 21 ss
Lp ple 13€ 212 ER
E #43 ue 316 CE
. a4 21 2H =
. 44 217 331 ре
+ вас 171 25 HE
1 дя сет 217 CF
= Bei cae ZZ] ре
= esl cus 321 "1
- 045s 1753 cas AD
4 a: 210 222 De
5 053 211 322 Dz
É 0s 4 212 324 D4
+ нас 179 292 AÑ
7 Bes 213 325 DS
= Oe 214 326€ De
Э as, 215 227 Tr
G47 175 257 RF
se 14 4 ван ий
124 253 TE FE
r пог el Zn TE
1 Zé вас aE ва
us ro emi El
fe GE4 15% der 7
ao 179 Ze Eo:
1 036 186 254 Ed
Bnav 1&1 cés E
as4 6949 135 SE
: ALE 15 Zee Le
+ adi War as. 2H
f 94 ea 25 A=
| Mal 163 2% 4 AY
nas oui gran fa
+ 647 171 25 AE
n 123 125 173 Е
- 12% 12% 175 7L
: ASE 172 ZEI El
" ed 191 277 EF
ea 172 254 Ac
. 052 174 «SE НЕ
- EZ GE az? =F
BT ЕЙ 24a AC
CC Bro ==35 Зе? EF
ea añ TE Fi
“220 keycode Cris.
o — Ae Ee am wm ae ве ее ке == == ww == == —
250 346 ES
231 347 ?
222 356 ES
233 351 ES
234 35 ER
225 253 EE
23€ 354 EC
237 355 ED
238 356 EE
239 357 EF
24e SEN FE
241 361 F1
242 36 Fe
243 263 Fz
244 ЗЕЯ Ра
235 365 =
c4é 366 Fr
247 Ie? Fr
245 =76 FE
249 371 РЭ
250 ave FA
£51 373 FE
25 374 FC
252 “re FI
254 IVE FE
255 377 FF
= = == == == == == ее == == +=
К 875
L 676
G Get
Li VET
E Ge 9
F GE =
T ara
Y as
u 855
I er
A GAS
& GES
I are
F ere
с 671
H ere
2 “74
М avy
= e E
e ase
C Aer
y ESE
E vee
HH ere
e
6
— — — mu we me Ee me we A = ee == == = —
235 353 EB
236 354 EC
241 3261 F1
247 367 Е?
229 345 ES
242 362 Fz
244 364 Fa
249 371 FS
245 365 FS
231 351 ES
225 341 E 1
243 363 F3
228 344 E4
230 24€ 6
231 347 E7
232 356 ES
234 252 ER
237 355 ED
256 372 FA
24€ 376 FE
227 243 ES
24€ GEE FE
ZZE 342 2
236 35€ EE
Gas gag ag
dus 206 ga
C-1
Appendix C
Interface Board
Diagrams
The following diagrams document the interface board switch positions and meanings of the
98622A, 98623A, 98624A, and 986Z6A Interfaces. In particular, note the Remote Keyboard
Jumper on the RS232 Interface Board of page C-4. Cutting this jumper enables the interface
as a power-up remote keyboard, described in the Systems Programming chapter of the 9825
Operating and Programming Reference (p.7-19).
These diagrams are included here as quick-reference information only. For more explicit in-
formation regarding initial set-up requirements, refer to the appropriate interface installation
and service manual.
GPIO Interface Board
o GFIO 98622
ESTA I [PES di à
6, o PSTS GND- 1 26k-GNO
= HSHK 0015 -—| 2 27 F— DI15
Data in Clock Source Switch UT | == DIN DI 3 28 F-- Did
(See Table 2) = NDOUT UPPER NO13.—4 4 29 L— DI13
= (READ) BYTE DOiz— 5 30-0112
DOUT Le BSY | DIB-15 DON — 6 31-DII
CLEAR = RADY NO1Q — 7 22 b— D110
JUMPER PAD DO9 — 3 23 -— DIS
° : E y owen DOS 3 4-08
Shown in Select == RDY BYTE 7 À с
oce té Tosiian | DO6—1: 96-—DI6
F1 U38 ! D35 — 12 37 — DIS
10 | DO4 113 J1 38 -— DIA
se [=)? D03— 14 39h--13
CODE |]: J1 DO2— 15 40 }— Di?
=)4 | DO1—{16 41 |— DI
_ tl ’ DOO — 17 42 }— Dio
Interrupt Level Switch 1 0 GND — 18 43 — SAFETY GND (INNER SHIELD)
(See Table 1) U39 PCTLH19 44 —PFLG
+4 Po — 20 45 -- PSTS
3 PRESET —21 46—-EIR
a Burst enabled if CTLO—22 47|-STie
+5V 4A jumper is removed CTL1 —123 48 -— STI1
e GND — 24 49 --- GND
BURST Q SAFETY GND (OUTER SHIELD) —25 50-—nc
Table 1: “©
Interrupt Level Switch
Interrupt SW. Settings
Level 1 0
3 0 0
4 0 1
5 1 0
6 1 1
Table 2: Data in Clock Source Switch Table 3: Option Select Switch
Switch Switch
Name RDY BSY READ RDY BSY READ Position DOUT DIN HSHK PST PFLG PCTL
Switch |PFLG busy PFLG ready [READ of | PFLG busy | PFLG ready {READ of Name
Position | to ready to busy upper to ready to busy lower Function | Invert Invert Full/Pulse {Invern Invert Invert
О ог transition transition — [data input | transition — | transition (data input Data Out [Data In | Handshake |PSTS PFLG PCTL
Closed register register Switch Low=1 |Low=1 | Full Low=OK | Low=Ready | Low = Set
D18-15 Upper Byte DI0-7 Lower Byte Position High =0 |High=0 High = OK | High = Busy | High = Clear
Under no circumstances should Under no circumstances shculd Oper or 1
more than one switch from the more than one switch from the Switch Low=0 |Low=0 | Pulse Low=OK | Low=Busy | Low = Clear
upper byte clock source switch lower byte clock source switch Position | High=1 |High=1 High = OK | High = Ready | High = Set
be in the closed or O position be in the closed or 0 position Closed 0
at the same time. at the same time.
[AO
sweibel(] pirog a3epajUI
Table 1: U24 Peripheral Status Switch BCD Interface B oard
BCD 98623
Descrioti Switch Positions
escription e
O OH U24 Peripheral Status Switch U15 Handshake Switch
- (See Table 1) N | (See Table 2) ет | 019-4 1 33 |-- 019-8
Option Format | Std. Format Option Format
. . ——J0 ob DI7-4 — 2 34 — DI7-8
Data Pos. True. Active High | Inverted и 0 SEL DI1-4 3 35 + DI1-8
Sign 1 Pos. True. Active High | Inverted Я CODE с DI3-4 —À 4 36 -— DI3-8
10 hown in Select DIS-4 — 5 37 |— DI5-8
Sign 2 Pos. True. Active High | Inverted U2 [=] 4 = Code 11 Position Dig-2 — 6 38 |— D19-1
Overload Pos. True. Active High | Inverted 1 0 | DI7-2— 7 29 -— DIZ-1
9 nterrupt Level Switch > lg dolo.
. : (See Table 4) v6 pa
Table 2: U15 Handshake Switch ) DIS-2-19 41 |—Di3-1
Descriotion Switch Positions DIS-2 — 10 42 |--- 015.1
Р Оп Off 500000 a — SGNt—11 43|—DIt0-8
Device Flag A Active High. DFLGA | Inverted. DFLGA 5D 55 ) | o — e de — ра
I -A — ln -
Control À 1 or 2 (Type) |CTLA-1 CTLA-2 Pm UN DI2-4— 14 46— DI2-8
Control A (Std. or Invert) | Active High. CTLA | Inverted. CTLA DI4-4 — 15 47 |— Di4-8
Device Flag B Active High. DFLGB | Inverted. DFLGB P1 12 Ji DIG-4 —1 16 |, 48 /-— LOGIC GND
Control B 1 or 2 (Type) |CTLB-1 CTLB-2 — oe — Ш м — roa ND
Contrel B (Std. or Invert) | Active High. CTLB | Inverted. CTLB | DIB-2 —. 19 51 |— LOGIC GND
| Di2-2 —4 20 52 — LOGIC GND
Table 3: BCD Code Table 4: DI4-2--421 53|— SAFETY GND
(Рос. True Logic | ASCII Character Interrupt Level Switch oy aA a o oe — ne GND
Го SW. Settings ЖЭУ, > — — Di2-1
Coco 0 Interrupt = en. — Di4-t—24 s6—DIB-1
0001 1 D 16-1 — 25 57 }—DI10-1
0010 2 3 0 0 DO-0—26 58 |-- 00-6
0011 3 4 0 1 DO-7 — 27 59 +— DO-5
5 1 0 DO-4 -- 28 60 |-— DO-2
0100 4 6 А 00-329 61--0D0-1 -
0101 5 OT — DFLGA —30 62H CTLA —
01110 6 | — DFLGB-—31 63 |--- СТВ —
0111 7 = — PRESET —{32 64|— +5V REF —
1000 8 NOTE:
1001 9 All five logic grounds should
1010 (L.F.) line feed Table 5: Standard Format be paralleled at peripheral.
1011 (+) plus Name SGN1 | DIL |DI2| DI3 |DI4 | DIS | DI6 | DIZ7 | DIS | Exponent | SGN2 | DI9 | Comma | OVLD |DI10 |Line Feed
1100 (.) comma Char. + — X X X X X X X X E + X О ог 8 X LF.
1101 ( —) minus Info. MSD k— > LSD 0=OVLD
1110 (E) exponent 8 = OVLD
1111 (.) decimal point Code +1011 1110 $4 ON 1100 0000
(Pos. True) | - 1101 | - 1101 1000 1010
Table 7: Optional Format (Read Two BCD Devices)
, First Device (FD) Second Device (SD)
Table 6: Overload Table Name SGNI| DIG |DI2! DI6] DIS |Comma |SGN2]DI10|DI1 ] DI5 | DI3 | DI7 | Letter EJOVLD] DI9 [Line Feed
Description OVLD| D19 y 7
Char + — | XIXEXIX + -| Хх | Хх | Хх | X | X Е Oor8|0or8| LF.
No Overload 0 0 FD SD
i ” dio -
1" Device Overload 8 0 nfo. М50|+- ~ LSD MSD = | ESE (see table)
2"' Device Overload 0 8 Code + 1011 + 1011
Both Overload в | в | |(Pos. True) |- 1:01! | 1109 | 1101 Mio 1010
swelbeyq pieoyg ээе1214]
E7I
RS232 Interface Board
= В RS232 98626
о Remote Keyboard Jumper о Li ‘ CT
Remove to enable power-up о Baud so Switch
Interrupt Level! Switch remote keyboard. 0 — _+ (See Table 2) OCO4 — 1 26 — OCD3
(See Table 1) : NC — 2 27H NC
10 HB ne— 3 28-nc
0 REMOTE! U2 N—4 29-—nNC
1 = Line Control Switch |
U20 | Е2| | (See Table 3) 53 PEN
= NC 4 6 31 FH OCR3
= NC—47 32|—GND
NC— 8 33 F— NC
D R1(OCR1)— 9 34 |-- ос
+12V 4 10 35 == +5V
-12V— 11 36 — +5V
T,D — 12 37 — GND
Pi RTS —{13 Ji 38}— GND
; DTR — 14 39 == GND
Table 1: Shown in Select , [ut SRTS (OCD2)—{ 15 40|—ORS (OCD1)
Interrupt Level Switch NC—{16 41}— NC
SW. Settings ed NE—17 42/=R.0
Interrupt : q se = 0 GND — 18 43 |— Ne
3 0 0 Е = 4 мс—120 45}— DSR
4 0 1 NC —4 21 46 — CD
5 1 0 +5V.4A Y Nc—22 — 47|— SCD (OCR2)
6 | | DEAL Nc—23 48}— LOGIC GND
win] SHIELD GND —{24 49}— nC
ra 5X F2 CTS О Nc—25 | 50 |-- мс
Table 2: — i2V,.DA 1 +12V,1.5A FII(OCR1) | (0
Baud Rate Set Switch CN из › u
CONNECT JE
Switch Settings E
Baud Rate| 3121110
50 01 0/0!C
75 0101011
110 | о| 0 |110 |
134.5) ОО 11 |1
150 0t11010
200 | о | 1 |0 |1
Table 3: Line Control! Switch Settin
30 |o|1]1j0 и 9
600 O| ri Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit
1200 1101010
1800 1101011 Handshake Type Farity Type Parity Enabled Stop | Character Length
2400 1101110 Don't Care Don't Care 0/0 = Odd Parity 0 = Stop Bit Added 010 = 5 Bits/Char
3600 1/01 111] Enable я
Reserved Reserved 0|1 = Even Generation 1 = 1.5 Stop Bits @ 0/1 = 6 Bits/Char
4800 ! 11010 For Future For Future and 5 Bits/Char
7200 11101 Use Use 1/0 = Parity Bit = 1 Checking 1/0 = 7 Bits/Char
9600 111110 1 = 2.0 Stop Bits @
19200 1 1 1 1 111 = Parity Bit = 0 1 = Enabled 6. 7 or 8 Bits/Char 1]1 = B Bits/Char
AO
suelberg p1eog asejiaîu]
NOTE: INTERNAL POWER-UP ADDRESS
controller, decimal 21
If not controller, decimal 20
Pi
Table 1:
Interrupt Level Switch
Interrupt SW. Settings
Level 1 0
3
= с ©
— OO — ©
4
5
6
NOTE: Highest allowed value of HP-IB primary address switch
REMOTE
.——e
F1
+5V 4A
ee
Jumper out, remote enabled
=
O
Shown in Select
Code 8 Position
1 0
SEL a
CODE : UN
= 4 |
3) 0 un
Juraper in, remove not enabled
Interrupt Leve! Switch
(See Table 1)
1 0 1
LSB |
£310 1.ADRS-1
3]: HP-IB '
4 +
MSBIES =
SYS CTL
U17
System Controller 0
Non-system controller
©
e
is decimal 30. На decimal 31 is set on the switch
the system will default to decimal 0 primary address.
HP-IB 98624
DI91 — 1 13 -— DIOS
D102 — 2 14 — DI06
0103 — 3 15 --- 0107
0104 — 4 16 }— DIOB
EOI— 5 17 REN
DAV— 6 H 18 }— GND
NRFD— 7 19}— GND
NDAC — 8 20 }— GND
IFC— 9 21 |— GND
SOR—10 22}— GND
АТМ — 11 23 — GND
SHIELD GND —{ 12 24}—GND
swieibei] pieog aoejiay]
O
C-6 Interface Board Diagrams
Appendix D
Alphabetical List of
HPL Extensions/Revisions
acl r [number of pages]
Clears screen, allocates specified number of scrolling pages
adump select code
Dumps alpha screen to printer
aoff
Alpha off
aon
Alpha on
belt strings # bytes per line | y function]
Plots binary data in string to the graphics screen.
Function: 0 = OR, 1 = AND, 2 = EOR, 3 = STORE
cret
Returns to the program from an on-cycle routine.
cycle
Returns the number of clock cycles since last executed.
One cycle = 10 milliseconds.
data numeric or string constant [ snumeric or string constant]...
Provides constants for re ad statement variables.
dret |
Returns to the program from an on-delay routine.
gclr
Clears the graphics screen.
dd ump select code
Dumps the graphics screen to a raster-scan standard printer.
goff
Turns the graphics display off.
gon
Turns the graphics display on.
gPtr xcoord +ycoord[ type]
Draws a graphics cursor at the specified location. (type: 0 = off)
D-2 HPL Extensions/Revisions
{load string expression
Loads the graphics screen from the specitied string.
9store string expression
Store graphics screen to the specified string.
Kloff
Turns special function key labels off.
klor
Turns special function key labels on.
Knob
Returns the accumulated knob count. CCK rotation is negative valued, CR rotation is
positive valued.
Kret
Returns to the program from an on-knob routine.
kstat
Returns knob status: Bit: 6 = Knob, 5 = Control, 4 = Shitt
mret
Returns to the program from an on-match routine.
ms i { : device format { controller select code [ »unit number]]]
Sets the current system disc drive and format.
Drive formats: I=internal disc, M=8290x minifionpy, 5 =2868519825), G=98585(LIF),
H=9895(9825), J=9895(LIF)
on cycle time [ »label]
Sets up clock periodic interrupt service routine. on cycle with no label specified can-
cels clock-cycle interrupt service.
on del ar time [ +label]
Sets up clock delay interrupt service routine. on dela» with no label specified cancels
clock-delay interrupt service.
on knob [label]
Sets up Knob interrupt service routine. on knob with no label cancels Knob interrupt
service.
on match time[ »label!!
Sets up clock match interrupt service rouiine. on match with no label cancels clock-
match interrupt service.
Pbheer [frequency [ »duration]]
Programmable beep with frequency (0-5167 Hz) and duration (0-2.56 seconds).
Pi
Returns value of pi.
PKbd [string]
Executes ASCII string (as if it were pushing keys).
HPL Extensicns/Revisions D-3
Prtsc select code [ ywidth]
Sets system printer select code (and width)
rch [file number]
Records the binary program in memory to the specified tape file.
rds (buffer namel » type [ » empty [ + fill [ + dim JJ] status
Extended buffer status function. ВЕ
re ad variable name [ svariable name]
Reads data statement constants into variables.
rkbd select code [ stype]
Enables remote keyboard: type 1 = ASCII, type 0 = 9826A
rstr [label]
Resets data pointer either to line 0, or to “label” if specified.
`
rtime
Returns internal clock value in elapsed seconds.
saveb file name
Saves the binary program in 1 memory to the specified file.
sfk key number [ » definition string | label string]]
Defines SFK (0 to 32) and optional soft label.
sq r variable |
Returns the square root of the specified variable.
stime seconds
Sets the internal clock to the specified number of seconds.
sysboot [system name)
Boots language system specified from disc or ROM.
tabx» xcol syrow
Moves print position to column x (0. 49), row y (o.. 17).
wtc buffer name [ +type[ »empty[ +fill]]]
Write buffer pointers to specified buffer name.
wtc HP-IB select code, value | |
Resets HP-IB interface. If “value” is <31, sets new bus address = “value”. if
“value” =31, no further action. If “value” >31, “value” configures Parallel Poll res-
ponse.
D-4 HPL Extensions/Revisions
9826A HPL Error Messages
There are some new error messages specific to the 9826. These are the “XF, and ‘P9”
error messages.
HPL Language Errors
ХО No memory or I/O card present at specified address. This error should not be
encountered when programming from HPL. Consult your HP field sales and
service office for advice concerning this error should you receive it.
X1 A read statement was executed with no data remaining. Either a data state-
ment must be added or a rst r statement must be added to reset the data
pointer to the desired data statement in the program.
Disc Programming Errors
fo Unable to access disc controller. This error has the same cause as the error
which issued the "DISK IS DOWN" and "UNABLE TO ACCESS DISK
CONTROLLER" messages, except the error is now trappable by on err.
fi No DMA card present for 9885 disc controller.
ft? Invalid msus syntax. Probable illegal device/format specifier.
f3 Directory entry field overflow. Attempted file copy not possible.
Та Illegal structure on LIF format disc. The disc cannot be repacked.
tS Disc copy attempted to a significantly larger disc. Use file copy to back up
contents of disc.
ТБ Disc copy attempted from 9825-compatible disc to LIF disc, or vice-versa.
Only file copy is allowed across media formats.
+7 System record is not valid for LIF disc.
18 System record is not valid for 9825-compatible disc.
f9 Statement not implemented on 9826A. (See Disc Programming Technical
Appendix for a list of disc statements that are not implemented.)
Plotter Programming Errors
P9 No graphics hardware present. If you have a 9826A, and psc 16 has been
executed, you should not experience this error. Consult your HP field sales
and service office for advice.
Ea
Part No. 09826-90040 Printed in U.S.A.
Microfiche No. 09826-99040 First Edition June 1981
">
/
Descarcă
Doar o reamintire prietenoasă. Poți vizualiza documentul chiar aici. Dar cel mai important, AI-ul nostru l-a citit deja. Poate explica lucruri complexe în termeni simpli, poate răspunde la întrebările tale în orice limbă și te poate ajuta să navighezi rapid chiar și prin cele mai lungi sau mai complicate documente.
Publicitate