HP 9826, 9836 Computers Operating Manual
Below you will find brief information for HP 9826 Computer, HP 9836 Computer. This manual provides guidance on the installation, testing, and operation of the HP 9826 and 9836 computers. It includes instructions for setting up the system, performing system tests, and a programming update covering the HPL 2.0 language system.
Advertisement
Advertisement
HP Computer Systems
-
HPL Operating Manual
and”
Programming Update
for the HP 9826 and 9836 Computers
KMrackamn
HEWLETT
Г) РАСКАНО
Warranty Statement
Hewlett-Packard products are warranted against defects in
materials and workmanship. For Hewlett-Packard Desktop
Computer Division products sold in the U.S.A. and Canada,
this warranty applies for ninety (90) days from date of
delivery.* Hewlett-Packard will, at its option, repair or replace
equipment which proves to be defective during the warranty
period. This warranty includes labor, parts, and surface
travel costs, if any. Equipment returned to Hewlett-Packard
for repair must be shipped freight prepaid. Repairs
necessitated by misuse of the equipment, or by hardware,
software, or interfacing not provided by Hewlett-Packard are
not covered by this warranty.
HP warrants that its software and firmware designated by HP
for use with a CPU will execute its programming instructions
when properly installed on that CPU. HP does not warrant
that the operation of the CPU, software, or firmware will be
uninterrupted or error free.
NO OTHER WARRANTY IS EXPRESSED OR IMPLIED,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE. HEWLETT-PACKARD SHALL
NOT BE LIABLE FOR CONSEQUENTIAL DAMAGES.
* For other countries, contact your local Sales and Service
Office to determine warranty terms.
NN
HPL Operating Manual
and
Programming Update
for the HP 9826 and 9836 Computers
Manual Part No. 09826-90040
Microfiche No. 09826-99040
Start Here
This manual shows how to install, test and operate your new HP
9826 or 9836 Computer.
Hewlett-Packard Desktop Computer Division
3404 East Harmony Road, Fort Collins, Colorado 80525
(For World-wide Sales and Service Offices see back of manual.)
Copyright by Hewlett-Packard Company 1981
NN
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
September 1981...Second Edition. Revised pages: iii, 1-7, 1-8, 1-15, 1-16 thru 1-28, 2-10,
4-9 4-12, 4-18, 4-32, 4-35, A-3, A-5.
January 1982... Third Edition (adds 9836, HPL 2.0, Chapters 5 and 6, and an Index)
09826-90040, rev: 1/82
Table of Contents
Introduction . . o.oo НН vii
Chapter 1: Installation
Introduction .......1020000 0000 LL AAA AA RAR AAA Ra AA RAA a ea ee 1-1
Unpacking the Computer ......... a ee a a a a a a aa a en 1-2
Installation Procedure .................000000 0000000, Aedo A A A a a 1-3
Maintaining Your Computer. . .... PT 1-11
Flexible Discs ......100000 00 LL A AR A AAA RAA A A4 A A A4 A a Aa A Ra a ee 1-12
Disc Handling Precautions . .......... 4 a a ee a a a aa ae een» 1-12
Inserting and Removing Discs ......... i 1-13
Write Protection. . .. 2.0000 000000 0000 AA A Aa A a ee aa 1-13
Data File Compatibility . . ... ad a AAA Aa Aa a a a aan 1-14
Using Discs........1222000 414 La A4 4e 4e Re ea a a ea a a a a ae 1-14
Copying Discs .......012001 02044 a 4 ae ea a ea a a aa a ae 1-15
System Tests. .............e..reorererorereere er eeee een ecercererceoaerecea. 1-17
Mainframe Diagnostics ........02020000 0004444 aa eee ea ea ee a a ea a a a ee ne 1-28
Chapter 2: Getting Started
Introduction . .... LL LL AA AAA A AAA RAA AA 4 AA ee AR ee A ee A eee 2-1
9826 ог 9836? .................... 2.5... AA AR AR Aa A a da a 2-1
Daily Power-up. ......... клввкввенеоео о [PS 2-1
Display Organization . ......... oi e eee eee ree о 2-3
Keyboard Operations. . .... ce 2-5
Character Entry Keys. . .. o.oo 4 a a eee eee aa a ae 2-5
Numeric Pad.........110010000 000 LL ALL A AAA Aa AAA AA Aa A a ae 2-6
Cursor Controls 120000000004 4 LA AAA a ARR A a A 4 A ee a ee 2-6
Editing Lines. . .. 44 aa eee ea ea eee ee ee ea a a a a 2-6
System Control Keys. ...... e ee aa a ae aan as ea ee 2-9
Special Function Keys... ... a aa ae a ea eo ea 2-10
Program Control Keys. . .... ea a aa a a ea a 2-15
Arithmetic Operations . ..... A 4 4 ee a ee a Re ee a a a a. 2-16
Chapter 3: Program Transfer
Introduction LL NA a AAA ndo neranracorarerecveo 3-1
Disc Transfer. ............. 2. LL LL ALL AA AA A a a 4 ee a a a ea aa ae 3-1
Interface Transfer. . . ... A AA a a a a a a a ee 3-2
Programs. RK 3-2
Data. RR AA a ea eee 3-3
09826-90040, rev: 1/82
iv
Chapter 4: 9826 HPL Programming
Introduction ........... 2.20. Ra aaron a Ad dd dd a da 4-1
Mainframe Programming. ............ AA a AA a dd 4 Ad a aa 4-2
The Read, Data, and Restore Statements... .................. .............. 4-2
The Programmable Beep Statement . ...................................... 4-3
The Machine Function. ........ e aadecoda Can noreao. 4-3
CRT Display Control . . ...... 2.2.0.0. endo ea e nooo aeen. 4-3
The Clear Alpha Statement ........... 0. a een 4-3
Highlightingon 9836 . . .... aa eoneooe o 4-3.1
The Alpha On, Alpha Off Statements... ................ ... ................ 4-3
The Key Labels On/Off Statements. ....................................... 4-4
The Dump Alpha Statement. .......... 2.2. aaa 4-4
The Tab X-Y Statement ......... 2.2... edecC. enoererde. 4-4
Read CRT Statements. . ......... 2020000 LA dd A A a A a aa 4-4
The System Printer Select Code Statement ................................. 4-5
Math Functions. ........ LL AR LR NA Aa A A aa 4-5
Flags LL LL ALL A A AAA A NA A A A a a a 4-5
The Cross Reference Statement... ..... 2.2... лк ини, 4-5
The Find Statement... ... 2... 0 erecoed nana a ae 4-5
Tape Cartridge Operations . ......... aaa da à 4-5
Record Binary Statement ......... Aaa nera 4-8
String Variables .......... 0 Re, Ra de dd 4-8
The Value Function. ............ 2. a Ad A A Aa A da a an 4-8
The String Function... .... LL LL A A Ad A A A a 4-8
The Read Statement . ........ LL LL LA A A da a 4-8
Systems Programming. ......... A ee ee A A A Ne A A a ee Re Re A A A ea a 4-9
The On Knob Statement. ......... LL A A a A A a a 4-
The Knob Function .............. 2.0090 r0000r 0 eearecadeoadecaoa daa 4-9
The Knob Status Function ........... e aaa 4-10
The Key Buffer Empty Function .............. 22... 000000000 aa 4-10
The Remote Keyboard Statement ............... 2.2... 00.0 a 4-11
The Press Keyboard Statement ................. eee. 4-11
The Define SFK Statement. ........... 00000 recirec,.. 4-12
The System Boot Statement. . ............ aa a La Aa ae 4-13
Matrix Programming ....... EE a aa 4-13
Array Output 1.000000 0 04 Le a ae A A AAA A A A a A a ea a a a a na 4-13
Disc Programming... ....... AAA AAA A AR A A a A a a a a ea a 4-14
The Mass Storage Unit Specifier .............. i. 4-14
The Mass Storage Is Statement ............ e. 4-16
The Assign Statement. .............. JP 4-16
The Drive Statement... ....... eearecerecoa a. 4-17
The Initialize Statement. . .......... 0recarecereca 4-17
The Disc Type Function ............. i. 4-19
The Catalog Statement.......... ee 4-20
The Killall Statement. . .......... 2.220.000. 0 0 r0aeo 0 enec. 4-21
The Open Statement. ........ 0a00adaa ie oarod. 4-21
The Disc Copy Statement. ........... e 4-22
The File Copy Statement ............. 0re000aaaaea o 4-23
The Save Binary Statement .............. aaa 4-24
09826-90040, rev: 1/82
The Disc Read and Disc Write Statements . . ............... . ... .... 4-24
Unimplemented Disc Programming Statements... .................. ...... .. 4-25
Unimplemented Disc Utility Binaries. .......................... .. .... ..... 4-25
Моге МО ............ 2..5 LL A AA A aa a A LA AA 4-26
Interface Control Operations . ............. LL 4-26
98623A BCD YO Operations. ............ LL LL LL 4-28
98622A GPIO Operations .............. LL LL LL LL LL 4-28
HPIB Operations . . .......... aa LA A LL 4-29
98626A Serial /О Operations ............. aaa aro, 4-31
Internal Clock Access. ............. 20 aaa aaa A 4-34
The Set Clock-Time Statement .............. a 4-34
The Read Clock-Time Function. .......... aaa 4-34
Interrupt Control . ... naaa enaa 0 aaaora, 4-35
The On Interrupt Statement... .......... 0 e aaa 4-35
Interrupt Lockouts. . ........ 2. AL AAA a A a Na AAA A AA 4-35
The On Clock-Cycle Statement. ............. 2. 4-35
The Cycle Function. ......... aaa aaderece ceo 4-35
The On Clock-Delay Statement. ............. a 4-36
The On Clock-Match Statement ........................ ... LL LL 4-36
Buffered VO... aa A LA 4-37
Terminating [/O Transfers. ........ 10410000 LL LL LL 4-37
I/O Buffer Extended Status. . ............. LL LL LL 4-37
МО Buffer Pointer Control ......... LL LL LL 4-37
Saving String Buffers to Disc ........1102000 000 LL LL LL ALL 4-38
Plotter Control... ALL NA a AA A AA AL 4-39
Internal Graphics Control... ........ LL LL LL LL LL aan, 4-39
The Plotter Select Code Statement ............... . .. . . . . .. ..... 4-39
The Pen Select Statement ........... aaa 4-39
Graphics Screen Control Statements ..................... ....... LL 4-39
The Dump Graphics Statement. ............... LL LL 4-41
The Graphics Pointer (Cursor) Statement ........................ .... ..... 4-41
Binary Graphics. ......... aaa aaanadoneca aro 4-41
The Binary Plot Statement ............... aaa 4-42
The Graphics Load and Graphics Store Statements ......................... 4-43
Chapter 5: Powerfail Programming
Introduction ....... ea aenerererocrana, 5-1
What Is It7. LL LL A A AL LL 5-1
Detectinga Power Failure... ......... LL LL LA ALL 5-2
The Power Function. ........... A 11 5-2
The Power Shutdown Statement. . .......... 11 LL 11 5-3
The Power Time Function. .. .......... a rerererarero, 5-3
09826-90040, rev: 1/82
vi
Chapter 6: Color Interface Programming
Color Video Operations. ....................0000;000000 ie e eee eee 6-1
The Graphics Instructions. . ....... ee ee 6-1
Using the Statements in Programs... ............. reee 6-2
Character Animation . . .... oo Rear a ea a a 6 6-3
Alpha Text Programming ........... i A 6-4
Setting the Alpha Print Position. ............ co... 000000000 eee 6-4
Writing to the Holding Registerand CRT .............. oot. 6-6
The Interface Set-up Instruction... ......... eee 6-6
Select Text Color and Inverse Video... ...... iii, 6-7
Summary of Alpha Instructions ........... 0 eee 6-8
Disc Programming Technical Appendix ...................... .... ea eee ee A-1
Code Charts . ......... 000000 00rererenereeorreneorecererera re B-1
Differences in HPL 1.0 and HPL 2.0 . . . ... LL A AA AA Aa a a ae aa» C-1
Alphabetical Syntax Listing ................ erre ee D-1
Subject Index . ..... eee eee e eee I-1
9826A HPL Error Messages ie eee DA Back
Page
09826-90040, rev: 1/82
Introduction
This manual serves to inform the experienced HPL programmer of differences between HP
9825A/B Computers and the HPL 2.0 Language System of the HP 9826A and 9836A Compu-
ters. As you gain experience using the HPL language system, you will begin to appreciate the
changes made to the HPL programming language. In the great majority of instances, these
changes were made to enhance or expand the utility of the HPL programming language, and to
provide access to some of the new hardware features of the 9826 and 9836.
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 differences
between operating the 9825 and the 9826/9836 computers.
Third, read the chapter titled “Program Transfer” so you will know how to get your 9825
programs up and running on the 9826 or 9836.
Fourth, read the chapter titled “HPL Programming” to familiarize yourself with the program-
ming differences and extensions of 9826/9836 HPL 2.0.
Now that you know what you have to do, its time to get to it. Good luck!
09826-90040, rev: 1/82
vii
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 chapter for more information.
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.
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 System Test section in this chapter.
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).
> 2,
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,
220 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 xv Y LINE SELECTOR
CT CT 2207 CT
( —100 ( —100 ( —100- ( —100
120 |] 120 J 120 J 120
240 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
[F 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-0698” 8120-2104 Computer
Power-Input
> > Socket
> << 7
С s >
los E.
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.
HEL 2.0 READY
[If more than one language system is built-in,
the computer allows you to select one. For ex- WHICH SYSTEM?
ample: BH
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 (the right drive
on the 9836) and insert the Language System
disc. Be sure the disc is inserted with its label up
and facing you, as shown. Then close the door
and press the power switch in.
09826-90040, rev: 1/82
Installation 1-7
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 Z,0 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
supplied with your computer.
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. (Be sure the system disc is in the
right-hand drive on the 9836.) Then close the drive door and press ( SHIFT) (PAUSE). 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 under System Tests. 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.
09826-90040, rev: 1/82
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:
123456 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 A
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 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 standard memory
board is 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.
09826-90040, rev: 9/81
Installation 1-9
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
“1” indicates switch is open: “0” indicates switch is closed.
98254A Memory Board Starting Address Switch
(shown set to address FC)
The 98256A Memory boards contain four 64k blocks, but only six switch segments are needed to
determine the address block. Segments 6 through 3 determine the first hex digit; segments 2 and
1 determine the second hex digit. For instance, this switch is set to binary 110101xx which covers
starting addresses D8, D9, DA and DB (the xx segments are don’t cares):
Note
Some boards may have six
segment switches. A dot in the
lower-left corner indicates the
OPEN position of each
switch.
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.
09826-90040, rev: 1/82
1-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 allows 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 configure the card for your
system. 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 System Test Disc 1 in the disc drive and close the drive door.
Switch the computer on. The system test program is automatically loaded.
В © ho
When the initial System Test menu is displayed, press either Clean heads softkey, k1 or
k6. Then follow the displayed instructions.
09826-90040, rev: 1/82
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 5% 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 on.
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
notin 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.
e 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.
Note
Do not use more than two layers of adhesive labels on a disc. Addi-
tional labels could cause the disc to jam in the drive or prevent
reliable disc operation.
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 —
. . . a eu,
determines whether the disc drive can write in- 0,°%4,
. . . Ay,
formation on the disc. When the notch is covered, д, дб
pds . . . . 4%, Der
it's impossible for the drive to write on the disc; thus Sa
information already on the disc is protected from o
. . ._ AA
being written over or erased. This is useful whena | Fo
disc contains source information which should only ’
be read.
)
Labels are supplied with discs to allow you to cover О
the write-enable notch.
\ 7
oxide write
surface enable
notch
1-14
Installation
Data File Compatibility
The built-in disc drive initializes discs in a standard HP mass storage format called LIF (for
Logical Interchange Format) ensuring that files originated by one HP 9826 or 9836 will be
compatible with other 9826 or 9836 computers and Language Systems. The standard format
also allows the computers 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/9836. Type ASCII files originated by the HP
9826/9836 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 System disc!) is to insert it as de-
scribed previously, and initialize it. You must initialize a disc whether you are using tape file
commands or disc programming commands. To initialize a disc in the internal disc drive, unit
Zero, execute
init "51 +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 HPL Language System. Additions and extensions to 9825 disc program-
ming that are provided for the 9826 and 9836 are described in the Disc Programming section of
Chapter 4 of this manual. Some of the technical aspects of disc programming are discussed in
the Disc Programming 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
“PROGRAM1”
press: save (this is special function key k0)
type: PROGRAMI (this displays save "PROGRAMI"”)
press: EXECUTE (the program is saved to disc)
To retrieve that program off the disc, a similar procedure is followed.
press: get (this is a special function key k1)
type: PROGRAMI (this displays set "PROGRAMI1")
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)
09826-90040, rev: 1/82
Installation 1-15
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 Idf 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 on the 9826. On the 9836, use the
“copy” statement described below. The “‘cbackup’ (complete backup) program automatically
copies all files from one disc to another. The ‘“‘ibackup’ (individual backup) program allows
copying selected files to the same disc or a second disc.
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.
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.
The *“‘cbackup’ program overwrites any files on the destination disc. The program also auto-
matically initializes the destination disc if requested.
On the 9826, 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 a (EXECUTE
2. Insert the HPL Utilities Disc in the drive and close the drive door.
3. Load and run the cbackup program: det "chackupr" (EXECUTE
4. Follow the displayed instructions.
09826-90040, rev: 1/82
1-16
Installation
Note
Be sure to press the CONTINUE key when instructed, not the RUN
key. If RUN is pressed after the program has started, the pro-
gram must be stopped and restarted. Return to step 1 above.
On the 9836, follow these steps:
Load the HPL Language System.
Insert the source disc into drive O, the right-hand drive.
Insert the initialized destination disc into drive 1, the left drive.
оо юн
Execute: copy "aI 0" sto" +" sl"
09826-90040, rev: 1/82
Installation 1-17
System Tests
The computer automatically tests its read/write memory each time power is applied. After this
test is passed, the language system is loaded. Other tests are available for you to check interface
cards and selected HP devices connected to the computer. These tests are stored on the System
Test Disc supplied with the computer. This section describes how to load and run the system
tests.
The system tests can be run on either an HP 9826 or 9836 Computer having either a soft-
loaded or a built-in language system. The test program requires a computer with at least 196k
bytes of read/write (RAM) memory. When using a computer with built-in (ROM) HPL, how-
ever, only 64k bytes of RAM are needed. The computer automatically loads a special operating
system from the System Test Disc when the computer is switched on.
Note
The System Tests will not run on a computer with ROM BASIC and
only 64k bytes of RAM.
If the computer cannot load and successfully run one or more of the tests as described here,
switch the computer off and call HP for service. Service offices are listed at the back of this
manual.
Loading the System Tests
If the computer has at least 196k bytes of RAM, follow these steps:
1. Switch the computer off.
Insert disc 1, 09836-10034, in the disc drive and close the door.
3. Switch the computer on. The computer automatically does its memory test. Then the test
operating system and system test program are loaded from disc.
Note
If the computer does not have sufficient user memory (RAM) to
automatically load the operating system and program, an error is
displayed. If the computer has ROM-based HPL and 64k bytes of
RAM, you can still run the tests by typing in:
get "AUTOSTH" ,0,0 [ EXECUTE
09826-90040, rev: 1/82
1-18
Installation
The system tests display a series of menus, allowing you to select various tests and enter
parameters. The initial menu is:
System Test Prodram for 98Z26A/36A (revision A)
i be be WEE Ee mms Me MM MMe Gams Mme mas E. 6. tam em ems mmr she AMM MA MA AER FER RRR FR TREN MM Mam Ma mR ER We еж dee ee A ae a
Press a softkey to select either:
+ 1/0 and Peripheral tests; or
* the internal disc head cleaning routine
. tP_ 11/0 and | Ciean_ | | Exit
\ D
Select the test group by pressing one of the appropriate softkeys. For instance, to run the I/O
and Peripheral tests press either К! ог Кб.
The selected tests are now loaded. See the appropriate instructions on the following pages.
For details on running the clean heads routine, see page 1-11.
The EXIT Softkey
The system tests display an EXIT softkey at various times. Whenever an EXIT softkey is
displayed, you can press it to cancel the current operation. The program will either return to
the previously displayed menu or exit the tests altogether.
09826-90040, rev: 1/82
Installation 1-19
Interface and Peripheral Tests
After selecting the interface/peripheral tests, the computer lists the interfaces currently avail-
able. For example:
a LOGGED-IN SELECT CODES: a
7 int. HP-IB
iz GPIO
16 CRT XX XX À À À À 4 0 0 HE M ME SE SE SE SE SE SE IE IE IE IE SE SE SE EE EEE
* *
* *
% NOTE: +
* THE MAXIMUM EXTERNAL SEL- *
+ LECT CODE WHICH WILL WORK *
* WITH THIS TEST 15 15. *
* *
* *
+ *
ххх ххх ххх Хх IE SE IE JE SE DE SES SE SE SE SE SE SE DE SE DE
Do vou want error logsging resricted to the CRT?
; EE No EHEN
N J
The computer logs all available select codes. If an external device to be tested is at a select
code above 15, change the interface select code before continuing:
1.
2.
3.
4.
Exit the system tests and switch the computer off.
Remove the interface card and change the select code to an unused number below 16.
Reserved select codes are listed in chapter 1.
Re-install the interface card and switch the computer on.
Reload the System Tests and press the I/O & Periph. softkey.
Error Logging — After reviewing the available select codes, specify where any errors occur-
ring during the tests should be logged. Press the Yes (k0) softkey to select error logging on the
internal display or press No (k1) to log errors on an external device.
If you select external error logging, use the cursor knob to move the displayed arrow to the
correct device selector. Then press Choice Complete (k0 or k5).
Note
The error-logging device cannot be the same device to be tested.
09826-90040, rev: 9/81
1-20
Installation
Select the Test — The next menu lists the tests available. Specify the device to be tested by
moving the displayed arrow next to the product number and pressing Choice Complete (k0 or
k5).
Specify the Device Selector — The next menu allows you to select the device selector. Move
the arrow to the correct number and press Choice Complete (k0 or k5).
Specify the Number of Test Cycles — To run the test once, simply press Choice Complete
(k0 or k5). Alternately, move the arrow to the desired repeat factor and press Choice Com-
plete.
Specify any Optional Parameters — Some device tests support optional parameters, such
are running a “long” or “short” test. An optional menu allows you to select these parameters.
Refer to the optional parameters listed in the appropriate following section. Then move the
displayed arrow to each selected parameter and press Choose param (k0 or k5). When you're
done choosing parameters, press (К1 ог Кб).
Review Selections and Run the Test — Before starting each test, verify the displayed test
title, device selector and any selected optional parameters. Read the appropriate following
section so you know what to expect. Then press Start Program (k0 or k5).
GPIO, RS-232, BCD and HP-IB Interface Tests
These tests check interface card functions by directing you to move switches on the card.
Before starting each interface test, follow the next steps.
Note
Most interface tests require use of an extender board and a test
connector, as describes below.
CAUTION
SWITCH THE COMPUTER OFF BEFORE REMOVING OR IN-
STALLING INTERFACE CARDS.
1. Switch the computer off and remove the interface card.
Note the setting of each DIP (dual in-line package) switch on the card. Return each
switch to its original position after completing the test.
3. Install the card extender board, part no. 09826-66544, in an interface slot and plug the
interface card into the extender board. See the next photo.
4. Connect an appropriate test connector on the interface card:
Interface Test Connector
HP 98622A 98622-67950
HP 98623A 98623-67950
HP 98624A (use the built-in HP-IB)
HP 98626A 98626-67950
HP 98628A 1251-6625 (male)
1251-6624 (female)
09826-90040, rev: 1/82
Installation
CAUTION
USE THE CORRECT TEST CONNECTOR. RUNNING A TEST
WITH THE WRONG CONNECTOR MAY DAMAGE THE INTER-
FACE CARD.
5. Switch the computer on, load the System Tests and start the appropriate interface test.
Follow the displayed instructions to check the interface functions. If any errors are log-
ged, note them and call HP for service.
The 98622A GPIO Test automatically tests a 98620A DMA Card when it’s installed and the
Burst jumper is removed from the GPIO card.
Internal HP-IB Interface Test
The int. HP-IB test allows you to check the built-in HP-IB interface. The test requires use of
an second HP-IB interface card, HP 98624A, and a standard HP-IB cable. Follow the display-
ed instructions to run the test.
The int. HP-IB test automatically tests an 98620A DMA Interface card, if installed.
HP 2631 Printer Test
This test allows you to check an HP 2631A/B/G Printer. The test assumes the printer is
connected via the HP-IB.
Be sure to load 14-inch wide paper and align it at the top-of-form (TOF) mark. Reset the
printer and switch it on-line. Then press Start Test (k0). The test generates a four-page print-
out. A sample is shown.
09826-90040, rev: 9/81
1-21
1-22
Installation
Page one includes vertical form control tests and various line spacings:
2631 EXERCISER
SINGLE
SINGLE
DOUBLE
DOUBLE
TRIPLE
SPACE
SPACE
SPACE
SPACE
SPACE
WUARTER PAGE
1
La:
A
IET ISIS
LINE
LINES
LINES
LINES
LINES
I. INES
LINES
LINES
LINES
LINES
LINES
LINES
LINES
LINES
LINE,
LINES
L.TNE +
INES
AA
e
rom
DC de
GLUTLLUL EDEN
Bü Om НЕ
PER
PER
PER
PER
PER
PER
PER
PER
PER
РЕВ
РЕК
РЕН
PER
PER
PLE
Е
TOOT o DT TT TAO
p
2
РЕ
Fi
РЕ
PI.
Pi
E o.
f
VFC SLEW
VFC SLEW
МЕС SLEW
VFC SLEW
UFC SLEW
VEC SLEW
INCH xxxx
INCH xxxx
INEM xxx
INCH xxxx
INCH xxæx
INCH XXX X
{МН хх хх
INCH xxx»
INCH xexx
INCH xxx
INCH x* Xx
INCH xxxx
INCH xxx
INCH xxxx
INCH xxxx
TNCE xXx»
SOCIO J FC оком, ME CE NE
POE PO IE ROA SNE SOX 5 Xx OO
FC FORE HOE RICHIE UE UE SEE DR
Я
мк кк жж ЖЖ
ON 985268 DESKTOP COMPUTER
09826-90040, rev: 9/81
Installation 1-23
Page two is the 2631 self test. Check for missing characters and the correct top-of-form
printing:
2631 EXERCISER ÓN 982¢& DESKTOP COMPUTER TOP OF FORM
COMPUTER INITIATED SELF TEST
19% a (ar, 0133456789 ; (=>78ABCDEFCHIJKLMNOPORSTUVWX YZ1 41°C abedetghigkimnopagretuvuxyrt1> ®
Lari xe RO E $= ?WABRCDEFGHIIKL.ANOPQRSTUVWXT ZA 41° ‘abcdefqni ik ImnoparetavwXxyTC! 7
+$% 701 e > IPARCDEFGHIIKLMNOPORSTUNWXYZE AE Cabcdetfoh: jkimnopyrstueWwxyzil:
ES OR 6789: q OBABEDEF CAT TRL ANOPORSTUVUTZEN > “abcdefght jkimepgrstuvwsyz(1778
1 ME A 7 LO сб ее, и” О 123, ZA AER 1 3 Can > ?@ARCDE EGRET TL MNO QRS TUVWXYZ 01 abc
ghd jJkilmmnopge ss tuvwwxy 201 3778
"EEE (5x +, —,/0123456769; <=) ?0ABCDEFGHIIELMNOPQRSTUVUXYZI IA ‘abodefahijkimnoparstive.yzt 134
RS ADE ER
`
BEL URS IUEGUR CO) x +, - 1 /U1D 1456789: ; =) "BABEDEFOCHLJTKLMNOPORSTLIUWXYZE 1° abedefghi qe lenoparstuuwey >. 13 08$
rh
SELF TEST PASSED
01534567871
DID THIS LINE OF [INTERMIXED PRINT NODE TAB IN TEN SINGLE $317 ACES FROM MEL REZO Y MENE E MY
Page three includes display functions characters and secondary character sets:
DISPLAY FUNCT [ONS
BA ROBERT TFR
LÉ MU ON SEGESEGERN 1"ESZA/()X4,- /DI7IADE789: <=) ?GARCDEFOCHIIKLANOP GRS TUVWXYZE 15 ara detghn gk lmnopgretoveryz ii IgE
THIS TS THE SECONDARY CHARACTER SET EY SHIFT OUT-SHIFT IN
P'ESZA/ Ox+,- / 0123456788; ; (=) 7@ARCDEFGHIJKELMNOPERSTUVWXYZLX 1", ‘abcdefghijkImnoparetuvwzyz{1; #
DUAL 0123456789: 0 0= > TRABCDEFGHITELMNOPOARSTUVWX YZLX 17.‘ abedefghaigkIimnopqratuveozauztls #
THIS [5 THE SECONDARY CHARACTER SET BY EIGHTH RIT
PUESZA CIxa,- ./0123456789: , 0) ?WABOCDEFCHIJKLMNOPQRES TUVWXYZ [15 Cabcdefgnigkimmopyr=tuvezyzt13; 8
IESZA CIx+,-./0123456789: <=) 70ARCDEFGHITKL ANCIFORSTUVWXYZENT* “abcdefghai jklmneporstuvwxyzti: %
FEST FOR FAST SEE DER ENORME
TEST FÜR FAST SEE NERO ELÁNKT
TEST FOR FAST SEIP DER BD OMS
Page four prints test lines at preset spacings, allowing you to check for correct line spacings:
19 THLS THE SLIDE SWITCH PRINT MODE AND LINE SPACING?
PIESZA” ()x+,-./0123456789: ; <=) 7BABRCDEF GHIFELMNOPARSTUVWXYZENT", “abcdefghijklmneopgretuvwWwxyzC li"
WE On ENTE EE Te ancactaha Jinnoparsrwvexyr€l 2
1a COX, /012345678Y =)?8ARCDEFGHITKLMNOPQRSTUVWXYZI“ 14 “abcedefghijkImnopgrstucwxyzttt
15 THIS THE SLIDE SWITCH PRINT MODE AT 6 LINES PER INCH?
"ESA ()x+ -./0123456789: y (=> 7?ARCDEFGHIJKL MNOPQRSTUVWXYZ[N]* “abcedefghijkimnopagrs tuvwxyzti 1
VERA ()x+4,-./01723456789: 6 =) ?RABCDEF GHI JKLMNOPQRSTUVWXYZON1* *abedefihi jkImnoparetuvwxyz (1) E
("aA COX, 1 /01234567897: ; (=) ?BAECDEFGHIJKIMNOPOESTUVUX YZLXA1°_'abcdefghi]kimnopqretuvuxyz {13 #
BEE "e u VATE NENE GO НОВОЕ
RT - test pa complete----- =
The character sets printed on pages two and three depend on the character-set ROMs instal-
led in the printer.
09826-90040, rev: 9/81
1-24 Installation
HP 9866A and 9866B Tests
These tests allow you to check operation of an HP 9866A or 9866B Printer. The test assumes
the printer is connected via a 98622A Option 004 GPIO interface.
The character-set printout is identical for each test. The character dot-pattern test is run on the
9866B to verify plotting capability.
Check for missing characters or dots. If dots are missing, line after line, the printer needs
service.
EEEEEEEEEEEEEEEEEEEEEEREEEEREEEEEEEEEEEEEEEEEEEEEEEEEEEEEEREE EEEEEEREEE EEE EEEEEERE
EEEEEEECERECEECECEECECECECE EECCCECECEECCECECECECERECECECE EC EEEECEECENCECECECTECE
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEREEEREERE
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEREEEEEEEEEEEEEEEEEEEEEEEEEEE
EEEEEEEEEEEEEREEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEECEEERERE
+
<=
+
T1
FT
Е
m
Mm
m
Mm
Mm
Mm
IM
mi
mi
fi
mM
[T1
m
[TT
{ri
mi
Ч
Im
{T1
m
Imi
fi
m7
FT}
pri
fl
г
m
m
MT
mn
LE)
mi
mi
FT!
I
Im
FT
ff}
mM
IT}
FT1
m
FT
m
fri
FT!
rm
FT
fri
11
TF1
fry
m
m
m
mi
¡EN
ГА
im
im
[TI
[TI
m
г
[TI
iT
Ч
Ti
iT
FT
TI PTE PTY FT
THE
PATIO AT FS
г ГА
Tm
Pia?
EEEEECEEEECECEERCECEE EECEECEECEECCEECEECEECECECFECECEFECEECECEECENFECEMECNEL
EEEEEEEEEEEEEREEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEREEFEEEEEEEEEEEREEEEEEEEEEE
EEEEEEEFEEEEFEEEEEEEEEEEEREEEEEEEEEEEEEEEEEEEEEEEEEEFFEEEEEEEEEEEEEEEEEFEEEEEREEE
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEREEFEEEEEEEEEEEEEEEEERT ZEKZEEE
ЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕВЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕ
EEEEEEEEEREEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFEEEEEEEEEEEEREEEEEE EEE
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFEEEEEEEREREEEEEEEEEEEEEEEEEEEET EEEEFER
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFEREEEEEEEEE EERE FEEEEEEEFEEEFFFEFEEERFEEE
HECOEFGHI JELMHOPEEST UY HRY 2
abcodefshiikléänhoparstuvldxsz
БОННЕ DN E+a—, AAA E OE
Crit talas
i Tm ti
POPE IT] OT ET T
TT! IT NAT PPE PTA
MOT IT
fill
rm
im
PS
+
09826-90040, rev: 9/81
Installation 1-25
HP 9872 Plotter Tests
The 9872_all test allows you to check HP plotters connected via HP-IB. This includes HP
9872A/B/C Plotters and 7225A Plotters.
The test first resets the plotter and waits for you to load paper and ready the plotter. Then
pless the Continue softkey (k0) to start the test. A sample plot is shown below.
od
+
SAR" O+*+.-. /0123456789; : <=>PBABCDEFGHIJKLMNOPORSTUVWXYZ NS
gzAxmangsabdouw y! rySyepoqo.—. [NJ ZAXMANLSHUdONWIMS IH943039Vad <=> * :68/9SYEZID/ "= *+* О,
nn
HEWLETT PACKARD DYNAMIC PERFORMANCE VERIFICATION TEST
——] ————]— ——— RB A
о _— S/N .
[| HLT EY assurancs Г |
HEWLETT TJ QUALITY]
ar +
Г
PACKARD NY PLO
SAN DIEGO DIVISION
>
ZE” O x+, —. 70123455789: , <=> PBABCDEFGHIJKL MNOPORSTUVWXYZ NI”. abedefghi jkxlmnmoparstuvwxyzit
A ZAXMANLSUHOSONWIMI IHISIdIaval<=> * '58L9SYECIÓ/ "= +* O ,3Z$E
HP 9876A Printer Test
This test allows you to check the printer's available character sets and character re-definition.
Before running the test, be sure the printer is switched on. Then load paper and set it at
top-of-form.
09826-90040, rev: 9/81
1-26 Installation
A sample printout is shown below. Verify that all characters are printed as shown. The saw-
tooth pattern allows you to check for uniform print intensity. Check for missing dots.
Base ABRE Tk TEA
VEAN DETER EEEGAE |" REEL CIE, я ‘By
_*abcdefghi jkImnopgrstuvuwuxyzt [> "E
¿A
Ts
A.
Ln
Te)
H
5 BABCIEFGHIJELMHOFERSTUVYWX Y 20]
Kt Ь
Эт ООВ НЫ НОА |НА Та +, -. "ВТЗ ВБР Я) <.
A “abcdefghi jkImnopgrstuvwxyz{{}wæ
> 768HECIEFGHITELMMOPUYURSTUVHAYZL 1
SERA EEE
ЭТО НЫ ВКО 1'BLELE- LIE, —. AlZI45O7 E 7? AAECIEFGHIJELMNOPERSTU NS Y]
~ “abcdefghi jkITmnopqrstuvwxyzí | +8
SLSECAAAI EA
AUERÄRLUSEGESERGEE 1UEEN£' [150 - /B10245ET7E£S::0=)760RONETOCNI EL HEOPARS TUYA]
+ ‘abodefghiikienongretuvezezi} 1 |
LEC RARE TRE
DELANON TIERRA SERGE ALGUACO”** “EdE AaoççRrismeeantsésiiééuaésuäésuhinE ai oæñiôÏE i
В
DANISH NORWEGIAN SET
RELE LC ILE+ 78123456789: ;<=>7?@ABCIEFGHI JELMHOPRRSTUYHWRYZRGA~_ ~abcdetghi jk imho
pgrstuvuxyzeeavs
EUROPEAN EXTENDED SET _
AIGUAED" "~~" "E0£ AE coNAiLHL2EnhAESGAE0GAESIEESURATERAToxATOUETR
a:
FRENCH SET
"HELE CO %+,-, 8123456789: 3<= > TaRECTEFGHIJELMNOPORSTU YHXYZ"c1" “abedefghijklmno
parstuvuxyzéuéè"#
GERMAN SET
ГПО, -. ОТЕЛЯ ВОЙ ВО: рб = о ВА ECDEFGHIJKLMHOPRRSTUYHRYZA0U~ “abcdefghi jk limno
parstuvwxyzacull
KATAKANA SET
в fas" FPaazaragw—TF{RIANFITAV2ZRYIFUT LF TE INES 2 EFI OL 9
SPANISH SET _
BREMER. 8123456789: 3 {=>578@ABCDEFGHIJELMNOPORSTUVWXYZIN4° “abcdefghijklmno
pagrstuvwxyzin:~%
SHEDISH-FINNISH SET LE
PENS CIE+,—. 7123456769: <=>7GAECIEFGHIJELMMOPORSTUYWXYZACAL éabcedefghijklImno
pqrstuUuvWwXuzZádalE
UNITED KINGDOM SET
NULES CILA, —. OZ ra: <= 7RRECIEFGHI JELMHOPRRESTUY HAY ZL] cabcdefghijklmno
parstuvuxyze | >=
o: J & o. we fs Mae Hs te
e anil Ч = “i 000: M8 B
2 [001 I heh i A N E # [oo BE 000) й
Ga e £ [1 | = a Dos: ME (00:
09826-90040, rev: 9/81
Installation
Disc Drive Tests
The 82901/2 and 9885_9895 tests each perform a write and read test on specified disc drives.
The tests assume an 82901/2 or 9895 is connected via HP-IB. A 9885 Disc Drive must be
connected via a 98622 Option 002 GPIO Interface. A 98620A DMA Card must also be in-
stalled.
An optional-parameter menu allows you to specify each drive to be tested. Move the display-
ed arrow to each drive number and press Choose params (k0 or k5). When selection is com-
plete, press k1 or k6.
Be sure to switch the drive on and load an initialized, unprotected disc in each drive to be
tested. Close each door and start the test.
The test first checks for an initialized, unprotected disc. If the disc contains user files, a prompt
allows you to proceed with the test (erasing all data on the disc) or load another disc.
CAUTION
THIS TEST ERASES ALL DATA ON THE DISC. DO NOT USE A
DISC CONTAINING USEFUL INFORMATION.
Test running times are generaly less than 5 minutes and depend on the disc interleave factor
(explained in the programming manual).
09826-90040, rev: 9/81
1-27
1-28
Installation
Mainframe Diagnostics
A copy of the computer service tests (called diagnostics) are provided with each system. These
tests are used by HP customer engineers to troubleshoot and align the computer. You may wish
to run the tests in an automatic mode to verify your computer’s operation.
The mainframe diagnostics test these computer elements:
® Processor
® Read-only memory
e RAM (user memory)
e CRT
e Keyboard
e Internal disc drive(s)
e CRT graphics
To load and run the mainframe diagnostics:
1. Switch the computer off.
2. Insert System Test Disc 3, Mainframe Diagnostics, into the right-hand disc drive. Close
the door.
3. Switch the computer on. The diagnostic is automatically loaded and run after the compu-
ter self-test is performed.
These messages are displayed:
MEMORY TEST IN PROGRESS internal tests Th
ese messages appear
while diagnostics are
loading from disc.
nnnnnnn AVAILABLE BYTES loading diagnostics
982668 TESTS Rev, B (or 9836 TESTS Rev, B)
BOOT REUn
ROM E i16Kk:0000600 testing read-only memory -
additional ROM sizes and
addresses displayed if a ROM
based language system is in-
stalled.
RAM E memory sizes and addresses test user memory
PF: option (if powerfail option is installed)
(various displays, some flashing, used
for service alignment)
(keyboard diagram, as explained below)
PASS n completion of all tests n times
09826-90040, rev: 1/82
Installation
If messages other than those described above or below appear, jot them down and call your HP
customer engineer. This alternate message may appear:
DRUn:, NO DISC OR NOT RDY Disc not in the 9836 left-hand drive. To fully test
the drive, insert a disc having an ASCII-type file
named TROMDATA which is at ieast 80 records
long. This message also appears if the System
Test Disc is removed during testing. (Note that the
disc is accessed during testing).
A diagram of the keyboard appears after the display tests, allowing you to test each key. To test
keys, first press any key when the diagram appears. Then press each key and verity that the
corresponding displayed box toggles on and off. To test the cursor wheel, rotate it and watch
the box at the bottom of the screen.
The diagnostic will automatically exit the keyboard test one minute after the last key is pressed.
You can also exit the test immediately by pressing:
The PASS n message indicates successful completion of the tests. They are automatically
repeated until you either switch the computer off or press ( SHIFT (PAUSE). Only the PASS n
message should be repeated with each successive pass of the tests.
Note
The diagnostics display all values of n using hexidecimals (1 thru 9
and A thru F).
Pressing [ SHIFT enters a test mode allowing the service technician to run individual tests
or alignment patterns. The test mode redefines the keyboard to enter test codes (keys
thru (“ke )). Other keys produce test tones. To cancel the test mode and resume automatic
testing, press ( SHIFT (к).
For instructions on using the test mode, refer to chapter 5 of the 9826/9836 Computer Service
Manual.
09826-90040, rev: 1/82
1-29
1-30 Installation
2-1
Chapter 2
Getting Started
Introduction
This chapter introduces many of the computers 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.
9826 or 9836?
There are several obvious differences between the 9826A and the 9836A desktop computers as
you can see in the following illustration. Since the two machines do have several differences,
such as dual disc drives and an 80-column wide CRT on the 9836, you may be writing a
program which you want to run on either machine. The machine function is provided to deter-
mine which computer you are using. You may want to take advantage of this function to decide
on how you write to the CRT, whether you are going to access the extra disc drive in the 9836
and other similar operations. For details on the machine function, see Chapter 4.
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.
09826-90040, rev: 1/82
2-2 Getting Started
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.
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.
(4) 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-IB) 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.
09826-90040, rev: 1/82
Display Organization
The built-in display (CRT) on the 9826 has a 50-character wide by 25-line work area and on
the 9836 a 80-character wide by 25-line work area. The HPL language system partitions the
display into five areas:
r
x
> Output Area
} Blank Line
} Display Line
Run Indicator
} Message/Resu
The Run Screen Format
Getting Started 2-3
} Keyboard Area (two lines)
lis Line
} Special Function Key Labels (two lines)
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 scroli 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.
Output Area
> 18 Lines
OT
The Output Display Area and Buffer
de
>» 90 Lines
(user definable)
The display line is reserved for instructions (prompts) from a program to the operator.
09826-90040, rev: 1/82
2-4 Getting Started
The keyboard area is where you enter responses to program prompts or type in commands.
Press (CLR IN ) to clear the keyboard area. Now do a simple arithmetic problem:
Type: 98+26
Press: ( EXECUTE JO+:26
\
The operation is first entered in the keyboard
entry area. When executed, the result, 124.00, 124,00
replaces the operation in the message/results не ен
line. 0 + em
Now try repeating the operation. Press (RECALL ) and ( EXECUTE ).
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 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 keys.
09826-90040, rev: 1:82
Getting Started 2-5
Keyboard Operations
The computer keyboard is arranged into functional groups for your convenience:
Rotary Cursor Editing
Control Knob Special Function Keys Controls Keys System Keys
— — a ~ ¡————][] r A ` r - \
+ * Tors mma GRAPHICS CHAR
| ko JE К, IL К IL ka || ka | [Ly [a] INS LN | ostia En | EDIT | ALPHA | Lessons J STEP |
e — CLRSCR SET TAB CLR TAB STOP
Co CH] ¡EN ESTA E
RESET
# % A &
0000066000066 0000
” [ 1
| < > ?
AN / ha > A
Character Entry Keys Program Numeric Pad
Controls
Character Entry Keys
The character-entry keys are arranged like a typewriter, but have some added features.
ser 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.
CAPS LOCK
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.
The TAB key is the HPL assignment operator key, “>”, asis the shift of the (_] ).
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.
CTRL
>
mo
YA
09826-90040, rev: 1/82
2-6 Getting Started
Numeric Pad
N —
0006 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
0000 result. Note that the | and V characters are generated using the shift of the
({) and (_) ) keys, respectively.
For more details and example arithmetic problems, see Arithmetic Operations later in the
chapter.
Cursor Controls
Jo The cursor-control keys move the display cursor one space at a time. Press and
Ни or to move the cursor to the end of the line. The and
keys allow you to scroll information in the displayed output area up and down.
в The BACK SPACE key works identically to the cursor control key and is used
to move the cursor 1 character back in the line.
The cursor wheel allows you to rapidly move the cursor up and down or
back and forth, depending on the position of the little arrow in the lower-
left of the display. You can change direction by pressing the an appropri-
ate cursor-control key, (_ < J, (=> Jor (1 J), (| ). Another way to
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.
CLR SCR
Sets the insert-line mode, similar to the insert-character mode. Press INS LN again to
cancel insert-line mode (edit mode only).
DEL UN Deletes the line containing the cursor (edit mode only). If a line is deleted, it is stored
in the recall buffer and can be recalled by pressing RECALL.
Recalls the last line entered or executed. Pressing repeatedly recalls up to 10 previous
entries. Pressing shift-RECALL moves forward through this recall buffer.
Sets the insert mode, allowing you to insert characters to the left of the cursor. Press
INS CHR again to cancel the insert mode.
Deletes the character under the cursor.
09826-90040, rev: 1/82
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.
Enters the edit command, allowing the programmer to use an editing mode for
entering and editing program lines. (This is like 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.
wy
A
: aclr igclr
l: esc l5iscl 1:400,:1,3001,pen |
2: cs1z 6
3: for I=850 10 91
4: for J=230 to 251
5: Plt I:+Jilbl "Display Frogram”
Be: next Jinext I
7: csiz Eu
8: for I=10 to 11
: for J=80 to Bi
19: Pit I+JIlkEk:1 "Alternate editing line"
11: next Jsmext |
12: 1>P
13: pens -P>P
Example Display During Program Edit Mode
(Replace-Line Edit Screen)
09826-90040, rev: 1/82
2-8 Getting Started
f O: aclr ssgcir в
1: psg 165561 1400 ;1 ЗОО зРеп# |
2: csiz 6
3: for 1=90 to 91
4: for J=250 to 251
5: Plt I:+JIlkbl "Display Program”
G: next Jinext I
csiz 6
for I=10 to 11
for J:=80 to Bi
10: elt I+JI1b1 "Alternate editing line"
11; next Jinext I
12: i>P
13: rent -P>P
mo ~d
CU o КОТРНННЫ Е.
gu 2: = |
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) ( CLR LN ).
Here's our first try:
Using the edittins Keys makes correcting lines of
text as esy as Ple:
a 15€
Original 9826 Line
Not bad, we only misspelled one word in the first line “editting”. Move the cursor to the extra
“t in “editting” using the and and the knob; then press | DEL CHR ) once.
The second line needs a character added to ‘esy’’. First move the cursor to the “s” in “esy”
press and insert the missing “a”. To cancel the insert mode, press NS CHR ) once
again.
Using the editing Kevs makes correcting lines of
text as easy as PIE;
oN: [oc ES
Corrected 9826 Line
09826-90040, rev: 1/82
Getting Started 2-9
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
Re Ams ows dun The keys in the upper-right corner control various system functions re-
EA EZ (ECOS EZ y PP g y
lated to the display, printer and editing operations. Most of these keys
e amo aaa] execute their functions immediately, as the key is pressed.
Enters the edit command. The programmer uses the edit mode when entering
and editing programs.
wa Sets a display-functions mode, allowing you to see special control characters such
shift-L e] 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
CS 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.
Ar Enters the adumr command. Pressing EXECUTE causes the complete alpha dis-
shift- play to be output to the current prtsc device. See chapter 4 for details.
+2. Enters the sdumr 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.
am 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.
CLR SCR
shift: Lu] Clears the entire alpha display, including the input line and the scrolling buffer,
and turns on key labels.
09826-90040, rev: 1/82
2-10 Getting Started
Enters res, for the result function. When executed, returns the result of the last
expression executed. For example, press ( CLR LN }. Then enter:
23 + 43 (EXECUTE 08,00
1
wm
fina
Now return the result to the keyboard line and add 123 to it:
RESULT ) + 13 ( EXECUTE 191,00
| +
Toggles 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 powerup, 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
La IES IE Ms ==) The ten keys labeled k0 through k9 are Special Function Keys. These
may be defined and labeled by the operator as typing aids, immedi-
ate execute keys, or immediate continue keys. They may also be
defined from a program.
Ls dL ss IL JL se | к |]
Another twenty special function keys (without displayed labels) can be defined at the same
time. k10 through k19 are accessed using the SHIFT key and k20 through k29 are accessed using
the CTRL key.
Also two additional keys, k30 and k31 can be defined only with the Define SFK Statement (sfk).
To access k30 or k31, the press keyboard (pkbd) statement is used. Both of these statements are
described in detail elsewhere in this manual.
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 on the 9826 and 16 on the 9836) within quotes, followed by a colon, followed by the
remainder of the key definition. Some examples will help to clarify this:
09826-90040, rev: 1/82
Getting Started 2-11
Press: (ka)
Type: "Label":definition
Press: (ENTER
Notice that Label is now the “soft” key label assiciated with k1.
Other labelled special function key examples:
"Recover" :*cont "Restart”
"Abort" :#sfg9 30:3%"Get shutdown flag”
"I odF hase": /2.,7182818284G6
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
Revision 2-21-81
No vouwant toloderro Rl on an external printer?
De > Js J]
[xs Je JE к к к |]
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 Accesses k3.
Type: *Prt" "¿a The asterisk makes this an immediate ex-
ecute key.
Press: (ENTER This stores the line entered in the display
under k3.
Whenever (_k3 ) 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:
(№) :*cont 2
:*cont 10
Each time 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 Fetches special function key k3.
Type: /:2:7187?8187846 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 (_k3) 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 ) [ k2 J
Type: **R idseR+"in, E" +2,54R + cm."
Press: (ENTER
Then key in a number, such as 6, and press (_k2 ). The display will show:
В, 001, = 18,24 см,
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 (_— ), (INS CHR ), 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: Access SFK 1
Type: "Comment": Label it as a “comment” key
ANY CHAR
Press: Any char of 127 is theEOL char
Type: 127
Press: (CTRL) (SHIFT) ( >) Home right
Press: ( CTRL) ( CLR>END ) Take out of insert-character mode.
Press: Home left key
Press: ( CTAL ) ( INS CHR ) Insert character mode
Type: 4" Percent symbol, first quote
09826-90040, rev: 1/82
2-14 Getting Started
Press
Type:
Press
Press
: (CTRL) (SHIFT) ( => ) Home right key
и Second quote
: Store key
: (ENTER Key Defined!
Now, any text typed on the keyboard can be entered as a comment line by pressing special
function key ki, 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 sf k (with no parameters) is executed, they may
be defined by the user at any time with the EDIT key and the sfk statement.
re
find
*list
¥cat
sauve
get
(Uk) 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 k§ (the save key), typing in the program
name between the quotes, then pressing ki to resave the program.
Press: (ks ) Displays: save "" with insert cursor
Type: NAME Now looks like: save "NAME"
Press: Now looks like: resave "NAME"
Automatically executes resave "NAME"
This is a typing-aid key that displays find" * on the keyboard line,
with an insert cursor between the quotes. The characters that you want to search
the program for go inside the quotes.
This is an immediate execute key that lists 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.
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 det" " 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 (if one exists on the disc).
09826-90040, rev: 1/82
Getting Started 2-15
msi 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 list on the keyboard line. lts
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. lts
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 computers 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 staternent.
CONTINUE
2
с
2
RESET
Stops program execution immediately without erasing the program or data mem-
shift- ED ory. 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.
| sgror Square root (shiftof( ))))
Fal
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 J. Then simply type-in the problem and press ( EXECUTE ). Try these examples:
First, how many characters can be entered into the 9826 computers complete 50-character line
by 18-line by 5-page alpha-display area?
Enter: 50x18x5
Press: | EXECUTE
N
SOXID*S
4500.00
T
(characters)
re find
=
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: [ EXECUTE
va.
8-8%,03
7.76 (hours left)
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 1 2):
Enter: 5.2 7 ( EXECUTE
N
Ge" 2
38.44 (square metres)
1
09826-90040, rev: 1:82
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 )) and use it as part of another problem. For
example:
Enter: 98+?6
Enter: 25% | RESULT
Press: | EXECUTE
Enter: { RESULT ) / 37
Press: | EXECUTE
09826-90040, rev: 1/82
184,00
c5+*res
100.00
EC e НОННА
HE
2-18 Getting Started
3-1
Chapter 3
Program Transfer
Introduction
This section addresses a major concern of 9825 owners and programmers, namely, how to get
9825 programs and data into the 9826 or 9836. 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/9836 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 [/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/9836 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
0825 to the 9826/9836 (and vice-versa, if desired). In addition, disc file transfers offer the only
method of transferring key files from the 9825 to the 9826/9836. Once the disc drive is installed
on the 9826/9836, the same commands that were used on the 9825 can be used. For example,
to load a 9825 program “Prog1” into the 9826/9836 (from a 9885 disc, unit number 0 at select
code 8), the following statements could be used:
drive 0:8
get "Progi"
The above sequence can be shortened by using the new mass storage unit specifier (msus)
available on the 9826 and 9836:
get "Progi:FB +0"
Disc data files can be accessed 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 and 9836, 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 and the internal drive on the right side on the 9836.)
There are additional disc programming capabilities offered by the 9826/9836: you may wish to
refer to Chapter 4 of this manual for specific details of these disc programming enhancements.
09826-90040, rev: 1/82
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 or 9836. 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/9836 that reads in the program and stores it into memory. You then save
the program on the internal minifloppy disc drive of the 9826 or 9836.
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/9836. 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/9836 execute wt c 7 +30 to change the bus address of the 9826/9836 so
there won't be a conflict with the 9825's bus address. (Both have bus addresses of 21, unless
the hardware switch settings from the factory have been changed.)
On the 9825, load in the desired program (for example, trk1:1df8). On the 9826/9836
RUN the following program:
о,
EI
: "Loader":dim A$L85]inal>Ni721>8
l: "input"rred 5+A%if len(As)<=2igto "input"
2: if AS[1+i]J="*"igto "done"
3: "store":gon err "error"istore Át:nal
4: gto "input"
>: "error"iCZ RAS>ASigto "store" - Ne 4
G: "done":sred S:A%:0%:A%Inal>¥ Do 7
7: prt "Record the Program on the desired track and file"
g: Prt "(or file name): from line № through line X,"
9: prt "For example; “trkiircf 8.,.N:X”., Then delete the"
10: Prt "old program and re-run this program for the"
11: Prt "next Program to be transferred,":fxd O
12: prt "To delete the saved Program: use 'del" Му" у Му УМН
13: end
#1 76513
On the 9825, execute 1ist #731. The 9825 program is now transferred.
09826-90040, rev: 1/82
Program Transfer
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/9836 internal disc.
The string files will be saved as tape files on the 9826 or 9836 disc for maximum simplicity.
9825 Program
O0: dim A#[300015%Ÿ "This line changes according to your own data structure”
1: tré 135for I=% to 05% "Again: modify according to vour data structure”
2: 1df I:A$tinrt 731:A%
3: next Iiprt "Transfer complete,“ send
9826/9836 Program
Or dim ASCI0001:% "This line must be identical to the 95675 Program line OF
ir trk isfor I=0 to 035% "Again: this must agree with 9825 Program above”
2: red 721¿:AÁ$tiref 1I,A$I% "This line is the only one different”
3: next Iiprt "Transfer complete." send
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/9836; the 9826/9836 is reading in the data from the 9825 and saving it on the disc.
09826-90040, rev: 1/82
3-3
3-4 Program Transfer
4-1
Chapter 4
HPL Programming
Introduction
This section summarizes the enhancements and differences between the HPL 2.0 operating
system and the 9825 HPL language. Organization is presented by 9825 ROM function so that
you can easily understand new material in relationship to the 9825.
09826-90040, rev: 1/82
4-2 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.
data string or numeric constant [ +string or numeric constant]...
read variable name [ +variable name]...
rstr [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:
a,
"m
An E LY
dim A$LZ20]
data 10C0:"item 1" +2003"item 2" :300+"item 3"
“line Z":data 400 "item d" ,500"iten 5" 600 "item G"
data 700 "item 7" 800 "item 8" 900 "iten 9"
for I=1 to Jiread X:Atirrt X АЗ
if I=83rstr "line 2"
: next Isend
Press: RUN
100,00 item
200,00 item
300,00 item
400,00 item
200,00 item
600,00 item
490,00 item
200,00 item
600,00 item
Gn BO Ono 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
>: if I=6:rstr
the printout looks like this:
100,00 item
200,00 item
300,00 item
400,00 item
300,00 item
600,00 item
100,00 item
200,00 item
300,00 item
LY M3 — ED 11 LI Ma
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.
HPL Programming
The Programmable Beep Statement (O&P p.3-16)
rbeer [frequencyl rduration]]
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 0 through 2.56 seconds. The number of seconds duration is rounded to
the nearest hundredth of a second, (.01 sec).
The Machine Function
machine
This function returns a value that characterizes the internal configuration of the computer.
bit (0+ machine) 0 = 80 column alpha (9836A)
1 = 50 column alpha (9826A)
bit (1s machine) 0 = 400x300 pixel graphics (9826A)
1 = 512x390 pixel graphics (9836A)
bit (2+ machine) O = CRT has no highlights (9826A)
1 = CRT has highlights (9836A)
machine has a keyboard
machine has no keyboard
hit {3+ machine’ (
1
|
The first three of these examples can be used to determine if the computer currently in use is a
9826A or 9836A. The fourth is not currently implemented in hardware.
09826-90040, rev: 1/82
4-3
4-3.1 HPL Programming
CRT Display Control (O&P p. 3-16)
The Clear Alpha Statement
acl r[number of scrolling pages]
The aclr 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).
On the 9826A, 900 bytes (18 lines of 50 characters) of read-write memory is used for each
scrolling page. On the 9836A, 2880 bytes are used per scrolling page. The reason that so much
more memory is used is because two bytes are reserved for each character cell; 1 byte for
character and 1 byte for the highlight (e.g. blinking, see crt statement). This means that 18 lines
of 80 characters per line times 2 bytes per displayed character is used — or 2880 bytes of
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!
avm/(900bi1t(0Osmachine)+28B80(1-bit{0 machine) ))
When aclr is executed:
e the graphics screen is unaffected
e key labels are displayed
e the RUN screen format of the CRT is selected as opposed to the Edit screen
e Display Functions is turned off
Highlighting on 9836
crt value
The e rt statement is used to control the video highlight scrolling capabilities on the 9836A
CRT only.
The following values are used:
0 — inverse video
1 — blinking
2 — underlining
3 — half-bright
These values set the corresponding bit of the highlight byte (see aclr statement) to provide the
desired alpha highlightina.
09826-90040, rev: 1/82
HPL Programming 4-3.2
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 Kloff and Klon statements.
09826-90040, rev: 1/82
4-4 HPL Programming
The Key Labels On/Off Statements
Kloff
Klon
The Kloff statement turns off the display of special function key labels. The contents of the
labels are not affected, so that executing a Klor 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[ +number 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 (Fr rt sc device).
The Tab X-Y Statement
tabxy column : row
The t ab x» 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) parameters.
The column parameter must be within the range of O through 49 on the 9826 and 0 through 79
on the 9836. The row parameter should be within the range of 0 through 17. Specifying a row
greater than 17 causes the row parameter to be truncated to 17 (you cannot tab below the
bottom of the screen). Column 0, row 0 is the top left-hand corner of the CRT.
The Read CRT Statements
red 15[.,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).
09826-90040, rev: 1/82
HPL Programming 4-5
The System Printer Select Code Statement
Prtsc select code or buffer[ +width]
This statement directs all print operations to the specified select code or buffer. This affects
statements such as Prt, tlist, arrt, sPe, listkK, 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 ar rt and 11istK statements. Power-
up default for ertsec is to the CRT, width = 50 on the 9826 and width = 80 on the 9836.
(No, execution Frtsc 16,80 will not cause 80 character lines to be displayed on the 9826
CRT, and Prtsc 16 +16 will not emulate the 9825 strip printer!)
Math Functions (O&P p. 3-22)
54 r expression
Returns the square root of a non-negative expression. Identical to the VV. operator.
P À
Returns the value of pi (). Identical to the m function.
Flags (O&P p. 3-28)
There are 32 program flags available, numbered 0 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 re f statement now lists references to p-numbers.
The Find Statement
find string expression { :line number; [ :line number,]]
To list all of the lines that contain the specified character string, the find statement is used.
The list of these program lines is output to the current prtsc device.
If no line numbers are given, the entire program is searched. If a single line number is given, the
program beginning from the specified line to the end of the program is searched. If both line
numbers are given, the range of program lines is searched.
09826-90040, rev: 1/82
4-6 HPL Programming
The search is not done on the line number nor the colon that follows the line number but does
include the space following the colon.
To search for quotes, be sure to follow the double quote convention. For example to find all
lines that contain a label you could execute:
find An ни
where the A character represents a blank. The doubled quotes will be considered a single
quote.
At execution time, this must be the last statement in the line.
Tape Cartridge Operations (O&P chapter 5)
A program utilizing tape cartridge mass storage operations will in general be able to run unmod-
ified on an HPL 2.0 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 HPL 2.0: 9885, 9895, 8290x,
and the internal minifloppy drives. 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
is:
TxFyyy
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:
ТОРО
® 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 O
NBDATA (tape file-type 2): file with numeric data
SBDATA (tape file-type 3): file with string or mixed data
® 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.
® 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.
09826-90040, rev: 1/82
HPL Programming 4-7
Track# Secured Program Current msi Device
Indicator
tri i msi "al sO"
file sed type (E) cur.size abs_size
AE * PROGRM (6) 432 Sic
Files #1 KEYS (5) 46 256
#2 NEDATA (2) 304 ig
#3 NULL (0) О x
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 rounded 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 and 9836, 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/9836, because all files on the 9826/9836
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.
e À 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 in HPL 2.0. (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.
09826-90040, rev: 1/82
4-8 HPL Programming
Record Binary Statement
rch 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 0 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[ »base] )
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",i56)—A A = 255
str(10,7)—AS 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$[C15,250]
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 HPL
2.0 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 +[rate]]
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
and keys (for shifted-knob and control-knob functions) via the ks t at function.
The on-knob service routine exits with the k re t statement, which returns controi back to the
main program. |
The rate is an optional parameter that specifies the number of seconds between knob inter-
rupts. The legal range is from 0.01 (default) to 2.56 seconds. The default value of 0.01 seconds
is also set when a program is not running. When a program is resumed, the previous set rate is
again used. |
The Knob Function
Knob
The Knob function returns the accumulated count of the RPG (Rotary Pulse Generator), 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 information only. (Counts may be missed when the knob is spun very
rapidly.)
Negative values for Knob indicate counter-clockwise rotation. Positive values for Knob indi-
cate clockwise rotation.
09826-90040, rev: 1/82
4-10 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 0
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 Kstat 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
Kev
The Kev function is essentially unchanged from the 9825 kev function, in that it returns
unprocessed keycodes. The Kev function now returns 9826/9836 hardware key codes, but the
asc function can be used to obtain the ASCII codes for keys. These ASCII keycodes are
identical for all HPL computers. For example, the hardware keycode for “5” on the 9825
numeric keypad is 83 while on the 9836 the same key has a code of 2885. On both computers,
however, the ASCII code is 53.
If 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” supplied with the HPL Utility Programs to achieve program compatibility.
09826-90040, rev: 1/82
HPL Programming 4-11
Serial Interface Control (O&P p. 7-14)
The Remote Keyboard Statement
rk bd select code | type]
The rkbd statement operates in an identical fashion to the 9825 rkk d statement except that
the type 0 remote keyboard now requires 9826/9836 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 98626A
Installation manual for the location of the remote keyboard jumper.
The Press Keyboard Statement
PK bd [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 15.05.
pkbd "5#2Z" & char(10} resultsinthe same display.
The EDIT A% statement in BASIC can be simulated in HPL using pkbkd A%3 ent A$. The
string in A$ will be placed in the keyboard line. Any modifications that need to be made can be
done using the editing keys. Then when all corrections have been made, press ( CONTINUE ).
The rE bd 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 FKEd those ASCII keycodes that need to be executed by the system.
For example, to emulate a full live keyboard with a running program:
Or on Key "suc" Set up service routine
1: gto +0 Loop
2 "suc"rif not (asc Kev>K)ikret Test for and exit if empty buffer
3: if Kelipkbd chartK)ikKret | Else “push” key and exit unless
4: end PAUSE key was pressed: stop.
*36289
09826-90040, rev: 1/82
4-12 HPL Programming
Another example of pkbd is to access special function keys 30 and 31 after having defined them
using the s f k statement. As an interesting exercise, check the default definitions of these keys.
Type: Pkbd" Enter pkbd with opening quote.
ANY CHAR
Press: shift-( STEP ) Define the ASCII key code for sfk 30.
Type: 138 |
Type: " Close the quotes.
Now press
The display shows the version of HPL:
(RAM) HPL Z.0 READY
The Define SFK Statement
s f k[key number| :definition string] +label string]]]
The s fk 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
sfk erases all key definitions; replaces them with their de-
fault settings
sfK Bs "wrt 705," defines key #8 to be the string “wrt 705,”
sfK3,"HELLD 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 159
(k31), 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 control
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 example, an
ASCII “SH” character is displayed, just as if there were no program running.
O: on Key "бус"
l: gto |
21 "suc"raso (Key>A)>K
3: if bit{(9+6)=0 and K<3Z3sfK jjl.chartk)irekbd char (1593skret
d: PKbd char{K)sKret
>: end
09826-90040, rev: 1/82
HPL Programming 4-13
Systems Programming Instructions (O&P p. 7-21)
The System Boot Statement
syvskhoot ["file name"!
The sv shoot 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
66,99
the system file is present. (The character “x” of the system file name is the same character
specified in the sv sb oot statement.) If no disc is present with the "SYSTEM." file on it, the
e
ROM operating system “x” will be booted and initialized.
Example: syshoot "BM" Boot BASIC ROM language system (if BASIC soft
“аи system is not present)
sysboot "SYSTEM_B" Boot BASIC soft system
Matrix Programming
Array Output (Matrix p.8)
apr rt array variable[ +array 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, ar 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
HPL Programming
Disc Programming
In general, disc operations in HPL 2.0 operate identically to 9825 disc operations. Howev-
er, 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 diffe-
rent file pointers on different disc controllers, and accessing tape files on disc).
If you are familiar with disc programming, reading this section should give you enough
information to utilize the new disc programming capabilities. If you should need more
information about performance or implementation, refer to the Disc Programming Tech-
nical Appendix at the back of this manual.
If you are not familiar with disc programming, you should first read the 9825 Disc Prog-
ramming Manual, then refer to this section for information regarding the extensions made
to HPL 2.0 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
i Internal LIF? - - - 0 (or 1 on 9836)
M 8290х 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/9836 BASIC language ASCII files and with HP
2642A Terminal files.
09826-90040, rev: 1/82
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,
Killallanddisccory).
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:
:F8 0 Specifies 9885 disc, 9825-compatible format, select code 8, unit number 0.
Ii Specifies internal disc drive.
147072 Specifies 9895 disc, LIF format, select code 707, unit number 2.
=H 33 Specifies 9895 disc, 9825-compatible format, default select code for Hi”,
unit number 3.
Pal 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:
assn "Datal:H7072:3" +1
asgn "Datal:I" 2
Kill "Oldprog:F8,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 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 drive 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"1J"—M$; 707—5 1 ZU Set mass storage device to 9895 disc select code
msi Mé&str(5)&","kstr(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:
asin Datafile:H701+,3",56,—-12,X
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.
assn "Datafile:H701i 3" 650 3%
This statement has all the same effects as the one above, except that now unit number 0 is
selected, overriding the msus unit number of 3.
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 [ sinterleave factor]
or
init complete msus | +interleave factor[ +number 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 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 (544 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
Minifloppy 118 944 936
9885 210 1680 1678
0895 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,
imit ":J707 2,0" »—la-l
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 experimentally, as different programs and access requirements may need larger interleave factors to attain
maximum performance.
3 This interleave is efficient only for backup without auto verification. All other operations require an interleave factor at least one higher than
recommended.
09826-90040, rev: 9/81
HPL Programming 4-19
The Disc Type Function (Disc Programming p. 1-15)
dtype
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.
8290x drive: status check does not indicate a condition of “door opened”, so a value of 2
is never returned.
4-20
HPL Programming
The Catalog Statement (Disc Programming, p. 1-16)
HPL 2.0 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 mne-
monics used in 9825-format disc catalog listings for these new files are:
Z (NULL) null file - 9825 tape file type 0
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:
МОТ "31:0"
AVAILABLE RECORDS 1002
FILE NAME SCD TYPE #BYTES #RCRDS ADDRESS
grades TDATA 10 16
Class PROGRM 96 1 26
Count PROGRM GE 1 27
Name PROGRM ZA 1 2
give TDATA 10 2
Keys KEYS 200 1 39
null file NULL 0 10 0
SecUred_rpr * PROGRAM 242 1 40
ascii.file ASCII 1 ol
numeric. bd NEDATA Ad 1 Эй
string_kbd SBDATA 134 1 23
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 “*” 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.
09826-90040, rev: 1/82
HPL Programming 4-21
The Killall Statement (Disc Programming p. 1-18)
Killall unit number } select code
or
Killall complete msus
ThekKillall statement can also be used with the full range of HPL 2.0 supported discs and
formats by specifying the second syntax, which allows the msus specifier.
The Open Statement (Disc Programming p. 3-2)
The aren statement now allows you to specify the desired type of file when opening a data
file. The new syntax is shown below.
open file name! number of records [ +file type]
Where file type is a string expression having the value “ASCII”, “NULL”, or “TDATA”.
The oren statement in HPL 2.0 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 HPL 2.0 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 HPL and other 9826/9836 programming lan-
guages. “ASCII” data files are also used to provide transportability between the 9826/9836
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, ldf)
is discussed under the Tape Cartridge Operations section of this manual and in the Disc
Programming Technical Appendix.
09826-90040, rev: 1/82
4-22
HPL Programming
The Disc Copy Statement (Disc Programming p. 4-7)
cory [source drive number [ » select code] :]" to"
[ + destination drive number [ + select code]]
The original syntax of the (disc) copy statement with select codes in HPL 2.0 works exactly asit
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 HPL 2.0 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:
СОРУ О В + "ФО" +1707 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"icory "toa" +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.
09826-90040, rev: 1/82
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 4,0" "to" ,;":1 0"
copy ":1F8,0" "to" ,;" :H70 7,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 HPL files can be copied back and forth between LIF and 9825-compatible
discs without any problems. There are, however, some complications associated with differ-
ences 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 HPL-created files with this characteristic.
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 an HPL-created 9825-compatible disc to a LIF disc, but with
9825-compatible files created by other mainframes, it might.
09826-90040, rev: 1/82
4-24 HPL Programming
As with all other 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 prece-
dence. 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:
coOPy "filel":"filelb"
coPy "file";0O,"file"a¿l
coPy "file" ,0,8,"filer]["
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/9836 binaries are in no way compatible. Binaries written for the 9825 are
processor-dependent and as such would have to be completely re-written to run on the 9826/
9836. Because the file types for 9825 and 9826/9836 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/9836; both show up as type “B” on 9825-compatible discs and “BINARY” on LIF discs.
However, HPL sets a flag in the directory to enable it to distinguish between binaries, so a
9826/9836 will not attempt to load a 9825 binary. To do so would have completely unpredict-
able results. The 9825, on the other hand, does not look at the flag, so it will attempt to load a
9826/9836 binary if directed to do so by the user. This will certainly generate unpredictable
operation of the 9825. Don’t do it!
The Disc Read and Disc Write Statements
CAUTION
USE OF THE dw rt STATEMENT CAN DESTROY THE DATA ON
A DISC, INCLUDING THE CATALOG. USE WITH CAUTION!
09826-90040, rev: 1/82
HPL Programming
d red starting logical record # + destination string
dw rt starting logical record # + source string
The dred and dw rt statements allow reading and writing to logical records on a disc. This is
an extremely dangerous operation since one accidental write to the directory can destroy the
disc. The disc must have been previously initialized. All types of strings, string arrays, and
substrings are allowed with the following rules:
e The string (if a substring) must start on an even address.
e The string must specify an even number of bytes.
e If doing a dred to a string array, the entire array will be filled.
e If doing a dwrt, and the source string is a string array, every element of the array must be
full.
e If you write a number of bytes which is not an even multiple of the record size (256 bytes),
the unused portion of the last record will contain garbage.
e dred and dwrt will work on all supported mass storage devices (internal, 9895, 9885,
8290X).
Unimplemented Disc Programming Statements
Four disc statements have not been implemented in HPL 2.0. 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 state-
ments are:
dump
load
зачем
Зем
Unimplemented 98217 ROM System Cartridge Binary Statements
HPL 2.0 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
1trk
dirc
boot
УТУ
Ptrntst
cr
init (implemented with different syntax)
killall (implemented with different syntax)
09826-90040, rev: 1/82
4-25
4-26 HPL Programming
More 1/0
Interface Control Operations (1/0 p.4-14)
Select Code Summary Table
In general, the HPL 2.0 Language System register and interface programming operations
operate identically to their 9825 counterparts. This is due to an emulation of the 9825 interface
registers. You should be aware, however, that the 9826/9836 interface hardware is indeed
different from that of the 9825, and that this prevents a 100% accurate emulation. The follow-
ing tables list the primary differences between 9825 interface operations and the HPL 2.0
emulation of those operations.
| | Select Code | 9825 Source/Destination | 9826/9836 Source/Dest.
0 READ Keyboard (KDP) Keyboard
WRITE Single line display Display line of CRT
1 Reserved for tape cartridge | External
2 External
7 Internal HP-IB
8 External
16 READ Keyboard (KDP) Read from CRT
WRITE Internal printer Write to CRT
Note:
- Select code 1 of the 9826/9836 is available for external devices
- Select code 7 of the 9826/9836 is reserved for internal HP-IB.
- Read from select code 16 does not return keycodes on the 9826/9836, but instead reads data from the CRT print area.
- Read from select code 0 of the 9826/9836 returns 9826/9836 hardware keycodes, completely unlike 9825 hardware keycodes.
09826-90040, rev: 1/82
HPL Programming 4-27
9826/9836 Select Codes 0 and 16
Operation Select code 0 Select code 16
rdb Wait for keypress, then Read a byte from CRT at current
return keycode print position
red Not allowed Formatted read from CRT at
current print position
web Write bytes to display line Write bytes to CRT at current
print position
MITE Formatted write to display Formatted write to CRT at
line current print position
rds Always returns value of 8 Always returns value of 8
Wtc Select language jumper Select language jumper
(wtc 0,5 selects Katakana) (wtc 16,5 selects Katakana)
wt id No operation No operation
Wti3 No operation No operation
wt ib No operation No operation
wWti7 Select language jumper Select language jumper
rdi(4) Always returns value of Ô Always returns value of O
rdi(5) Always returns value of 8 Always returns value of 8
rdi(6) Always returns value of 0 Always returns value of 0
rdi(7) Always returns value of 0 Always returns value of 0
NOTE:
- wti5 on the 9825 could control features such as insert/replace cursor type, run light on/off, trigger beeper, trigger printer, and
trigger display. These are not accessible on the 9826/9836.
- Read and write operations have different effects on 9826/9836 select codes 0 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/9836.
- wti4 and wti6 on the 9825 wrote bytes to the display and printer buffers. There is no equivalent operation on the 9826/9836.
09826-90040, rev: 1/82
4-28 HPL Programming
98623A BCD I/O Operations
For BCD input, operation of the 98623A 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:
WL10 235 wt id N
or simply
tb 32>N
Executing a write-control (wt c) to a BCD interface with the RESET bit set (bit 5=1) will reset
the interface and terminate any active t f r 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 I/O.) Also, a software RESET of the interface now will terminate
any active t f r to or from the interface.
09826-90040, rev: 1/82
HPL Programming 4-29
HP-IB Operations
There are some slight differences between register operations with the internal 98624A HP-IB
interface and its 9825 counterpart, the 98034. Please note that all high-level operations (wrt,
red, tfr, pct, etc.) are compatible with 9825 operations! The following table serves to summarize
HP-IB operations for the 9825 and the 9826/9336.
HP-IB Operations
Operation 9825 Result 9826/9836 Result
rds (5:A.:B,C) —>D | HP-IB Extended Status HP-IB Extended Status
A OL 0| O) O) OL DELI] O | Error 0 105 REM| LLO | GET | DCL | IFC | Error
LOC
B [1 [1] 0] -HPIB Address - | [1]1]0 |_- HPIB Address -_|
C FOI|REN|SRQ]ATN [IFC| ND |NR|DAV EOL| REN SRQ| ATNIHEFC| ND | NR IDAV
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 SRQ|CA| TA|LA[SC|1]SPL [EOI] [SRQ|CAI TA] LA|SC[1|0[EOI|
- 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 HP-IB status byte (D, above)
wtc S+:X Not Allowed. If X<=31, then software reset and
terminate transfer. If X<31 then HP-IB
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: “17” true ppoll response
rdid Immediate read of R4 Always 0
rdis Immediate read of RS Always O
rdiG Immediate read of R6 Always O
rdi7 Immediate read of R7 Always 0
wtid or B Immediate write to R4/R6 Wait for FLG then write to R4/R6
Wt i5 Immediate write to R5 (Not recommended) Same as EIR
MLi7.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
Rit 2 (ATN): 1=TRUE
Bit 4 (EOI): 1=enable EOI with next data byte
ios Return 98034 STS line. Identical operation to 9825.
¡of 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/9836 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 HP-IB analyzer or a defective instrument forcing a line to a state different from the
attempted drive state of the 98624A HP-IB interface card.)
09826-90040, rev: 1/82
4-30
HPL Programming
HP-IB Operations (Cont’d)
Operation
9826/9836 Result
eir
tfr (buffer type 5)
tTI7O1.1:"'buf"
tfr701,2+"buf"
tfr"buf "701.1
tfr"buf "701.2
Output to non-
existent device
9825 Result
SRQ | CA [TA |LA | Internal |Err |EOI
Use DCL
Only |SDC
Not allowed
Format ignored
Format ignored
Format ignored
Format ignored
Completes.
Internal | FC FOI
Use DCL
Only | spc
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.
SRQ|CA | TA [LA
Byte DMA transfer if DMA card is present.
Terminate on EOL
Do not terminate on EOL
Send EOI with last byte.
Do not send EOL.
Hangs. Card reset is required
(wtc7,31 or SHIFT PAUSE)
HP-IB Capability Comparison
(from the 98034 Installation and Service Manual p. 4)
RLO (none)
PP2 (Locally configurable only)
DC1 (Complete)
DTO (none)
C1,2,3,4,5
El (Open collector driver)
98034 9826/9836 HPL
SH1 (Complete) same
AHI (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
PP1 (Complete)
E2 (Three-state driver)
RL1 (Complete)
same
DT1 (Complete)
same
09826-90040, rev: 1/82
98626A Serial I/O Operations
The 98626A RS-232C Interface is nearly identical in operation to the 98036A RS-232 Inter-
face with the following exceptions:
HPL Programming
e There is a new register, R3OUT, 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 0 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 0
— — — — — — Handshake (Cable Type
Value = 128| Value = 64 | Value = 32 | Value = 16 | Value =8 | Value = 4 | Value=2 | Value = 1
Rit 0: 1 = Female connector (DCE: Std cable)
0 = Male connector (DTE: Opt. 001 cable)
Bit 1: 0 = Enable transmitter handshake (CTS/DTR)
= 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 O
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 0 = 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-31
4-32 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 0
Data Set
No Ready
Reset Status ,
Alw 0 USART ome Bits of Send Bread ¡Enable Data Pin Std) Enable Data
ays Reset éques! 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
RTS-4
a Always 0 Framing Overrun Cory Transmitter Receiver Transmitter
(Option 001) pty eady 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 0
_ _ _ 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
- ROOUT, 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.
09826-90040, rev: 9/81
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
Secendary Data
Ring
Carrier Carrier
1 1 1 1 1 Indicator
Detect in 22 Detect
pin 12 Р pin 6
Value = 128| Value = 64 | Value = 32 | Value = 16 | Value =8 | Value=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 0
Secondary
No Request
| | 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 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 (1/O p. 5-15)
stime [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 March 1, 1900, taking into
account leap-years. This format is compatible with BASIC and Pascal language systems.
“Timezpl":
din T#C802,%C121,M#C12,37
aclr
geb “Set-time"
q=b "Read-time"
dsp T#;gto 4
CHA td ff = Qi
"Set-time":
pet "Type in 24-hour time and date as:
prt "Hr tH, MindH», Secs"
prt "Month{M:, Tavcl:, rearty)"
ent H,H,5,MyL,Y
if 1990: Y -1908+7
ir Meer A-3=Mygto 22
M+3+My Y -1>"7
stime Cinti1461+Y-40+int00153+M+4+2)4/5+0)424760%*68+H*+3600+H%60+
ret
wd Y Ti CN A
L303 D3 QI РЭ ГО Ра РЭ О Ry,
ба Ген бы
an EN AU un
The stime statement should be executed before any on-match, on-cycle, or on-delay inter-
rupts are enabled.
The stime statementis also used to transfer the battery clock time into the internal computer
clock. (The battery clock is slightly more accurate than the internal computer clock.)
The Read Clock-Time Function (VO 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:
data MAR, RFR, MAY, JUM, JUL, AUG, SEF, OCT, HOY, DEC, JAH, FEE
rstr "Eead-time"sfor I=1 to iZ: read MECII next I
l: imtirtimer>E int (5 - (24%80*8R +042 int (Dsd 1451 537
2: D-intcideleY-"4:D;int CeNXS-21-1531IMyI-intc£i52aM+22-514D
453: if MES; +109
44: E-Z+24+60+60+5
S-Cint(5-56081—+H)=28/G—3
SLIM ES 60I+HIXx60+-5: xd E
STREHIE"I"MRstr CHIR": TRStr 536", "EMECM+1ILStr (DO6"', "Estr C7+19000+TE
a: "Read-time":
de
i
+
En
“7
Fa
4 Ti
am
un
+
a
= fu
=
=m
> Ti
fuir
di
>
|
Ju
09826-90040, rev: 1/82
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 ani 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 (I/O 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; therefore, utilizing one DMA
channel does not prevent initiation of a second, concurrent DMA transfer.
The On Clock-Cycle Statement (I/O p. 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
(24x60x60—.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 evcle function,
described next. The on-cycle routine cannot be exited (via cret) until after the cycle function
has been executed! Executing on cvcle with no parameters disables on-cycle interrupt ser-
vice.
The Cycle Function
The cvele function returns the number of clock-cycles that have occurred since the last-
executed on cycle statement or cycle function. (The on cycle statement and the cycle function
zero the clock-cycle count.) The cycle function can be executed by the user program at any
time to read the current cycle count, but it (cycle) MUST be executed within an on-cycle
service routine before cret will allow a return to the main program.
09826-90040, rev: 9/81
4-36 HPL Programming
The On Clock-Delay Statement (1/O p. 5-15)
on delay [wait label]
dret
This statement enables a “wait” clock interrupt from the internal clock of the 9826. Once
on delay is executed, the internal clock starts counting down the “wait” number of
seconds specified (0.1 sec to 24x60x60 — .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 24+60%60—.01 seconds (.01
seconds less than one day). Executing on-match with no parameters disables any pending
match interrupt and service.
HPL Programming 4-37
Buffered I/O
Terminating I/O Transfers (1/0 p. 6-9)
An I/O transfer in progress to or from a select code can be aborted by resetting the interface:
GPIO-type transfer: wt ¢ select code + 32
HP-IB type transfer: wt ¢ select codes 31
O Buffer Extended Status (I/O p. 6-11)
The rds function can return optional parameters regarding buffer status. The syntax for
extended buffer status is:
rds { buffer name [ stype [ sempty [ «fill [ +dim]]]] > + 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 wir to a busy buffer, nor can the buffer ever be changed from a
word-type to a byte-type buffer (or vice-versa). Syntax:
wt ¢ buffer name [ +type [ empty [ +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:
son,
op
1 buf "A" 3,271
1:
2: 4 " Put data in buffers and save value of fill Pointer"
J: wrt "A" +"This could be waveform data" irds("A")>5
4:
2: tfr "A" 705
6:
7: A " Mait for tfr comrletion"
8: Jmr rdst‘"A")#-1
9:
10: % " Rewrite fill Pointer and restart transfer”
li: wtc "A":-1,0.:539to -5
12:
13: end
4-38 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/
rePrt. The ref 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/rPrt 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 (C"Buffer" :T.:E.F)>Lisert 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 wt c:
sread 1,D$:EsFasantc "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:
ds ( "Buffer" :T:EsF)I>L:s sprt 1:+E:F :BELE+1¿+F1
Sreadl;sE:sFrcocread1¿:BEtLE-1¿:Fiinwtc "Buffer" :-1:E:F
e Word-type buffer:
rds "Buffer" :+T:E:,F)I>L:s sprt 1:85: :BSLZE+1:F1]
sread 1 +E:F1 sread 1 +B$[ZE+2F1sutc "Buffer" >-1 EF
HPL Programming 4-39
Plotter Control (1/0 p. 7-4)
Internal Graphics Control
The 9826 and 9836 Computers both have the capability to display graphics on their internal
CRT. The 9826 can display 300 vertical by 400 horizontal dots or pixels; the 9836 can display
390 vertical by 512 horizontal pixels. Operation of the internal graphics is much the same as
operation of an external graphics device, 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 or digitizers not offered by the internal graphics
device: digitize (di 4) and line-type (l ire). These statements are not 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 Fclr
is executed.
All of the operations associated with graphics on the internal CRT can also be performed on an
external color CRT using the 98627A Color Video Interface.
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, or a color video
interface (98627A).
An extended syntax for the 98627A Color Video Interface is provided to allow maximum
flexibility for color monitors:
Ps c select code [ + TV]
The TV parameter determines how the interface will be set up. The values allowed are:
Value Monitor Type
1 U.S. Standard, 512x390
European Standard, 512x390
U.S. TV, 512x474
European TV, 512x512
Hi-resolution, 512x512
JVC monitors
not used
=> СО сл А WN
The default setting for the TV parameter is 1.
09826-90040, rev: 1/82
4-40 HPL Programming
The Pen Select Statement
The pen select statement Pen# has different meanings, dependent on the current plotting
device. For the internal graphics screen, the Per syntax is:
Pen# type
where “type” selects pen off (0), pen on (>0), eraser (— 1), and exclusive-OR (—2). An
exclusive-OR pen turns off dots that are on and turns on dots that are off.
External plotter pen control is unchanged for HPGL plotters such as the 7225 and 9872.
For the color video interface, the pen number is a value between — 15 and 15:
98627A Video Interface Pen Numbers
Color Store | Erase | OR | XOR
no-pen 0 0 8 -8
white 1 —1 9 —9
red 2 —2 10 — 10
yellow 3 — 3 11 —11
green 4 —4 12 —12
cyan 5 —5 13 —13
blue 6 —6 14 —14
magenta 7 —7 15 — 15
A program can be written to run all graphics devices if — 9 is used for the XOR operation, — l is
used for erase, 0 is used for no pen, and 1 is used for white pen.
Graphics Screen Control Statements
The graphics screen may be turned on and turned off with the following two statements:
goff (turn off graphics screen)
gor (turn on graphics screen)
These statements have no effect on the contents of the graphics memory. On the color video
interface, these two commands are used to turn the video off or on.
To clear the graphic screen or current “plotter is” device, use the clear graphics statement:
gelr (clear graphics)
09826-90040, rev: 1/82
HPL Programming 4-41
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:
ddump [select code]
The select code must include the bus address of the printer if an HP-IB printer is used, for
example, "gdump 7035". If the select code parameter is omitted, the system printer (prtsc)
device is the default.
If the color video interface is the current plotting device, the graphics dump statement will “or”
the three color planes (red, green, blue) and dump the image to the current print device.
The Graphics Pointer (Cursor) Statement
Interactive graphics can be achieved with the use of either an external digitizer (or data tablet)
or the keyboard and knob. A graphics cursor can be drawn at point x,y using the statement:
gpt 1 x-coordinate s y-coordinate [ stype]
The x and y coordinates must be specified, and are measured in the units set by the se 1 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.
The pointer can be plotted on the internal CRT or on an external CRT using the color video
interface.
Binary Graphics
The high-speed nature of CRT graphic 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 internal or an external CRT, and as such
cannot be used with an external plotter. The first extension to be discussed is binary plot.
09826-90040, rev: 1/82
4-42 HPL Programming
The Binary Plot Statement
belt string expression + bytes-per-line[ 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. The plot statement can be used to position the pen
to the upper left of the pixel. To conceptualize this, suppose that you want to draw the following
character on the screen:
Character Binary Decimal
00000001 (1)
01111110 (126)
10100100 (164)
00100100 (36)
00100100 (36)
00100100 (36)
00100100 (36)
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 br lot it:
—
J: dim ASLSOliesc 1Gigdclrirenirplt 3:7
1:
2
3: chartl)8char(i7Zo)8Rchar(164)8chart(36)>A$
A: At&char(36)&char(36}£char(36)&char(77)>h$
>: brit AS!
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 of 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] <........ > <........ > А$[4,4]
А$[5,5] <........ ><... > А$[6,6]
The optional “function” parameter specifies the interaction of the bP1t string with graphics
memory. If not specified, the EP1t 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 =3: performs a STORE (overwrite) function
The brlot statement does not affect the pen coordinates (x,y) or the pen position (up or
down).
09826-90040, rev: 1/82
HPL Programming 4-43
The complete syntax for the binary plot statement is:
belt string expression [ + string expression » string expression] + bytes-per-line [ + func-
tion]
The optional two additional string expressions allow for red, green, blue color planes respec-
tively, for the color video interface. If only one string is shown as in bplt A$, then black and
white is assumed.
If all three strings are used for bplotting on the internal CRT, the three planes will be ORed
together before the bplot operation.
Note that if three string expressions such as bplt R$, G$, B$ are plotted on the internal CRT, the
operation will slow down the bplot operation.
The Graphics Load and Graphics Store Statements
Two other statements facilitate high-speed graphics displays: gstore and sload. 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
91 oad string expression
The #sto re 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 for the 9826 CRT: |
—— A$[1,1]—A$[2,2] A$[50,501—
First row OT ets mi (400 pixels)
Second roW | ......... ее. (400 pixels)
ha wv — un - J Mrmr pd
A$[51,51] A$[52,52] A$[100,100]
A$[14951,14951] A$[15000,15000]
300th row TT nee cee aan. | (400 pixels)
N 7
09826-90040, rev: 1/82
4-44 HPL Programming
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 310ad statement performs the converse operation of the 3store 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.
An extended syntax of the #10ad and d9store statements is provided for the color video
interface. The extended syntax is:
ÿstore string variablerep + string variablecreen + string variableg[ ue
d1 oad string expressiongep + string expressioncreen + String expressiong[ ue
To illustrate these two commands here is an example:
dim ALI 24960]
psc 12
3store A$L1]>, A$CZ1> A#C31
will cause red data to go into A$[1], green data to go into A$[2] and blue data to go into
AS[3].
09826-90040, rev: 1/82
5-1
Chapter 5
Powerfail Programming
Introduction
Aside from the advantage of being able to sustain short power “glitches” automatically, the
powerfail option provides some powerful features that are found only in more expensive
systems. Among these are the capability to programmatically detect a power failure and to
backup all data and programs before any loss occurs. This chapter details these powerfailure
features along with the statements and functions provided by HPL 2.0 to take advantage of this
unique protection feature.
What Is It?
Put very simply, the powerfail system is a big rechargeable battery that automatically comes
“on line” for up to 60 seconds in the event of a brown-out, “glitch”” or power failure. When the
power drops, the internal clock time is stored into the powerfail unit. The powerfail unit
generates a system interrupt which can be detected in software. This interrupt can be used to
trigger several actions, such as to store away the data to disc.
The sealed NICAD batteries trickle charge as long as the computer is switched on and ac power
is up. The recharge rates for the NICAD depend on the temperature:
Temperature Range | Max. Recharge Time
0°C to 25°C 14 hrs.
26°C to 35°C 24 hrs.
36°C to 40°C 100 hrs.
A full charge will sustain a fully loaded computer through 2 power fail/reboot cycles spaced
close together. The number of cycles that are possible on a single full charge depends on the
complement of interfaces and memory cards as well as the amount of internal disc access
during the power failure. A full 60 seconds is available if a powerfail has not occurred in the last
2 minutes.
When the power is turned on by the power on/off switch, the powerfail backup time defaults to
60 seconds, power failures (glitches) less than 100 milliseconds in duration are not recognized
by the system (no interrupt generated) and the time stored in the powerfail unit is loaded into
the internal computer clock. All times are accurate to 10 milliseconds.
Since a clock is part of the powerfail unit, it is possible to store the time a power failure occurs as
well as the time the power is restored to the system.
Even though a maximum of 61 seconds is available during a power failure, there is no way to
maintain power after 59.5 seconds even if AC power is restored. If the protection time is set to
less than 60 seconds, subtract 0.5s from this time, and you can find the period in which AC
power can be restored.
09826-90040, rev: 1/82
5-2 Powerfail Programming
Detecting a Power Failure
on Pfail ["label" [ » protection [ » glitch]]]
fret
The on powerfail statement is used to set up branching to a powerfail recovery routine or to turn
off powerfail interrupts.
Without the optional parameters, on Pf ai 1 turns off powerfail interrupts.
When a label is specified, a powerfail interrupt will cause a branch to the power failure routine
to the line with that label.
The protection parameter is the time duration that power backup will be supplied by the nicad
battery. This can be programmed from 0 to 60 seconds. The default is 60 seconds which is also
the maximum backup duration.
The glitch parameter is the time duration the system waits before issuing a powerfail interrupt.
This can have a value of O to 60 seconds. This is to prevent very short “glitches” that are not
major from causing the system to execute the powerfail routine. The failure return statement,
fret, should be the last statement in the interrupt routine.
Since the glitch time and protection time start at the same time, make sure that the protection
time is greater than the glitch time plus the service routine execution time.
It is logical to place the on Pfail statement at the very beginning of your program. The
powerfail routine can be elsewhere in the program.
В: on pfail "outage" Setup interrupt branch.
1: prt rtime Loop and print time.
cd: gto -1
a
38: "cutage":rtime+T Interrupt Routine where time of
31: asgn "time", powerfail is stored.
=: Fort 1,1, 7
331 fret
оз с
The Power Function
POLIEST
The power function is useful in detecting whether you are on backup battery power or ac
power. The values returned are:
1 — acpoweris up; powerfail hardware present
0 — power failure; nicad is supplying power
—1 — no powerfail hardware option present, but ac power is up
09826-90040, rev: 1/82
Powerfail Programming
The Power Shutdown Statement
pshutdown
This statement turns the computer off, just as if the power switch was pressed off then on again.
It turns the computer off until ac power is restored then the system reboots. It executed from the
keyboard when ac power is present, this turns the computer off and back on again causing the
system to go through the reboot procedure.
This statement should be used to reserve the battery charge should several power failures occur
in succession.
The Power Time Function
time (option?
Depending on the value of option, this function indicates the amount of the 60 second battery
time used up (0) or the length of the current power failure (1).
ptime (0) — returns amount of battery time used up.
Ptime (1) — returns duration of current power failure.
Using ptime (0) you can determine the maximum amount of battery time used. This is useful if
power failures occur within 2 minutes of each other. The method used to restore the time to 60
seconds after a powerfail is via a counter. It takes up to two minutes (2 seconds for every second
used in previous power failures) to reset this counter to allow a full 60 seconds of battery
backup time.
Irregardless of the setting of the glitch time (set by on pfail) the internal timer begins the 60
second count when the powerfail is detected, not when the interrupt occurs.
09826-90040, rev: 1/82
5-3
9-4 Powerfail Programming
Chapter 6
Color Interface Programming
The capabilities of the 98627A Color Output Interface when interfaced to a color monitor are
similar to those of an external plotter and printer. This chapter goes over some of the program-
ming concepts when using the color interface. The first topic we cover is graphics and the
second is alpha.
The statements used to program an external plotter or the internal graphics on the CRT are the
same ones used for the color interface. Some of the statements, such as bplot, have been
enhanced to give access to the multiple color capabilities of this interface.
Unique to HPL are the necessary statements to generate formatted text on the external moni-
tor. This means that program listings, disc catalogs and other printouts can be viewed in color.
One note of importance before we get into programming is the select code of the color inter-
face. The factory setting of the interface select code is 28. Since this is outside the select code
range used by HPL, be sure to set it to a lower value; in the program examples, we use select
code 12.
Color Video Operations
The Graphics Instructions
All plotter statements that work with the internal CRT graphics are supported on the color
interface. The following lists the statements (described in Chapter 4) which have been ex-
tended.
bplt - now has two optional string parameters. One string means black and white. Three strings
mean red, green, and blue, respectively, Example: bp1t AS:B$:0%1,7
gclr - acts on the current plotting device set by the psc (plotter select code) statement.
gdump - ORs the three color planes and dumps to the printer set by the prtsc (printer select
code) statement.
gload/gstore - allows one or three strings in the same manner as bplt.
astore A$[11l]:A$[?1,A$[3] causes red data to go into A$[1], green data to go into
A$[2], and blue data to go into A$[3].
gptr - puts a cursor on the video monitor if it is the plotting device set by the psc statement.
gon/goff - turns the video on or off.
09826-90040, rev: 1/82
6-1
6-2 Color Interface Programming
pen# - selects the color of the “soft” plotter pen. pen% also allows you to erase, exclusive OR,
or inclusive OR the colors together.
psc - the plotter select code statement has been enhanced to allow a wide range of color
monitors to be attached to the color video interface.
Since the operation of all of these graphics operations are explained in Chapter 4, let's go over
using a few of them for programming.
Using the Statements in Programs
Since the computer assumes that you are using an HPGL plotter at 705 (9872 type plotter on
HPIB) when it is turned on, the first step is to change these defaults. The psc (plotter select
code) statement changes the select code from the default. So, the first statement in your
program should be a psc statement.
For the Barco monitor we used, the psc statement was: Fse 127
Then, to “clear” the monitor off, put a gclr statement next in your program.
Now, let's just draw a few lines: one in red, one in cyan and one in blue. First scale the plotting
area so that the end points of the lines are within the CRT limits:
scl 0:100 30,100
Now to plot the individual lines:
pen* 2:74 "select red pen"
pit 10,10,1;% "move to X=10, Y=i0"
pit 50,50,2:% "draw to X=50, Y=50"
pen# 5:% "select cyan pen"
plt 0,50;% "draw to X=0, Y=50"
pent 4;4 "select green pen"
O: plt 10,10;% "draw to X=i0, Y=10"
+ $ O YE QS:
To save the entire image away, you can use the gstore instruction to put the image into three
string variables:
dastore RE ,L$ ,B$
R$ contains the dot pattern for red, G$ for green and B$ for blue. Once the colors are in the
string variables, it can again be loaded back onto the screen by the gload instruction:
dload R$:G%:B%
09826-90040, rev: 1/82
Final Program:
и,
‘ед
os br =p ee = GON Л А А В Нк ©
PJ DAB © =
Jo un AE wr un вв ока
un BD “E an HT ue. un LE) an
dim RKR$[2494801,G#$[24940], B#$[249607
psc 12
gcir
scl 0,100,0,100
pen# 2:% "select red pen"
pit 10,10,1:% "move to X=16, Y=10"
plt 50,50, 2;% "draw to X=50, Y=50"
реп# 354 "select cyan pen"
plt 0,50:% "draw to X=0, Y=50"
pen# 4;4 "select green pen"
plt 10,103% "draw to X=10, Y=10"
gstore RK$,6%$,ES$:% "put graphics image into string
stp
gclr
stp
gload R%,G%,B%3;% "reload string image onto crt"
end
181
Character Animation
The next example shows how to use bplt with the color card and the knob to generate anima-
tion. The program is documented to show what each step in the program is doing.
ба бо ее бо
на на
некое ой CO 01 A CE ER
17:
18:
15:
M0 CO Fy EN LO ГО
4 4 4 4 бд 03 0 53 09 0 0 0 0 055 AIO BYRD DPD Ра PS
62 Ро Нк оба А 00 про ENE fl = CS
dim RELE, CELA), EFCASI], AFC4]
"xo 5
pac 15% "Eequired to da Text-Graphics on color video interface’
go lrg "Clear graphics image on monitor”
“Red"ifar I=1 to 213% "21 rows in image"
for J=1 to 33% "5 bytez - 24 columns in image
read E;% "load an octal data bute”
str{FR3#H$;% “put data byte into string”
F¥ichardval (AF, 22 2+R$:% "convert octal to decimal"
next 1
next I
"Green "for I=1 to 21
for J=1 to 3
read L
str(1-—#Hh#
Gté&char val CAF, 2: 1+6%
next Jinext I
"Elue" far I=1 to 21
for I=1 to 3
read E
str 0 Bi+A#
Bfuchar {wal (A$, 501 +EF
next Jinext I
sel 6,186,6,186
peri —1
on knob "моче
T+é
и
plt A, ЗВ
bolt ES, 65,TS,T.2
belt R+,64,BE, 3,7
gto 27
"mone" i knobte en
bret
Lp
"Red Data":
data B,8,8,8,277,4,7,8,348,14,08, 34
data 18,8,1a,28,48,4,21,2681,2684,41, 201, 284
data 408,8,4,48,8,4,48,8,4,41,68, 284
data 48,2681,4, 26,162, 4,268, 6°4,168,16,68,16
data 4,68,28,2,8,45,1, 581, 568,68, r6,6,6A,6,6
"Greer Data":
data 6,6, 6, 6,6,0,6,6,6,6,H,6
data A, A,6,8,6,6,1,281,588, 1,281,586
data В, В, В, я, В, В, Я, В, Н, В, Я, й
09826-90040, rev: 1/82
Color Interface Programming
variables"
6-4 Color Interface Programming
44: data 0,0,0,0,0,0,0,0,0,0,0,0
4%: data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
46: "Blue Data":
47: data 0,0,0,0,0,0,0,0,0,0,0,0
43: data 0,0,0,0,0,0,0,0,0,0,0,0
49: data 0,0,0,0,0,0,0,0,0,1,0,200
50: data 0,201,0,0,102,0,0,74,0,0,0,0
51: data 0,0,0,0,0,0,0,0,0,0,0,0
X12092
This program makes a three-color happy face. Using the knob allows you to move the happy
face back and forth across the middle of the screen.
Alpha Text Programming
In this section, the text capabilities of the color interface are described. The examples show how
to print text in different colors and how to print text in any location on the monitor.
The distinction between alpha and graphics is the way characters are placed on the monitor.
Using the Ibi (label) statement, the character is plotted, using short vectors, on the CRT. This is
somewhat slow. Using prt (print) or list# (or several other statements), characters are generated
from dots, just as you would see on a dot-matrix printer. Labeled characters, even though they
are slower, can change size using csiz (character size) and can be plotted in different directions,
too. Text which is printed cannot be enlarged or rotated, only printed as on a printer.
Even though we are describing alpha operations, it is important that you place the psc state-
ment and prtsc in your programs even if you are not doing graphics.
All of the alpha operations described use the wti (write interface) statement to access registers
on the color interface. Before you can access these registers, first execute:
Wti O » select code
where select code is the select code of your color interface. This “opens” the interface to give
access to the individual registers. Once the wti ©: select code operation is performed, other
wti or rdi operations access that interface, so only one wti 0, select code operations is needed to
access several registers.
Setting the Alpha Print Position
The internal CRT uses the tabxy statement to set the alpha print position. On the color inter-
face, the syntax for the same operation is:
wti 1 alpha print position
09826-90040, rev: 1/82
Color Interface Programming
The alpha print position parameter is a 16-bit word of the format.
REGISTER 1 Alpha Print Position
Most Significant Bit Least Significant Bit
Bit 15 Bit 6 Bit 5 Bit 0
y Position x Position
This register is a read/write interface. So, if you need to know what the current print position is,
you can check it by using:
rdi 1: Y
and decoding the value of V to find the current x,y coordinates:
U mod 64 = X (x coordinate)
int (1/64) + Y (y coordinate)
The 0,0 location on the CRT is the upper left corner of the CRT. The maximum characters per
line is 64 (0 to 63) as you might expect. The number of lines (y positions) depends on the
number of scan lines (this depends on the monitor you have). To calculate the maximum
number of y positions use this:
y positions = int (height scan lines/12)
For the Barco monitor we used, the number of scan lines is 390. So, the number of lines is:
int (390/12) or 32
This means that lines O through 31 can be used.
The following example is a simple program that asks for an x,y coordinate and places an
asterisk at the x,y position on the monitor.
E: "Color Yideo Alpha Print Position я
1: psc 123% "Required to use Tex “Graphics on color video 16"
2: prtzc 123% "Frinter 15 the over widen interface"
3: fxd В
4: prt charciiós% "Clear screen with form feed"
Si "loop "rent "Enter E print position LE to EXT a;
E: if ELA or XTETdap ""rgto "loop"
Fr “loopl':ent "Enter Y print position CH to 3955125 "Mary
ES: if YB op Y +3: ds Fo ""rgto "Ioopgl"
a: if #28 ar “TES ar Y<6 or Y>33:dap ""rgto "loop"
18 +Y +2" 6+F Compute value to store in reg. 1°
li: wti 9,173 Select colar if For register access”
12: wti 1,PF:% "Set alpha print position on color jo"
13: prt "x"
14: gta "loop
15: end
BEZ
09826-90040, rev: 1/82
6-5
6-6 Color Interface Programming
Writing to the Holding Register and CRT
To place a character into the alpha holding register, the syntax is:
wti 4» character
The character parameter is an 8-bit character that corresponds to an ASCII character. If you
were to execute:
Wwti 4, BO
the letter “A” would be stored in the alpha holding resgister. To transfer this to the CRT, the
following syntax is used:
wti 7 dummy parameter
Any 16-bit value can be used for the dummy parameter since the value isn't used. The wti
operation to register 7 is often referred to as the trigger operation, transferring data from register
4 to the display.
The Interface Set-up Instruction
The configuration of the Color Video Interface can be set up by writing to register 5 of the color
interface. The syntax for the setup operation is:
wti 3 8-bit register value
The diagram for this register is:
REGISTER 5 Interface Setup
Most Significant Bit Least Significant Bit
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
: | Graphics Reset .
Scroll Bit | Don't Care Reset On/Off |Monitor Type Monitor Type
1 = Scroll 1 = Reset | 1 = gan 0 Not Used
0 = Scroll 0 = Reset | 0 = goff 1 U.S. Standard (default)
(default) 2 European Standard
3 US. TV
4 European TV
5 Hires
6 JVC
7 Not Used
Value = 128| Value = 64 | Value = 32 | Value = 16 | Value =8 | Value = 4 Value = 2 | Value = 1
09826-90040, rev: 1/82
Color Interface Programming 6-7
To reset the interface, bit 5 is set. All other bits are ignored if bit 5 is set. To set this bit use:
Wii 5 val ('"O0IOCODO" :7)
The scroll bit, bit 7 allows you to provide scrolling where new lines of text stack up from the
bottom and move the top line off the CRT. Also, you can turn off scrolling. In this mode, the
text sent to the CRT “wraps”. This means that after the CRT is filled, new lines of text write
over from the top down.
Bit 4 does the same operation as the gon and goff instructions performed. We recommend
using gon-goff for compatibility reasons.
Bit 3 is only useful if bits O thru 2 are being changed. The psc statement performs the same
operation and for compatibility should be used instead.
Select Text Color and Inverse Video
Writing to register 6 on the color video interface sets the color that text appears on the CRT. In
addition, the text can be displayed in inverse video if desired.
wti Bs 8-bit register value
The diagram of register 6 is:
REGISTER 6 Text Color & Inverse Video
Most Significant Bit Least Significant Bit
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Inverse
Not Used Red Green Blue Not Used Video
1= Red |1 = Green | 1 = Blue 1 = Inverse
0 = Red | 0 = Green | 0 = Blue Video
O = Normal
Video
Value = 128| Value = 64 | Value = 32 | Value = 16 | Value = 8 | Value = 4 ‘| Value =2 | Value = 1
The default value is 0: normal video, with red, green and blue on (white text).
09826-90040, rev: 1/82
6-8 Color Interface Programming
The following example shows the different combinations of color and inverse video.
8: “Color Video Text":
1: psc 121% "Set select code for color video interface"
2: dim Z$041,T$041;" "427$
33 prtac 154 "Printer is the color video interface"
4: xd E
ЭР реб char (123535 "Clear screen with form feed"
Er wti 6,1235 "Select color if for register acceso"
г: For ASÉ to 1
de for = to 247-1 En 153 = "Loc E to set npite 4, ZI & of color video if"
a: lentstr(I)5=—T5;=T
18: uti 8,93% "Select White text in reg. 6"
11: utb 12,Z2$0TIET8ET "3% "Print Register value"
121: wti 6,1% "Set color-“inverse video on color dee
13: —_rt "RarbCoDdéEeFfGgHhIiJjEELI MoHrlOoPpOgErSsTtUuYoidu deu Ex"
14: next I
12: next
16: wti E, 1Ewti 6,93% "Restore reg. € to white on black"
17: end
#124392
Summary of Alpha Instructions
Wti Ü » select code Gives access to the color video instructions for the color inter-
face at the specified select code.
Wti 1 » position sets the x and y position for printing text (similar to tabxy).
rdi 1, variable Reads the current text position into the variable.
Wti 4» character Places the ASCII character into the holding register. The trig-
ger operation (wti 7,0) transfers this character to the CRT.
Wti 5» value Sets parameters on the color interface such as TV type, and
scroll or wrap.
Wwti Bs value Selects the text color and inverse video or normal video dis-
play.
wti 7: dummy value Used in conjunction with register 4, this operation triggers the
interface and transfers the ASCII character in the holding regis-
ter to the display.
09826-90040, rev: 1/82
supported drives are:
A-1
Appendix A
Disc Programming
Technical Appendix
Supported Device/Format Combinations
HPL 2.0 will support 4 distinct disc drives and 2 different mass storage directory formats. The
9826 or 9836 internal minifloppies (544 inch double-sided discs)
32900 Series minifloppy (544 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
[ 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.
09826-90040, rev: 1/82
~ 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
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 0 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 A-3
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 DS,
(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
9825-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. ASCII files are not supported on 9825-format
discs.
Creating ASCII Files
ASCII files are created with the or en statement. Refer to the section for the oren statement
for a discussion of syntax.
Example:
open "ascii.file" 10 :"ASCII"
09826-90040, rev: 9/81
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:M/02 #2" 22 >-1/#R
Accessing ASCII Files
ASCII files are accessed via the sF rt 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 sP rt to ASCII files is governed by von/voff.
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 flt 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.
Each 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. À 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. If “end” or neither parameter 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 “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:
sertils,s"hithere!"
dim ASCLSOl1,B$[5:+100]:ALlOlisread 1 ,A:AL*1,:A$,:D$
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 typoe{ti)#33sread 1l:AtiPprt AS:.imPO
Using On End with ASCII Files
Use of the an 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 i:s"'endaf file reached"
sreadl:Atireprt ASrIimePO
09826-90040, rev: 9/81
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.
® 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
® The variables in the variable list must be a contiguous block in memory, as required
when recording data to the 9825 tape cartridge.
o 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.
® 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 oren statement. The oren 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_filesM" +10 "NULL"
rewst rk Osmrk 53,2000
Technical Appendix
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 O. 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_filie:sF" 3
Accessing Binary Data Files
Binary data files are accessed with the sPrt and s read statements exclusively. The other
disc data statements, rrrt, rread, trPe, 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 rcf/ldf, 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-7
A-8 Technical Appendix
9885 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 fl will be issued.
HP-IB Programmina 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:
f0 Unable to access disc controller
f1 9885 driver requires a DMA card present
f2 Invalid msus syntax; illegal device/format specifier
f3 Directory entry field overflow
{4 Illegal structure on LIF disc; cannot be repacked
f5 Attempted disc copy to significantly larger disc
f6 Attempted disc copy of 9825-compatible disc to LIF disc or vice-versa
f7 System record not valid for LIF disc
f8 System record not valid for 9825-compatible disc
f9 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 FkKbd 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-t0-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 Ny
A 1 SOH PAUSE SH
B 2 STX REWIND “x
C 3 ETX HOME LEFT |< Ex
D 4 EOT HOME RIGHT + | ET
E 5 ENQ TOTOP 1 Eo
F 6 ACK TO BOTTOM | “x
G 7 BEL RESULT +
H 8 BS INSERT LINE >»
I 9 HT DELETE LINE Ur
J 10 LF EXECUTE CF
K 11 VT RECALL “т
L 12 FF RUN Fr
M 13 CR ENTER R
N 14 SO CLR TO END “a
O 15 SI CLR SCREEN Si
P 16 DLE DOWN ARROW PL
Q 17 DC1 UP ARROW e
R 18 DC2 CLEAR LINE Dz
S 19 DC3 PRINT ALL Pa
T 20 DC4 LEFT ARROW Pa
О 21 МАК RIGHT ARROW Nk
V 22 SYN INSERT CHAR Sy
W 23 ETB DELETE CHAR “5
X 24 CAN STEP EN
Y 25 EM CONTINUE Em
Z 26 SUB DUMP GRAPHICS 5
[ 27 ESC DISPLAY FUNCTIONS Ec
V | 28 FS EDIT г
] 29 GS CAPS LOCK ts
^ 30 RS ALPHA N
_ 31 US GRAPHICS Us
1 This is the 9826A pkbd keypress and the key pressed from a remote ASCII keyboard.
2 This is the shift)” key on the Numeric Keypad.
3 This is the displayed character if “DISPLAYED FUNCTIONS 1S ON”.
09826-90040, rev: 1/82
Code Charts B-3
Keycode Conversion Tables
SEZE Hardware RECIJ S529 Hardware A828 Hardwars ASCII | 98755 Hardware
Keycodes + Eevcodes Keycodez +4 Keicodéé
El ная sa ВВ HEE аа ATE + с HIG Е = E
— Mm
>
he
e
Lal Ta
т
Тао =
a]
Ln
ft
amm
mm о
ma y
=
Бо =
To
La)
E I
ma
En RI RA AT LL LA ET EY ALA EN 48 DA POR
Le)
Lai Le
—
Lal
=
=
n
+4
ce
1 me
E па
== y
E Ty от
по по (о
at
1
[NAL
I À
yl
E
meo
nou
OU RARE 6 Plo ED
[aA]
mi
—
=
Ti
a]
nn
[x
da
EN. 6 [+ AD Ja кн
a
NE
'
ло Г) 2 EA A E 4 Y Со со ma yl
1
1
ma
J
Lal
zZ
a F5
Ta
Ta
a
10
A
i
—J
a
Fe ++
ET
CN OT a LD
eu
1
эт.
кл
Y
SE
ma
ma |
m
mo
ha
би
A
—
mu
Ce > O +
e NT
120 A
a
ET
Em A) A A]
TI ..
pe e ое оне он не
Г) ==
по 5
-—
Ral
—
Гы
a
—
DIRE
, LH 4 A LT > À
[ny =
—
TEA
T1
1 СЫ
-
IM
mi
za
—
ml
Ty
AN
[a
om
rua
D
ma
=,
а
Tte 71
"—
кА
OS E
pa ++
a
—
о
== X
i
re)
od
ret
ti A E Y
ame
LEO TL Le CA CA CM LA EN EN NM IN fe O e 4 бо
A —
im
|
CIT
i=
=
IM
m
"TO NEO HO a
T5 a O OE Ga
A
=
ce
Li
—
Ea
1 AA [OPA A ее ое es
el
LI
тои
1) а
A
=
1 a
=
I [AC
a
ma
TT +
mud
La
1 FA O1
ce +]
We
ma
и
a
aM
|
a
A
бо Го =
Dd бл по РОГ.
“JO 11 RO (1 6 065 ENOJA
о
En
—
Do
1 0 00 Da бл Lai a pa
m5 7 1
о CO
Y;
Tm CA
Td
— TC
Lira
=
hon
MM
1 A CF EP C1 FR 1 E вр
[11 X
-—
Na
mm
e
e
6]
у
e
A
En
JT NEL DI MO
а ат
нот
1 al
y
|
=
To OF
=
О
пи ос
о
a OS
=r
ma
1 151
jy
я
—
|
CL CR Cn ON CT TE 6 fe IA
IT AL
Te
wa
>
wd
cl,
[ey 15
ETS бд ESOO 5 1
J Ty in fa
ma
Ln
La
=
—
=
—
»
ет
A
my
—
=,
“ло
a! La
E
Е
mod
De
Ty |
io À
e с
y
120
=}
It Pe
LACA AAA AA MM A AAA LA AAA OA
“2H
100 — Où 11 Æ BOP) es ITM
=
= Ty
та Ey Rd
=>.
ЕО т!
na TA —-)
Em en
по о а
D 0 a
her
m
TI
ka
—
AN
ба =
—
La!
es
na
0
т
La
>
па
—
La
a EN
LE E An
En mz
Eu
Fam
ua |
ma с
LA
=
mi
De
—
Ti
Ti
—
i
т
id
a MB TIM
E DOME
HL + af
Lo AA Ly
1
fa EN €
bd DL
a
+
mi о
Fa TE
=
y
>
„=
ut
=
onda!
=
md
ET"
[a]
TEN
LO
» 17,1
H
E IE
a
fool LE OT IT Je LS PR ye
fe
mi
a
eS
a
ex
7
оо
mo
id
22
ï
SOS IM
ed
Tu
—
Jo
ad La
MO PARA RI RI RS BY DT
TA
Cred Dd ar
Lal b= EA
A
De
mi
FT
E
m
Ч
ar al
ET
mm
e
E Ta
LA
—
ЗО
LT
To
[ax]
po
a
E
ce!
Lil
7
ze A Y
LEA)
ma
— =
SE Gn
=
a. a К
1 ml
21 1
o En
[a J
meo Y
ово вок
че
e
ао
—
ль
{о ml
троек ок обл fs fa fo) IM
EN Si EN e об fa soa D0 MO 1 РО Нк по с) бо 48 К AOL LA E EM
по пса РД
В 1. = aa gas mo 3 3
E E LE E нае Ha Só E x E С;
1
1
=
E E Y ED
e e a
Le St
ги о
= an mi HEE Г 1 " a В
BA Ga añ ki ai Has = Э Hd
ml
|
a TY
e
er
Es 1
End
e
—
к!
je
[en]
TT
(A 15
E
1
TT
TT
ha
el
mm
Гл
=
7
=
"ma
zZ à
J
e
E
ed
o
i
—
Bl
ча
—
ha
=
red’
но
=
zZ
om rm) Ty fa
Ln
т
=
bi обо TE Mm
nom NR
Ka
a TL
a oun
Ро ее @ |
pa == (A
Te
me
Pd ET RA CA a
mL
LEA)
E
= от ENE LP ST ITU
11 MM LO Je NA AND
oy
mi
el
a
SI
г
JT EE AD EE E POI Te OS
Y
A
4
a Y o A ETS Js *
La DO Pa 0
тоне ED EN EN Pa EN A Ld ED =
Éd
т ra
e
чл
NN NM E BE BR BA Li Fe Lo aa
LA E
Te E EY RX
AN E PA ALA COLE 11 MO MAA E SOMO Er 74
ol ps es
a
Th wi
Ti
1 E a О) IX
K 5
ef
Зо dd SO
E
a
UE
po
т
al
Len)
>
AN ло Ра бд PA MP По OT Res AO AAA AE SN
Ta ET
а ба a Ey Ek
=
RX
a, 4
Ta
+
AA E
Es
.
6 pt AO OA HA A RA ES
чз осо 71 7 CA
Lt Us
TA a
ua
A En LA AE
Es
1 a CS
Fa Re A овен RAE OA A E Са са
то EN Ja a
mE
mo
a, m
+ A OA
—
—!
=
A
“1 00 PAR OO EA OLA
Ei + fr
wl
me |
mu
Ur fi Ро + > + LR E PM оба ооо бо О
O O A A об оно кб 6 $ A кб но 2
т
La 63 Di
E
Fo pr pe LOA OA AA EA A EA AA E A
LLO E
LA
MIA
ju
e
Ta
Lu LT ha | on
Em бо A Y
a LA LA
Tu
Lo
=]
»+
Ll
Ls
Le
=] =) 74 0 A PM Ty fT I hy Te AR LOTO UA CE] LALA E Y
Lt >» A LAO E;
4 01 6 fe 5% TI
EN Si A MD be
e =
=
a
а HD AA
“о
Y
rm
= 45
Li ti
E
1 mu
+
"TE,
>.
SA A MO A NOA E m LA F da e UA
aj
+
es,
A
Гы]
Vopr Pur Tor Fer MT fu Ге) A RO E еб к кн ee Нк В 6 8 НН ВО |
PAPES A A (Ty Ty md mf om) о (по Ва
a
a
Bee Be be ee Bo fa da fa fa fa 55
OR O A AN |
2 no
=}
nm =
Ta
mo y
Li
1
Ty LA da
ба
mm
Е
a
pa
ci
I
es
a
+
a
EE a бр о) а
= о EN Le Ld aoe GOTT
wd omg md md md а
A lA бы fa 5) TD
TT ER AT ym FT md md nd md TF A E РО ОВО Ра Ра
TIT) feb bb ek fet bb BL fh pb en Reb LOA AO AAA OEA AO DEL
bh Fb fet leh pet fer eb bb fb ed pe bh bb bet fb LL Re I HE HA ES ie Rh веб en 8 НН Re ee EE ES NS HS
па ба бро BOL SA N N E LALA ET Мо ee ry
1
1
1
i
1
5 1
i i
2 1
= 1
4 1 а
5 A 1 1 1
6 4 i 6 i 1 4
3 7 5 1 6 EZ 192 E
3 = = : цы ° - 9 1 6 q 183 163 7
a41 2951 29 H G09 gs Al as 117 6 h 184 | 184 В 8
842 BSE ZF ч 811 11 a13 GE 118 E i 186 | 186 2 A
B42 B53 O ZE 5, а22 | 622 MATE 16 119 E и 195 | 189 5 D
a44 BS4 2c Е а23 | ASÍ wav 17 128 7 78 z 122 | 122 2 A
a45 2655 2m % g14 | son see ME 121 7 73 x 128 | 128 a 8
246 856 ZE E, seu | 820 024 14 122 7 TH E ass | 69% 3 a
аа? 857 =F Fre 512 | sis @l4 ME 123 7 TE м 118 | 118 6 6
CEC @ed 36 Fs G22 | 622 @34 1€ 124 7 TE bi 898 | gas 2 2
a49 Bel 31 6 Aza | eme 900 ME 125 7 71 п 11€ 118 6 E
ава Bez 32 + аз: | MEG aoû GE 126 7 7E 632 | вав jag BA
a51 вез 22 5, в24 | 824 вазе 18 127 7 TF 832 | ARA вая OA
a52 2864 24 E а18 | mis BESO 12 128 zoo = se 832 | cos 800 MEA
953 dés 35 а 887 | BETO HET O в? 129 26] 51 532 | a6g 9806 AEB
a54 MES GE D, 819 | Bis BEE 13 138 2ez = EE 632 | seu 665 69
a55 MATO 37 4 252 | 580 ses BE 131 263 83 яз2 | 066 ans 98
a5e 2078 36 z El | 861 aai @i 132 284 84 azz | 066 MBE as
957 871 58 % а13 | 8123 215 AT 123 205 ES 622 | sos sea 8
a58 02872 3A , 825 | 625 @31 19 134 266 SE azz | ава 002 = 68
853 B73 ZE Le Giga | ais ais BA 135 267 av 32 | 880 aoû = 68
Ge 74 SE а G48 | Ars ¡16 4E 136 218 se 622 | @om 666 M6
Géi are 31 RdA ass 159 pe 157 211 Эа BIE вая Had Ha
BEZ aTé BE , Aad | @89 131 59 138 212 EH 232 | 666 ANA ME
вез ATT O SF + a43 | 042 BS ZE 139 213 BE аз2 | вая sas MA
BES 168 49 1 ada | ата 117 4F 148 214 BE вз2 6668 600 ME
ges 181 41 2 ася | азв 128 58 141000215 SP a32 | вая EAN EE
BES 182 42 3 851 | 681 121 51 142 die SE 32 | 666 9800 Me
ВЕ? 183 43 - 845 | #45 B55 2m 143 217 BF аз2 | ава 800 ME
BES 104 44 4 a5Z | BESO 1520 52 144 226 96 azz | вай 806 ME
ges 185 45 5 853 | 882 129 51 145 221 91 222 | sup = G6€ ge
are 106 de 6 854 | 984 124 5d id6 225 YE 32 | cos 006 ME
a71 187 47 * maz | @4z ASE ZA i47 228 93 аз2 | вав 9800 ав
B72 116 48 7 ass | BES 125 55 1458 224 94 Azz | ева pag mE
873 111 4% 8 ASE | BEE 126 56 149 225 95 832 | 600 900 ME
ar4 112 4H q 857 | 887 127 57 158 226 96 622 | вав pag вв
975 113 48 ая? | 847 @s7 EF 151 22? | 97 аз2 | вая 900 mE
с
ay
+
Tt
+
JD
+ Louer © SEXE keycode only,
B-4 Code Charts
COE OF fa = a
WO uf LE LI
ur ET
En
MO TY CAL A A
=] Ty
,
ия
+ 4 QI 00 CI 0) 00 O1 O3 C0
Papa pd pd pd BOD TO ба Га
— 1
oT TA EN
ди] я >
=. =.
qT
! = —
Г
ch En
=
=) TN до Горе. STM ES ENT
CI
Js
Ls
I IID ро о 2 со о ро сб ча
LA Ls Là Гео ба
I
= I
AT ENT Ty TR Th
Lie A SOT
En
ño
Er
Lu
1 —A
e
cn
x
1
o со
E
На 6 69 6 Ed
LE
La
Ч
+
MA da i
EA чобы оон oh a fod el
Go E EJ LL de 65 Rd
FAR
a
aD 5
Boom] RE LI + O LO A TY TH LOL LA YE O LA
чот
Tea AO TA
Fa am a GA A = е=
Nr
hor
mona
бо ma
E] PE
E
He ALA La On
x",
—
1
a paa Pp E E E
21 EN EM NENA LA LI pa + E a |
Ur all ae LY
I
J
Ly
=
ma
1
F
== Har du
Kewcodes
CCT
E
—
[an]
4
4!
a
pu
mu
J TE
=
Tm um
FC
Ч
Г
ча
1S A es ee] ES
ча
hon
—
a
Ман
ча
1 PIE EE AOL BRO TA ENREDO EN
Ll
NL CACA O MA
ET боб бло бло бое HS
MO ID оо с
1
4
5
&
= в =
5 a 3
4 ее E
45 ZE al
sa зе Cr
ва 31 ES
ds LE ad
du Ze 35
E 21 se
F ci = 3
= ci ВЕ
== se
а
оо йо
об fe © —
UM Æ L Tl CT Od лоб fa
OE TT CE E = 5
Eu
El CA OA O AA EA OA OEA OA ee Rd [LD A bed feb fed O A A SE CS
па о
=
-—
Lal
Ln
o
ML
Ia E A AT В
wa
Te =
Ls
E.)
HH N]
ES
as
Ed До бб) бл
MC CO =] Tn LALA Y A > 5
Ja da fus QO
a
EEES
… Fa
1 fes
Г.
244
Mu
4
Ln
246
= =
= r
= =
= Èr
"7 [us
247
a
ENE MN ALL
ha |
REN
A
1 Tr
“5 04 LA Lo C1 FX es ES
CO ed à 03 1 7 Ld BF DT Lg
о
та
LA Le LA aoe
iF
GI 03 0 ло брал LO
E UT Fy oT Ty Te TE Oy EM CUT CM CN EN LO UA LA LA fe
ud
278
3
EN Ja at fio
ET
AA Dl
o
mm
C0 ОС
ча 0
oft 00 00 CD
Em E ODO NO og Y A ufo Wd)
DO SON A бл O ORÁN AT UN LS OL 00 Y TA AOL IA AED AT LN ELA 4 SD I CCS A а LALA LI O ML O Y TM NE E
ба 2
1 Fu Tes Pd Pd Ва Ра па Pd Ted РО Pd TR OLA LALA LOMA Pr ful [ud Rd bs bE er pe веб оны Rb pt pb bh Ft AAA LAA AAA EL нев необ bh pmb pe mk ph fh pd pet pk bd fet eb оны кн оне оны оны ой небо ны
co
—
+ Г.
Гл
24
=
E
-
К
т
=
mu
A ET NL Lt LOA EAT EA
—
mu
OS CU CP PU Pi Pur que fu PRS RD DO PI LOLI AI ES LA AA MORA LA Ted A A fu fra [ud
—
o£
i
==“
a
Le
En a 9
a
La
LL
td LI A fr Pie a TOA JO LO OEA A A pe
ad
LALA Cd 6 03 C0 Dd D0 1 д A ET бал
+
C4 И
DJ Edd
Li Est Da
Lt
uE 00
ni
E Lower
a A AAN 4 бо о СМ TY LA EN CAN EN A CN CAC ALA
Lit
WE RRR 4 4 0
FO Æ 6 fi ETANOL €
5 —4 Ty LA
—
a,
E A MA O ER EN LH LOMO A UE
=
‚1
Pi]
TT
2 2 0
e E DL
bd bd
mm
CIF fe O0 (0 Y
E Te (0) =)
=
ET TE CC CT р бр К ER E E CT hk
TI
2
Hee HE À
EE Le E TM
Dr
IA
tE
UT
IF
ЕВ
El
EZ
EX
E +
ES
bits of
yr
=m a
+.
fi
+
ей
Fr
0 CS =] +
> 21 НЕ Ш
= — +
n. + = + |
27 a оо оо о ©
E
Kal 15}
MO Je Le LL e furor
Ti
боков бб) (о д бр о) р род а ар à
F1 0 Fo бя CM
EA a ee
ба обо оао
[an |
Fe Æ 4 Лоо CA Da Dd роб
El ma
—
cu
177
=
yu
> + |
a O AM TA TO
5 A Y TY
EN A dei
спо 65 с ENE RENA
cn
Ра ча
Te Ty Oh 4 CAPI Ро fe
1
pe,
=
SOA Da fe,
Qu Æ AT ©
о
du Tas
A
Ta
4
[ии
че
a
Son Pon BOE COOL eS LE A MAS
140 Cr C0 CE
PLANA PS LN A
Mo
Lo
Too A (ооо Г.
=
a] e e |
=
+ от ATA CEI E oes Y LO Ty [AS
NI [OMA pet pes pen PAGE A A + HH
лы
в к К ni
EX + E AE A A TO
+
fe.
=
1
| = >
JE AL Le EN
$ CORA Y EN LAO РО EN PA pa EN Le
OA E E A (TO Pa LE LN Ted AO MONA AE OT PIE LO A A
ZO POP PI MA E [Lp
mn
e
та
ma 1
оо =!
Te HE
HD CO CO =
Wo SI Te oF LN fe LO mf ee
= 0 Г 6 CM
1 C0 I Ty [М
e pue нес
ah
=] Xr
но m
ps
—a
—
Ja
1 A око
DE
= TI OEM
oi tt =]
TU a
EOI > > CA EN CO LA TE a MT A ро C7
Ll
TA
TT:
m
sE оба РО
ERA ба ра Li > EOL Ра DE foe Ва ГО РО РО па
La AE
TR Li =]
7
4
о
RA A A ео A d+
my
2 LEO OEA E = SO ES A Lo ен быв ЗИ був тр (ба Пока CNC Fe Gl E Ро оне оба OC
“Da à
a A E
Ma
LE LT
a
=
TIT I
ai TI
keycode only,
Tal
=] =!
LA
TL
Ta y
E He
bl вет
1 Ti
т
an
4 A Mm
TE IS
|
,
go Co à
un
Ло о е=: С
ба CA Cù C1 D OR
O a E E a
T1 0 y 1
Za To EA
ПО о ED
Ti
E
4 4 md
1 2
er
Il
ma
[az]
ca uy
Ti
MICA A A OT E ML ГО не
=
E E о
7, CO
2 03 I
E
E Le A >
a fur
=
ol
a
= a
a
1 En
Ef
са
чо
с
LA To es
mo E Mae
=] e
TT
LIA E
зоба Ра по fa MORI 7e
al
Чи
Lal
г
pl
1 CS TA
Harduare
ОСТ
EEC d
Ut T0 00
м
м
A A EA EN LO LA LA fe fT Be OT sd бб Le Сб IT IT CM
mL. i
ma 04 Га Oy i
(NO OO CE on
a MA CA E a A E A
DD ENT Lal
HR fd Sd
wi Ga Gh
a
AL A a
—
=
17
[MM]
= =
ci
Appendix C
Differences in HPL 1.0 and HPL 2.0
This appendix describes briefly the differences in HPL 1.0 and HPL 2.0. The major difference is
in the enhancements to the language for the 9836A, the powerfail option and color video
interface. Additionally, a few statements were added and the known bugs were corrected.
You can boot HPL 2.0 on either the 9826 or the 9836 Computer. Programs created with HPL
1.0 will run on HPL 2.0.
Mass Storage Operations
The 9836A Computer has two 5V4 inch disc drives built-in. The right-hand drive is the default
drive; be sure to insert the system disc in the right-hand drive to boot the system. To specify
each drive within HPL mass storage operations, use these specifiers:
:10 Right-hand drive
:1,1 Left-hand drive
For example:
copy "ЕТО", "to", "alal"
copies the entire media from the right-hand drive to the left-hand drive.
Graphics Changes
Gload in HPL 2.0 is about 3 times faster than with HPL 1.0 (28 frames/sec on 9826). Gload
from odd-byte boundaries, however, does not change.
Bplt in HPL 2.0 is about twice as fast as with HPL 1.0.
The full National Character sets are supported in labeling.
HP 98627A Color Interface Support
All plotter statements that work with the internal graphics are supported on the color card:
bplt — now has two optional, additional strings as parameters. One string means black and
white. Three strings stand for red, green, blue. Three strings on the 9826 or 9836 internal
screen will OR the three values together before the bplt. For example:
brlt RE GFE ВФ 2
R$, G$, and B$ give data for red, green and blue color planes, respectively. If G$ and B$ are
not given, the bplt will be black and white.
09826-90040, rev: 1/82
C-2 Differences in HPL 1.0 and HPL 2.0
gclr — acts on the current plotter is (psc) device.
gdump — ORs the three planes and dumps to the specified device.
gload and gstore — allow one or three strings, as with bplt.
For example:
dim A$L3 2489601
psc 12 (if the color card is on select code 12)
gstore A$L11:AL21:;A$[3]
stores red data in A$[1], green data in A$[2] and blue data in A$[3].
gprt — puts a cursor on the color video monitor.
gon and goff — turns the video on and off.
pen# — the pen number can be a value from — 15 thru 15:
98627A Video Interface Pen Numbers
Color Store | Erase OR XOR
no-pen 0 0 8 —8
white 1 —1 9 —9
red 2 —2 10 — 10
yellow 3 — 3 11 —li
green 4 —4 12 —12
cyan 5 —5 13 —13
blue 6 —6 14 — 14
magenta 7 —7 15 —15
À program can run all graphics devices if — 9 is used for the XOR operation, — 1 is used for the
erase, Ú is used for no-pen and 1 is used for the white pen.
psc — The syntax is:
Ps c select code [ + TV]
The TV parameter configures the interface for:
U.S. STD, 512 x 390 pixels (default)
EURO STD, 512 x 390 pixels
U.S. TV, 512 x 474 pixels
EURO TV, 512 x 512 pixels
HI RES, 512 x 512 pixels
JVC monitors
Oy QT. N —
Differences in HPL 1.0 and HPL 2.0 C-3
Color Alpha
Precede these write interface operations with wti © » select code to control alpha on the
98627A Interface:
Select Alpha Print Position
wt1 1 + expression
rdi 1: variable
Register 1 is read/write, so you can determine where the next character will go, and/or change
‘the position. Upper-left screen is 0,0. Bits 15 thru 6 are Y position. Bits 5 thru 0 are the X
position.
All supported screens have 64 characters across, X value can be from 63 thru 0. The number of
lines (Y positions) depends on the number of scan lines. The number of lines allowed is:
int (height scan lines/12)
For example, 512 high has 42 lines.
Write Character tc Holding Register
Wti és expression
Register 4, bits 7 thru 0 is the character (write only); use in conjunction with wti 70.
Set Up Color Interface
Wil 2: expression
Register 5 is write-only:
Bit Contents
7 1= no scroll; O =scroll (default)
6 don’t care
5 1 =reset; 0 =do ops specified by other bits
4 1= GON; 0 = GOFF
3 1 = update interface type; 0 =don’t update
2 0,7=notused 83=U.S. TV 6= JVC
1 | interface type | 1=U.S. STD 4 = EURO TV
0 2=EUROSTD 5=HIRES
Transfer Holding Register to Screen
Wwti 7 + expression
Transfers the character in the holding register to the color monitor. This is used in conjunction
with wti 4.
09826-90040, rev: 1/82
C-4 Differences in HPL 1.0 and HPL 2.0
You can do any standard output to the color video interface. The interface recognizes these
control characters: backspace, linefeed, vertical tab, and horizontal tab. For example:
cat 12
list #12
wrt 12, "HI"
Prtsc 123listk (color card is set at slect code 12)
Note
The 98627A usually uses two select codes. This can be avoided by
setting it to select code 6.
Powerfail Support
The powerfail protection defaults to 60 seconds at power-up. The glitch time (time delay before
a powerfail is recognized) is set to 60 ms. Power back time is set to Y second.
The stime statement (no parameters) transfers battery clock time into the internal clock. The
time March 1, 1900, is the same for all languages. Executing stime O sets the time to March 1,
1900.
The on pfail statement is modified with HPL 2.0:
on Pfail [line label [ +protection [ +glitch ]]]
Executing on pfail with no parameters turns off powerfail interrupts. Line label is the pointer to
the powerfail routine. Protection is the time to preserve the machine (maximum and default is
60 seconds). Glitch is the time to wait before issuing a powerfail interrupt (default is 100 ms).
Use the fret statement to return execution from the powerfail routine.
The power function returns the powerfail state:
1 = powerfail installed and operating.
0 = power failed.
—1 = power up but no powerfail hardware.
The pshutdown statement switches the computer off and on again (to re-boot the system).
The ptime function returns the amount of battery time used:
dsp Ptime (0) — displays the amount of battery time used.
dsp rtime (1) — displays the length of current powerfail.
09826-90040, rev: 1/82
Differences in HPL 1.0 and HPL 2.0 C-5
Display Control
The 9836A display has an 80-column line width. Display enhancements such as inverse video
and underlining can be controlled using the crt statement:
e rt value
The value specifies which enhancement(s) to set:
bit 0 - inverse video
bit 1 - blinking
bit 2 - underline
bit 3 - half bright
The machine function returns details of the host computer configuration:
|
bit (Osmachine)
hit (1 smachine)
hit (2smachine)
Lit (3.machine)
80-column alpha; 1 = 50-column alpha
400 x 300 graphics; 1 = 512 x 390 graphics
no highlights on CRT; 1 = highlights
keyboard present; 1 = no keyboard
I
I
0
0
0
0
Data Transfers
The tfr statement now works to select code O (dsp line) and to/from select code 16 (crt
print/scroller).
Error Trapping
emsg ("XX") returns the string “error XX message”.
emsd (ern srom) returns the string “error XX message”.
emsg (ern:rom:erl) returns the string “error XX in LLLL message”.
String Search
The find statement lists all lines containing a specified string expression to the printer is device:
find string expression [, line1 [ + line2]]
The search occurs from line1 thru line2.
On-event Changes
New parameters are added to the on key and on knob statements:
on Kev [line label [ » flag [ + rate [ + delay ]]]]
The rate parameter is the time between repeats when a key is held down. Range is Ú thru 2.55
seconds. Default is 0.08 sec.
09826-90040, rev: 1/82
C-6 Differences in HPL 1.0 and HPL 2.0
The delay parameter is the time before starting to auto-repeat keys. The range is 0.1 thru 2.56
seconds. The default is 0.7 sec.
on Knob [line label [ + rate |]
The rate parameter specifies the number of seconds between knob interrupts. The range is from
0.01 thru 2.56 seconds. The default is 0.01 sec.
For both on key and on knob, the defaults for rate and delay are in effect unless a program is
running which sets new rate and/or delay values. When a program is paused, the defaults are in
effect until after execution resumes and a key or knob is used.
Major HPL 1.0 Bugs Fixed in HPL 2.0
® Executing tabxy from edit screen destroyed the scroller.
® Scaling on psc 16 was inaccurate for small deltas.
® Interrupt and fast read/write HP-IB transfers could leave the HP-IB in a non-holdoff mode.
© key on edit screen could leave the insert cursor in the middle of screen.
e Continuing a null program could hang the machine.
e Loading a program larger than the available memory could hang the machine.
e File names could not use characters greater than ASCII 127.
e bred garbaged a word.
® rss, wsc, and wsm garbaged r5.
® pen; plt X, Y didn’t put a dot at X, Y on the internal CRT.
e int (100000000000) returned 99999999999.
e gptr was clipped by lim and hard-limited screen edges.
e gptr turned off existing graphics cursor on an error.
® Executing line-feed in the middle of the last scroller line (CRT) could collapse and wrap the
scoller memory.
® gptr was not turned off by reset and was forgotten when a reset was performed.
Human Interface Changes
Capslock of AO UA EN. (Bit 13 of keycodes is now Capslock bit and is used by asc function
for keycodes generated by rdb(0) and key.) (Note that the “cap” function still only works on
“a-27 and “A-2”.)
The cursor is non-advancing for diacriticals “~~ “fora eio u.
Katakana mode shift in/out on Katakana keyboard (Bit 12 of keycodes is now Katakana bit.)
(250 is pkbd shift to Katakana. 249 is shift to ASCII.)
Shift-backspace is 127, rubout.
There is a 10 deep recall stack now. Shift-recall/recall is like BASIC. (248 is pkbd value for
shift-recall.)
09826-90040, rev: 1/82
Differences in HPL 1.0 and HPL 2.0 C-7
Delete-line key puts line on the recall stack.
Error messages are enunciated in English.
Extra edit line on 9836.
Form feed (dec. 12) is recognized by the printer/scroller (select code 16).
Keyboard line is not cleared by a stopping program or by an ent or enp statement. (i.e. edit A$
is now available by pkbd A%ient A$).
80 character support on 9836 including scrolling of CRT highlights.
Errors automatically turn on alpha. (This will not happen if error is trapped by the on err
statement.)
09826-90040, rev: 1/82
C-8 Differences in HPL 1.0 and HPL 2.0
D-1
Appendix D
Alphabetical List of
HPL Extensions/Revisions
ac lr [number of pages]
Clears screen, allocates specified number of scrolling pages
adumr select code
Dumps alpha screen to printer
aoff
Alpha off
aon
Alpha on
belt string: % bytes per line [ sfunction]
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.
cvele
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.
gd ump select code
Dumps the graphics screen to a raster-scan standard printer.
goff
Turns the graphics display off.
dor
Turns the graphics display on.
9Ptr xcoord rycoord| stype]
Draws a graphics cursor at the specified location. (type: Ô = off)
D-2 HPL Extensions/Revisions
ÿ load string expression
Loads the graphics screen from the specified strina.
95 tore string expression
Store graphics screen to the specified string.
Kloff
Turns special function key labels off.
Klon
Turns special function key labels on.
Knob
Returns the accumulated knob count. CCR rotation is negative valued, CR rotation is
positive valued.
Kret
Returns to the program from an on-knob routine.
Kstat
Returns knob status: 5 = Control, 4 = Shift
mret
Returns to the program from an on-match routine.
msi [device format | controller select code [ unit number]]]
Sets the current system disc drive and format.
Drive formats: I=internal disc, M=8290x minifloppy, F=9885(9825), G=9885(LIF)
H=9895(9825), J=9895(LIF)
?
on cycle time [ +label]
Sets up clock periodic interrupt service routine. on cv cle with no label specified can-
cels clock-cycle interrupt service.
on delay time [ label]
Sets up clock delay interrupt service routine. on delay 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.
or match time :label]
Sets up clock match interrupt service routine. on match with no label cancels clock-
match interrupt service.
Pb eer [frequency [ +duration]]
Programmable beep with frequency (0-5167 Hz) and duration (0-2.56 seconds).
Pi
Returns value of pi.
PKEd [string]
Executes ASCII string (as if it were pushing keys).
HPL Extensions/Revisions
Prtsc select code [ +width]
Sets system printer select code (and width)
rcb [file number]
Records the binary program in memory to the specified tape file.
rds {buffer namel : type [ + empty | + fill [ + dim ]]]} )—=status
Extended buffer status function.
re ad variable name [ svariable name]
Reads data statement constants into variables.
rk bd select code [ +type]
Enables remote keyboard: type 1 = ASCII, type 0 = 9826A
rs tr [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 memory to the specified file.
s f K key number [ +definition string [ :label string]]
Defines SFK (0 to 32) and optional soft label.
s q 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 +yrow
Moves print position to column x (0.49), row y (0...17).
wtc buffer name [ +typel 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-3
D-4 HPL Extensions/Revisions
Subject Index 1-1
Subject Index
Aclr - alphaclear .................. 4-3.1
Adump - alphadump ................ 4-4
Alpha ...................... 4-3.1, 4-3.2
Alpha clear ....................... 4-3.1
Alphamode ........................ 2-4
Alphaoff ........................ 4-3.2
Alpha on .............. 2... ... 4-3.2
Alpha text, color ................ 6-7, 6-8
Animation ................ 4-43, 6-1, 6-3
Aon-alphaon.................... 4-3.2
Arithmetic ........................ 2-16
Arrayoutput .............. LL 4-13
ASCllcodes ............... A-3, B-2, B-3
ASCI filetype ................ 4-20, 4-21
ASCI LIF files ..................... A-3
Asgn-assign ...................... 4-16
Autostart .........._...emeeeereceos 2-1
Back panel ........................ 1-4
Backup ..................... 1-15, 4-22
Battery backup ........ a. 4-34, 5-1
Battery clock ..............—.... 4-34, 5-1
BCD interface ..................... 4-28
Beep, programmable ................ 4-3
Binary datafiles .................... A-6
BINARY filetype ................... 4-24
Binary graphics ................ 4-41, 6-3
Binary plot ................... 4-41, 6-3
Binary programs ............... 4-8, 4-24
Blinking ......................... 4-3.1
Boot system ...................... 4-13
Bplot - binary plot ......... 4-42, 6-3, C-1
Bufferempty ...................... 4-37
Buffer full ........................ 4-37
Buffer pointer ..................... 4-37
Buffer status ...................... 4-37
Bufferstorage ..................... 4-38
Buffertypes ................... 4-38
Cables, power ...................... 1-4
Cartridge tape ...................... 4-6
Cat (seeftlistalso) .................. 4-20
Catalog (see tlistalso) .............. 4-20
Cleaning disc drive ................. 1-11
Clock, internal ............ 4-34 5-1, 5-3
Clock, powerfail ................ 5-1, 5-3
Color video interface ....... 4-39, Chap. 6
Colors ................... 4-40, 6-2, 6-7
Compatibility, datafile .............. 1-14
Computer installation ................ 1-3
Computer maintenance ............. 1-11
Contents ............. iii. iii
Controlcodes ...................... B-2
Copy 122000000000 0 00e 1-16, 4-22
Copyingdiscs ..................... 1-15
Cords, power ...................... 1-4
Cret-cyclereturn ................. 4-35
Crossreference ..................... 4-5
Crtalpha ................... 4-3.1, 4-3.2
Crtdisplay ..................... 2-3, 4-3
Crtgraphics....................... 4-39
Crt organization .................... 2-3
Critprinter ......................... 4-5
Crtread ............... e. aa aa ee 4-4
Cursor, graphics ..............—ee—... 4-41
Data file compatibility .............. 1-14
Data statement ..................... 4-2
Datatransfer ....................... 3-3
Defaultstk ........................ 2-14
Definestk ........................ 4-12
Deleting files ...................... 4-21
Diagnostics ....................... 1-17
Differences, HPL 1.0/2.0 ............ C-1
Digitize . .......................... 4-39
Directory size ..................... 4-17
Disc drive cleaning ................. 1-11
Discformat ................... 4-14, A-1
Dischandling ..................... 1-12
Disc initialization ................... 4-17
Discinsertion ..................... 1-13
I-2 Subject Index
Disc read statement ................ 4-24
Disc type function... 4-19
Disc write statement ................ 4-24
Discs ........................ 1-12, A-1
Display (see crt) .......................
Display organization ................. 2-3
DMA - direct memory access .... 4-28, A-8
Dred - disc read ................... 4-24
Dret - delay return ................. 4-36
Drive ............ a La aan 4-17
Dtype - disc type .................. 4-19
Dump alpha ....................... 4-4
Dump graphics ................ 4-41, 6-1
Dwrt -discwrite ................... 4-24
Editmode ......................... 2-7
Empty buffer ...................... 4-37
Error messages ............. aan A-8
Errors ...................... Back Cover
Extended control sfk ............... 2-13
FCC Radio Interference Statement ..... 1-7
Filebackup .................. 1-15, 4-22
Filecopy ......................... 4-23
File open statement ................ 4-21
Filepointers ....................... А-7
File protection ..................... 1-13
Filetypes ......................... 4-20
Find ......................... 2-14, 4-5
Flags ....... aaa 4-5
Flexiblediscs ...................... 1-12
Floppydiscs ...................... 1-12
Fret-failreturn..................... 5-2
Fullbuffer ........................ 4-37
Fuses ............................. 1-4
Gclr - graphics clear ............ 4-40, 6-1
Gdump - graphics dump ........ 4-41, 6-1
Gload - graphics load ........... 4-43,6-1
Goff - graphics off .............. 4-40, 6-1
Gon - graphics on ............—.. 4-40, 6-1
GPIO interface .................... 4-28
Graphics .......... 4-39, 6-1
Graphics clear ................. 4-40, 6-1
Graphics mode ............ 2-4, 4-40, 6-1
Graphics off ............. 000 4-40
Graphics on ...................... 4-40
Graphics, binary ............... 4-41, 6-3
Gstore - graphics store .......... 4-43, 6-1
Half-bright ....................... 4-3.1
HP Sales Offices ................... Back
HP-IB disc interface ................. A-8
HP-IB interface ............... 1-10, 4-29
HPGL plotters ............... 4-39, 4-40
HPL 1.0 vs. HPL 2.0 ................ C-1
HPL extensions .................... D-1
HPLsyntax ........................ D-1
VO .......... 2... квеикинеаеиео, 4-26
backup - file backup ............... 1-15
Immediate continue sfk ............. 2-12
Immediate execute sfk .............. 2-12
Init - initialize .......... 4-17
initialize disc ...................... 4-17
Input/Output ...................... 4-26
Interface installation ................ 1-10
Interface, HP-IB .......... 1-10, 4-29, A-8
Interfaces. ........................ 4-26
Interleave ........................ 4-17
Internal clock ................. 4-34, 5-1
Interrupts ..................... 4-35, 5-2
Inversevideo ..................... 4-3.1
Keybuffer ........................ 4-10
Keylabels ............... 2-10, 2-14, 4-4
Keyboard .......................... 2-5
Keycodes ......................... B-3
Keys... 2-5
Keys, character entry ................ 2-5
Keys, editing ....................... 2-6
Keys, numeric ...................... 2-6
Keys, program control .............. 2-15
Keys, special function ..... 2-10, 4-4, 4-12
Keys, system control ................ 2-9
Killall statement ................... 4-21
Knob ....... 20000000000 4-9
Knob status - kstat ................. 4-10
Labels, international characters ....... C-1
Labels, key .............. 2-10, 4-4, 4-12
LIF AIRE 1-15, A-1
LIFASCIlfiles ..................... A-5
Line fuses .................... .... 1-4
Linetype-line .................... 4-39
Line voltage ....................... 1-3
Load graphics ................ 1-15, 4-43
Logical Interchange Format - LIF ...... A-1
Machine ....................... 2-1, 4-3
Mainframe diagnostics .............. 1-28
Maintenance ...................... 1-11
Mass storage is - mSi................ 4-16
Mass storage unit specifier ........... 4-14
Math functions ..................... 4-5
Memory installation ................. 1-8
Mode, alpha .................. 2-4, 4-3.2
Mode, graphics ............ 2-4, 4-40, 6-1
Monitors ................. 4-39, 6-6, C-2
Mret - match return .............. 4-36
Mrk (see init)
Msi - mass storageis................ 4-16
Msus ...... о 4-14
Multi-statement sfk ................. 2-13
NBDATA filetype .................. 4-21
NULL filetype ................ 4-20, 4-21
On cycle ...........o. 00000000. 4-35
On delay .............e r.ee0eeeeoo 4-36
Onend .......... 22200000000 A-5
On knob ........... 211424 4-9
Subject Index 1-3
On match ........................ 4-36
On pfail - on powerfail ............... 5-2
Oni-oninterrupt .................. 4-35
Open statement ................... 4-21
Operations, arithmetic .............. 2-16
Output/Input ......... ee 4-26
P-variables .............—eo0emececo. 4-5
Pbeep - programmable beep .......... 4-3
Pen number ...................... 4-40
Pen ............. e. neco.. 4-40, 6-2
Pi 2.2 ко. кн ккввл ку в квн ен кво ннкне о 4-5
Pkbd - press keyboard .............. 4-11
Plotters ............. o e..aro. 4-39, 6-1
Power cords ....................... 1-4
Power function ..................... 5-2
Powerfail .....................e.... 5-1
Press keyboard - pkbd .............. 4-11
Printing date ..................e0..... ii
Printing history ....................... ii
Program transfer .................... 3-2
PROGRM filetype . ................. 4-20
Psc - plotter select code ......... 4-39, 6-1
Pshutdown - power shutdown ......... 5-3
Ptime - powertime .................. 5-3
RAM - random access memory ........ 1-1
RAM installation .................... 1-8
Reb -record binary .................. 4-8
Readclock.................... 4-34, 5-3
Readcrt..............ereccorerec.s 4-4
Read statement - red ............ 4-4, 4-8
Read, data, restore . ................. 4-2
Record binary ...................... 4-8
Remote keyboard .................. 4-11
Restore statement ................... 4-2
Rkbd - remote keyboard ............ 4-11
ROM - read only memory ............ 1-1
RS-232 interface ............. re... 4-31
1-4 Subject Index
Savebinary ....................... 4-24 Value function -val ................. 4-8
SBDATA filetype .................. 4-21
Screen (see crt)
Screen organization ................. 2-3 |
Scrolling buffer ................... 4-3.1 W
Search (find) ....................... 4-5
Secure ........... aa 4-20 Write protect ...................... 1-13
Serial interface .................... 4-31
Setclock ..................... 4-34 5-1
Settime ..................... . 4-34 5-1
Stk oo веке еее веие 2-11 X
Stk - define special function key ...... 412 Xref - cross reference ................ 4-5
Sixteen-bit parallel interface ......... 4-28
Special function key definition ....... 4-12
Special function keys ............... 2-10
Sqr function ....................... 4-5
Square root function ..... PAS 4-5
Status, buffer ..................... 4-37
Status, knob ...................... 4-10
Store graphics ..................... 4-43
String function - str$................. 4-8
Stringvariables ..................... 4-8
Strings ($) ........ LL 4-8
Supported discs ............... 4-14, A-1
Sysboot ............... LL. 4-13
Systemboot ...................... 4-13
System printer ...................... 4-5
System Tests ...................... 1-17
Systems programming ............... 4-9
Table of Contents ..... SE ii
Tabxy ........ ener ado. 4-4
Tape cartridge... 4-6
TDATA filetype .................... 4-21
Text, colorvideo .................... 6-7
Timer 1220200000 4-34, 5-1
Transfers, I/O ................. 4-37, C-5
TV parameter ............. 4-39 6-6, C-2
Type function ...................... А-5
Underlining ...................... 4-3.1
Unpacking ......................... 1-2
9826A HPL Error Messages
There are some new error messages specific to the 9826 and 9836. These are the ‘X’’, f’, and
“PY” 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.
17
Xi 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
fü 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.
f2 Invalid msus syntax. Probable illegal device/format specifier.
#3 Directory entry field overflow. Attempted file copy not possible.
fd Illegal structure on LIF format disc. The disc cannot be repacked.
#5 Disc copy attempted to a significantly larger disc. Use file copy to back up
contents of disc. |
#6 Disc copy attempted from 9825-compatible disc to LIF disc, or vice-versa.
Only file copy is allowed across media formats.
f7 System record is not valid for LIF disc.
f8 System record is not valid for 9825-compatible disc.
fs Statement not implemented on 9826 or 9836. (See Disc Programming Tech-
nical Appendix for a list of disc statements that are not implemented.)
Plotter Programming Errors
РЭ No graphics hardware present. If you have a 9826 or 9836, and Fsc 16 has
been executed, you should not experience this error. Consult your HP field
sales and service office for advice.
LD Paciano
Part No. 09826-90040 Printed in U.S.A.
Microfiche No. 09826-99040 Third Edition, January 1982
">
Download
Advertisement
Key features
HPL 2.0 Programming Language
Flexible Disc Storage
Interface Card Options
Built-in CRT Display
Read/Write Memory Expansion
System Test Diagnostics
Frequently asked questions
Remove the disc, ensure it is a system disc, re-insert it, and close the drive door. Then press SHIFT PAUSE. If it still fails, the disc may be defective or the computer needs service.
Use an HP head-cleaning kit (HP accessory number 92193A). Follow the instructions on page 1-11 of the manual.
Cover the write-enable notch on the disc jacket with a label.
The standard HP mass storage format is called LIF (Logical Interchange Format).