Hewlett-Packard Computer Systems Family Manual
PDF
Dokument
Reklama
Reklama
CUSTOMERS
VENDORS
N
%
INVENTORY
CONTROL
AEGUIAMENTS
ELANNING
MATERIAL
HP Computer Museum
www.hpmuseum.net
For research and education purposes only.
Volume V
Issue 5
EDITOR'S DESK
BIT BUCKET
BULLETINS
HEWLETT-PACKARD
COMPUTER SYSTEMS
COMMUNICATOR/1000
SD
Departments
3
4
6
12
18
21
25
28
32
36
40
51
57
59
72
74
78
86
ABOUT THIS ISSUE
BECOME A PUBLISHED AUTHOR IN THE
COMMUNICATOR/1000...
LETTERS TO THE EDITOR
WHO'S LOGGED ON
WHO AM 1?
HOW LONG HAVE | BEEN HERE?
EXECUTING A PROCEDURE AFTER LOGOFF
FAST FORTRAN — AN UPDATE
ACCESSING PHYSICAL MEMORY
MORE NOTES ON THE USE OF
UNDECLARED MEMORY
SHORT FORMATTED IO FOR LU'S IN PASCAL/1000
PASCAL ERROR TRAPPING AND REPORTING
MVDIR — THE CASE OF THE MOVING DIRECTORY
HOW TO BUILD SYSTEM UTILITIES USING A
DISC DIRECTORY AND EDIT/1000 SUBSYSTEM
RESTART SPOOLED PRINTING
SET UP YOUR 2608 LINE PRINTER
1351A GRAPHICS GENERATOR WITH A 21MXM
COMPUTER IN RTE-IVB
JOIN AN HP 1000 USER GROUP!
3/4
EDITOR'S DESK
ABOUT THIS ISSUE
Vol. 5, Issue 5 is a departure from our normal format of centering around feature articles. Due to a lack of feature-length articles,
but a building catalog of bit bucket contributions, we decided to print an “all Bit-Bucket” issue. The tips included are rather
wide-ranging in subjects. | hope most of you can find something useful in at least one of these areas.
And for those of you who are not happy with this format, don't complain! Take some action and write a feature for a future issue.
Thanks for your support.
Best Regards,
Ms. Editor
EDITOR'S DESK
BECOME A PUBLISHED AUTHOR IN THE COMMUNICATOR/1000...
The COMMUNICATOR is a technical publication designed for HP 1000 computer users. Through technical articles, the direct
answering of customers’ technical questions, cataloging of contributed user programs, and publication of new product
announcements and product training schedules, the COMMUNICATOR strives to help each reader utililize their HP 1000's
more effectively.
The Feature Articles are clearly the most important part of the COMMUNICATOR. Feature Articles are intended to promote a
significant cross-fertilization of ideas, to provide in-depth technica! descriptions of application programs that could be useful to
a wide range of users, and to increase user understanding of the most sophisticated capabilities designed into HP software.
You might think of the COMMUNICATOR as a publication which can extend your awareness of HP 1000's to include that of
thousands of users worldwide as well as that of many HP engineers in Data Systems factories at Cupertino, California and
Grenoble, France.
To accomplish these goals, editors of the COMMUNICATOR actively seek technical articles from HP 1000 customers, HP
Systems Engineers in the Field, and Marketing and R&D Engineers in the factories. Technical articles from customers are most
highly valued because it is customers who are closest to real-world applications.
WIN AN HP-32E CALCULATOR!
Authoring a published article provides a uniquely satisfying and visible feeling of accomplishment. To provide a more tangible
benefit, however, HP gives away three free HP-32E hand-held calculators to Feature Article authors in each
COMMUNICATOR/1000 issue! Authors are divided into three categories. A calculator is awarded to the author of the best
Feature Article in each of the author categories. The three author categories are:
1. HP 1000 Customers;
2. HP field employees;
3. HP division employees.
Each author category is judged separately. A calculator prize will be awarded even if there is only one entry in an author
category.
Feature Articles are judged on the following bases: (1) quality of technical content; (2) level of interest to a wide spectrum of
COMMUNICATOR/1000 readers; (3) thoroughness with which subject is covered; and, (4) clarity of presentation.
What is a Feature Article? A Feature Article meets the following criteria:
1. Its topic is of general technical interest to COMMUNICATOR/1000 readers;
2. The topic falls into one of the following categories —
OPERATING SYSTEMS
DATA COMMUNICATIONS
INSTRUMENTATION
COMPUTATION
OPERATIONS MANAGEMENT
LANGUAGES
EDITOR'S DESK
3. The article covers at least two pages of the COMMUNICATOR/1000, exclusive of listings and illustrations (i.e., at least 1650
words).
There is a little fine print with regard to eligibility for receiving a calculator; it follows. No individual author will be awarded more
than one calculator in a calendar year. In the case of multiple authors, the calculator will be awarded to the first listed author of
the winning article. An article which is part of a series will compete on its own merits with other articles in the issue. The total of
all articles in the series will not compete against the total of all articles in another series.
All winners of calculators will be announced in the issue of the COMMUNICATOR/1000 in which their articies appear. Again, all
Feature Articles are judged by an impartial panel of three DSD Technical Marketing Engineers.
A SPECIAL DEAL IN THE OEM CORNER
When an HP 1000 OEM writes a Feature Article that is not only technically detailed and insightful but also application-oriented
as opposed to theoretical, then that OEM may ask that the article be included in THE OEM CORNER. A Feature Article included
in THE OEM CORNER may contain up to 150 words of pure product description as well as a picture or illustration of the OEM'S
product or its unique contribution. HP's objective is twofold: (1) to promote awareness of the capabilities HP 1000 OEMs’
products among all HP 1000 users; and, (2) to publish an article of technical interest and depth.
IF YOU'RE PRESSED FOR TIME...
If you are short of time, but still have that urge to express yourself technically, don't forget the COMMUNICATOR/1000 BIT
BUCKET. It's the perfect place for a short description of a routine you've written or an insight you've had.
THE MECHANICS OF SUBMITTING AN ARTICLE
If at all possible please submit an RTE File containing the text of your article recorded on a Minicartridge (preferrably) or on a
paper tape along with the line printer or typed copy of your article. This will help all of us to be more efficient. The Minicartridge
will be returned to you promptly. Please include your address and phone number along with your article.
All articles are subject to editorship and minor revisions. The author will be contacted if there is any question of changing the
information content. Articles requiring a major revision will be returned to the author with an explanatory note and suggestions
for change. We hope not to return any articles at all; if we do, we would like to work closely with the author to improve the article.
HP does, however, reserve the right to reject articles that are not technical or that are not of general interest to
COMMUNICATOR/1000 readers.
Please submit your COMMUNICATOR/1000 article to the following address:
Editor, COMMUNICATOR/1000
Data Systems Division
Hewlett-Packard Company
11000 Wolfe Road
Cupertino, California 95014
USA
The Editor looks forward to an exciting year of articles in the COMMUNICATOR/1000.
With best regards,
The Editor
EDITOR'S DESK
LETTERS TO THE EDITOR
Dear Ms. Editor:
John Pezzano's article “Using Memory behind your FORTRAN Program” (Vol. 5, Issue 2) gave me the idea of trying a solution
on my own.
My proposition is to place the extendable memory at the end of the program during the loading process. This can be done as
shown in the LOADR-Comand-File. The supported routine LIMEM returns the available memory in LEN, which can be added to
the dimension of your variable.
Variations of this procedure could be applied to load any type of program, even segmented programs.
Yours truly,
Ernst Stelzer
AG GRELL
Max-Planck-Institut fur Biophysik
Heinrich-Hoffmann-StraBe Nr. 7
D-6000 Frankfurt am Main 71
West - Germany (BRD)
Dear Mr. Stelzer,
Thanks for your input. For a related bit bucket article, see the contribution from George Wynne of the U.S. Naval Ordnance
Station.
Regards,
Ms. Editor
aPROG T=00004 IS ON CR00031 USING 00003 BLKS R=0000
0001 FTN4X,L
0002 PROGRAM PROG()
0003 COMMON /MEM/ MEMC10)
0004 INTEGER FWAM
000S LU = LOGLUCI)
0006 CALL LIMENCO,FWAM,LEN)
0007 WRITECLU,5010) LU, FWAM, LEN
0008 DO 10 I = 1, LEN + 10
0009 MEM(I) = 32767 - I
0010 10 CONTINUE
0011 DO 20 I = LEN + 10, 1, -5
0012 WRITECLU,5030) I, (MEM(I+J), J = 0, 9)
0013 20 CONTINUE
0014 5010 FORMATC"LU"IZ" FWAM®“I7* LEN"]7)
0015 5030 FORMATCSCIS,2X))
0016 END
EDITOR’S DESK
&PROGD T=00004 IS ON CROO0002 USING 00002 BLKS R=0000
0001
0002
0003
0004
/PROG T=00004 IS ON CRO0031 USING 00002 BLKS R=0000
0001
0002
0003
0004
0005
What
FTN4X,
SZ2,22
REL, XP
SEARCH
REL, XP
/E
to do 1
L
BLOCK DATA
COMMON /MEM/ MEMC10)
END
ROG
ROGD
Compile each element
RUN,LOADR, /PROGD
RUN, PR
0G
See what happens !
PROG
LOGLU
EIO.
FMTIO
. FMCV
. TOER
. UFMP
EXIT
PNAME
» TOCL
. 1OCM
.FIOI
L IMEM
КЕТО
ЕКО. Е
. OPN?
PAU.E
MEM
26042
26234
26312
27527
30761
33224
33340
33353
33427
33475
33577
33643
33731
33752
34077
34100
34124
34125
26233
26311
27526
30760
33223
33337
33352
33426
33474
33576
33642
33730
33751
34076
34077
34123
34124
34136
S PAGES RELOCATED
LINKS:
BP
/LOADR : PROG
/LOADR: SEND
PROGRAM: BG
92067-1X297
24998-1X329
24998-1X328
24998-1X333
24998-1X321
24998-1X296
24998-1X320
92068-1X035
24998-1X305
24998-1X327
24998-1X322
92067-1X477
92067-1X275
24998-1X249
24998-1X325
24998-1X254
22 PAGES REG’D
LOAD: TE
REV.
REV.
REV
REV
REV
2013
2101
.2101
.2101
REV.
REV.
REV.
REV.
REV.
REV.
REV.
REV.
REV.
2101
2101
2101
2013
2101
2101
2126
2013
2013
.2001
REV.
REV.
2101
2001
READY AT 9:55 AM HWED.,
790228
800929
800929
800709
800731
800731
800731
771121
800731
801007
810326
790126
790316
750701
800803
750701
NO PAGES EMA
COMMON : NC
14 0OCT.,
NO PAGES MSEG
1981
EDITOR'S DESK
Dear Ms. Editor:
| read with interest the article by the group in Pisa in Volume 5, Issue 3 regarding user written I/O routines for HP 1000
computers. We have been using similar techniques at Stanford for many years and have found them to be most useful. There
are a class of devices which operate asynchronously on a demand-response basis for which this technique can be slightly
modified and used in a multiprogramming environment. Instead of disabling the operating system (by a call to $LIBR) for the
duration of the entire transaction, we do so only long enough to exchange some unit of information such as a byte or line.
Careful programming is necessary to assure that no interrupts will occur when the operating system is re-enabled. Under such
circumstances, it is possible to overlap 1/0 from/to a specialized device with system I/O to/from discs, etc. This allows the user
to take advantage of system facilities such as the file manager, as well as providing protection of the other system resources. If
real-time requirements are not stringent, multi-user operation of the system also is still possible.
An example application of this technique is the the optimum usage of the Versatec printer/plotter which we use extensively in
several of our systems. When operated with a driver, the Versatec operates at approximately one-half speed while plotting due
to the system overhead entailed in processing interrupts. We discovered that by turning off RTE via a call to $LIBR and
outputting directly to the printer/plotter, we could operate it at close to full speed. If one is careful to make sure that no interrupts
are left pending at the time $LIBX is called to complete a unit of input/output processing, then the device can be operated in a
full system context.
We have also used this technique to operate real-time devices such as a Summagraphics digitizing tablet and a DeAnza image
array processor. These devices preclude multiprogramming but full operating system resources are used, which simplified the
programming task necessary to interface these special devices.
The principal discovery which | would like to report is a way to greatly decrease the overhead incurred when using this
technique. The call from a user program to $LIBR requires the system to process a memory protect interrupt with the associated
overhead. The call to $LIBR results in several changes in system status including the disabling of interrupts and memory
protect which in turn allows input/output instructions to be executed by the user's program. If it were possible to execute
input/output instructions in the user program without calling $LIBR, then direct input/output could be accomplished with
absolutely no overhead.
In this regard, the 12892B Memory Protect Module Installation and Service manual makes extremely interesting reading. There
is a jumper labelled “SEL 1” which is normally absent from the board. In this condition, input/output instructions are only allowed
to select code 1 when memory protect is enabled. By inserting a jumper in this position, input/output instructions to all select
codes are allowed, even when memory protect is enabled. The net result of installing this jumper is the possibility to do
input/output from a user program without drivers and without the overhead of calling $LIBR.
Certain caveats need to be observed unless the interrupt system is explicitly disabled (which is perfectly feasible using a CLF O
command). It will be necessary to prevent interrupts for some input/output interfaces. This is possible by never issuing an STC
command. Sometimes it is necessary to use an STC to strobe data to or from the interface board (e.g., the microcircuit interface
board). If the STC is immediately followed by a CLC command no interrupt will be generated because the hardware prevents an
interrupt immediately following the STC command. In reading data from the 12966 board, it is necessary to check for the flag
being set with control also set. In this circumstance, | programmed a short loop which turned off the entire interrupt system for a
few microseconds each time this test was performed.
10
EDITOR'S DESK
The uses of this technique are only limited by the programmers imagination. We have used it on several systems with quite
different applications over a period of two years with absolutely no problems. | hope that it will be useful to some of your
readers.
Sincerely,
William Sanders
Cardiology Division
Stanford University Medical Center
P.S. | also have a simple hardware modification that can be performed to a board in the 2100 computer that accomplished the
same result. | will be happy to communicate it to any intrested readers.
Dear Mr. Sanders,
Thank you for the additional information.
Regards,
Ms. Editor
11
EDITOR'S DESK
Dear Ms. Editor:
The following is a solution to a problem concerning use of 2 or more HP 2240A Measurement and Control Processors on the
same HP-IB interface card using DVR37 W/SRQ.
Program to initialize one of the 2240's to its power on state would intermittently hang up on the call to SRQ (dummy interrupt
handler).
The hung up program could be simulated by:
1. Turn power OFF on 2240 not to be initialized.
2. Turn power ON on 2240 not to be initialized.
3. Run Program (ABORX)
The solution to this problem seems to be provided mostly by HP SE Todd Field as follows:
1. Initialize HP-1B 2240 LUs as follows:
:CN,LU,157000B
2. Set up dummy interrupt handler program that does nothing but has an ID segment.
3. Run following initialization program (see attachment for listing).
The key to the solution seems to be the call to (STATS) which is part of the HP-1B library. This subroutine is mentioned in passing
but not documented in the 2240 User's Manual (P/N 2240-93001 Dec 1979).
Very truly yours,
Lewis J. Metzger
Abex Corporation
Mahwah, New Jersey
12
EDITOR'S DESK
LISTING OF 2240 POWER ON INITIALIZATION PROGRAM Сотри!е!
Museu Я!
FTN4X,L
PROGRAM ABORX
INTEGER HPIB,MACS1 ,MACS2,INTPG
DATA INTPG/S,’INTPG “/
C
CALL ABRT(HPIB,2) "ABORT ALL ACTIVITY ON THIS HP-IB
C
CALL CLEARCMACS1,1) 'TERMINATE ANY PENDING
CALL CLEAR(MACS2,1) IREQUEST ON EACH 2240
C
CALL STATSCMACS1,ISTAT) SERIAL POLL EACH 2240
CALL STATS(MACS2,ISTAT) 'FOR INTERRUPT
C
CALL SRACMACS1,16, INTPG) ISET UP DUMMY
CALL SRACMACS?,16,INTPG) !INTERRUPT HANDLER PROGRAM
END
Dear Mr. Metzger,
Thank you for your solution and thanks to HP System Engineer Todd Field, Woodbury, New York.
Sincerely,
Ms. Editor
13
BIT BUCKET
WHO'S LOGGED ON?
by Dan Wagner/E. |. Dupont,
New Cumberland, PA
Listed below is a FORTRAN utility used to determine who is logged on to the system in a Session environment. The information
that is reported is retrieved from the system accounts file (+ @CCT!). The program will default to the local node number, but it
can also list the users logged on to a remote node using DS/1000-1V.
Compile using FTN4X:
FTN4X,&WH0,1 ,xWHO
Loader command must include SSGA:
LOADR, ,2WHO, ,,S5
Programmer: Dan Wagner
E. 1. Dupont
Berg Electronics Div.
515 Fishing Creek Road
New Cumberland, Pa. 17070
FTN4X
PROGRAM WHO (),Who is logged on the system.
SEE EE CE EEE EEEE SS SEEE CS EEECSS EEE EEE EES TENNESSEE RENEE SSCS EEEEESEREESS Ex)
С
С С
C WW WW HH HH 000000000000 С
C WW WW HH HH 000000000000 С
C WW WW HH HH 00 00 С
C WW WW HH HH 00 00 С
C WW WW HH HH 00 00 С
C WW WW HHHHHHHHHHHH 00 00 С
C WW WW WW HHHHHHHHHHHH 00 00 С
C WW WWWW WW HH HH 00 00 С
C WW WW WW WW HH HH 00 00 С
C WWW WWWW HH HH 00 00 С
C WWW WWW HH HH 000000000000 С
C WW WW HH HH 000000000000 С
С С
CzszzszszssszzzsEE TEESE AEE EE EER CEE EAT EE CESSES ESESEEEEEcssExs=zassxzxssxxxxz=x(
С С
C REVISION LIST: С
С С
C --DATE-- --BY-- -- DESCRIPTION -- С
С С
C 10/14/81 D.A.W. -ORIGINAL VERSION- С
С 11/26/81 D.A.W. -ADD REMOTE CAPABILITY USING DS5/1000-1V С
С С
CE==zszsrrzsssrrEs srr EEEEE ECE EE EE rE EE EES rEESEEEZSESCEEEEEENCEEEZxssszzzxxszsx(
14
BIT BUCKET
This program will display a brief report of the users
logged on the system. This is done by accessing the system
accounts file C+@CCT!). The program will default to a local
DS/1000 node, but will also report the users on a remote node.
The syntax for executing the program is as follows:
¿WHO [ ,LILU [ ,NODE 11
where:
LILU - List LU which defaults to 1.
NODE - DS/1000 node # which defaults
to -1 (local node).
The program has a few items in the code which each
user might want to customize for their particular system.
1). Line 74 : ICRC1) /2/ - This is the CRN where
the system accounts file C+@CCT!)
resides.
2). Lines 82 & 83 : These are the valid node numbers
in the network.
The format of the output is as follows:
SESSION USER LOG-ON TIME
50 USER. GROUP 12:31:12 PM 5 OCT
ооо С
06000060 0O0
С
IMPLICIT INTEGER (A-2)
C
INTEGER+4 LOGON
C
REAL MONTH
C
DIMENSION IDCBC144),INAMC3),IBUFC128),IDIR(128)
DIMENSION UNAM(S) ,GNAM(S) , XLOG(2),ICR(C2),IPARM(S)
DIMENSION IQUTIC6), IQUT20 16), IQUTC28),IERBFC24)
C
EQUIVALENCE CXLOGC1),LOGON),CIPARMC1),ILU)
EQUIVALENCE CIPARMC2),INODE)
C
DATA ICRC1) /2/, ICRC@) /-1/
DATA ISC /-31178/, INAM /6H+@CCT!/, SPACE /2H /
DATA AM /2HAM/, PM /2HPM/
C
CALL RMPAR CIPARM)
C
С === CHECK FOR VALID NODE FOR DS/1000
15
BIT BUCKET
IF CINODE .EQG. 1) ICRC2) = 1
IF CINODE .EQ. 2) ICRC2) = 2
С
С === Open the accounts file.
С
CALL DOPEN (IDCB,IERR,INAM,1,ISC,ICR)
IF CIERR .LT. 0) GO TO 90
Read the account file header.
O00
и
и
и
CALL DREAD (IDCB,IERR,IBUF,128,LEN,1)
IF CIERR .LT. 0) GO TO 90
с === Get beginning and end of active session table.
° BACT = IBUF(1)
EACT = IBUF(2)
с === Get directory location.
° DREC = IBUF(5)
с === Write out heading.
C
WRITE (ILU,S)
5 FORMAT (¢//,"SESSION",4X,"USER",20X,"LOG-0ON TIME", ,/ ,7*"-",4X,20m-1
+ 4X,22"-")
С
С = Read 128 words of active session table.
C === Each session uses 4 words.
С
10 CALL DREAD CIDCB,IERR,IBUF ,128,LEN,BACT)
IF CIERR .LT. 0) GO TO 90
С
C === There are 32, 4-word entries in each 128 word buffer.
C
DO 60 I=1, 32
С
C === Step through the buffer 4 words at a time.
C
IPTR = CI-1)+#4 + 1
С
С === Word 1 of each 4-word entry is the session LU or 0 if free.
С
IF CIBUFCIPTR) .EQG. 0) GO TO 60
C
SESLU = IBUFCIPTR)
C
C === XLOG is the account logon time packed into two integer words.
C The packing is explained later in this program.
C
XLOGC1) = IBUFCIPTR+1)
XLOGC2) = IBUFCIPTR+2)
ILOC is the record pointer for the user account file directory.
OO
H
H
и
ILOC = IBUFCIPTR+3) + 1
XREC = DREC
16
BIT BUCKET
о ООО С
O00 OO wooo
000
C = 5 =
50
о ОсОО О О О О С
There are 8, 16-word entries per 128-word record.
ILOC is decremented by 8 and XREC is incremented by 1
until ILOC is less than or equal to 8. XREC is then
pointing to the proper record 4 ILOC is pointing to the
proper entry in that record.
IF CILOC .LE. 8) GO TO 30
XREC = XREC + 1
ILOC = ILOC - 8
GO TO 20
Read the record which contains the user account file directory.
CALL DREAD CIDCB,IERR,IDIR,128,LEN, XREC)
IF CIERR .LT. 0) GO TO 90
IPTR points to the specific 16-word entry in the 128-word buffer.
IPTR = CILOC-1)+16 + 1
Get the number of characters in the user name.
ULEN = CIDIRCIPTR) .AND. 177400B) / 256
Retrieve the user name and group name.
DO 40 J=1, 5
UNAMCJ) = IDIRCIPTR+J)
GNAM( J) = IDIR(CIPTR+J+5)
CONTINUE
Convert SESLU to ascii and store in IOUT1.
ENCODE (11,50,I0UT1) SESLU
FORMAT CI4," >)
Unpack XLOG into year, julian day of the year,
hours, minutes, and seconds.
XLOG is packed as follows:
(YEAR -
1978) MINUTES SECONDS
р
XLOGC 1) EN NEN
! в an TT
JULIAN DAY OF YEAR HOURS
' ' '
XLOG( 2) Ona an nr ON y ON BOP E MY UCI
Strip off year.
17
BIT BUCKET
© © ©
"
и
и
O00
и
и
"
© ©) ©
a
il
"
nooo
56
o
OOOUO
JYEAR = CCXLOGC1) .AND. 170000B) / 4096) + 1978
Strip off julian day of the year.
JDAY = CXLOGC2) .AND. 177740B) / 32
Convert year + julian day of year into year, month, date.
CALL JDATE (JYEAR,JDAY,MONTH,DAY)
AMPM = AM
Strip off the hours in 24-hour format.
HOURS = (XLOG(2) .AND. 37B)
Convert to 12-hour format using A.M. and P.M,
IF (HOURS .LE. 12) GO TO 53
AMPM = PM
HOURS = HOURS - 12
Strip off seconds and minutes.
SEC = CXLOGC1) .AND. 77B)
MIN = CXLOGC1) .AND. 7700B) / 64
Manipulate all the information into one buffer CIOUT).
ENCODE (32,54,10UT2) GNAM,HOURS,MIN,SEC,AMPM, DAY , MONTH
FORMAT C*.",5A2,12,":",12,":",12," "A2," "12," 4,64)
CALL SMOVE ¢IOUT1,1,11,10UT,1)
CALL SMOVE CUNAM, 1 ,ULEN, IOUT, 12)
START = ULEN + 12
CALL SMOVE C€CIOUT2,1,11,IQUT,START)
START = START + 11
IF CSTART .GE. 36) GO TO 58
CALL SPUT CIQUT,START,SPACE)
START = START + |
GO TO 56
CALL SMOVE CIOUT2,12,32,10UT, 36)
Write the buffer.
CALL EXEC C2,ILU,IOUT, 28)
CONTINUE
Read the next 128 words of active session table.
BACT = BACT + 1
IF CBACT .LT. EACT) GO TO 10
18
BIT BUCKET
C
WRITE CILU,80)
80 FORMAT €" '')
GO TO 110
C
C === DISPLAY ERROR MESSAGE
C
90 CALL DSERR CIERBF)
WRITE CILU,100) IERBF
100 FORMAT C24A2)
C
C === Close account file.
C
110 CALL DCLOS CIDCB,IERR)
С
END
С
С
С
C===s==2==c==zs=z===cs==zszcs===z====cT=sss===zz======ss3===s===zzs==z=z=s===z=z=z(
С С
SUBROUTINE JUDATE (JYEAR,JDAY,MONTH,IDAY),Convert Julian to year, m
+onth, day.
C С
C==========zc==s==2=z=z=zs=s==xc==s=szs====zz====cz=s====zs===z=zz=s===z====z====z(
C
С
C === Change year + julian day of year to a year, month, day.
C
INTEGER LENC12)
С
REAL MONTH ,MNTHC12)
С
DATA LEN /31,28,31,30,31,30,31,31,30,31,30,31/
DATA MNTH /4HJAN ,4HFEB ,4HMAR ,4HAPR ,4HMAY ,4HJUNE,
+ 4H JULY , 4HAUG , 4HSEPT,4HOCT ,4HNOV ,4HDEC /
C
С
C === If JYEAR is not divisable by 4 then it is a leap year
C === and February is changed to 29 days.
С
ILEAP = MOD(JYEAR, 4)
IF CILEAP .EQ. 0) LENC2) = 29
C
DO 100 I=1, 12
С
JDAY = JDAY - LENCI)
IF CJDAY .GT. 0) GO TO 100
C
MONTH = MNTHCI)
IDAY = JDAY + LENCI)
C
GO TO 200
С
100 CONTINUE
С
200 RETURN
END
19
BIT BUCKET
WHO AM 1?
by J.L. DeSchutter/DISTRIGAZ
Brussels, Belgium
The objective of this routine 1s to give information about the session you are running under. Application programs may wish to
know capability, user and group name. This is very useful for personalized prompting or for logging the use of a key program.
With a simple Fortran call, the routine provides user name, group name and capability level. This routine uses information
described in Appendix J of the RTE-IVB System Manager's Manual (92068-90006). Note that this subroutine can easily be
extended to provide additional information (e.g. group and user ID).
Lines 33-35 contain the name, location and security code of the Accounts file (+ @CCT!). Future revisions of software or
specific configurations may require that those lines be changed.
ASMB,L
NAM IDENT,7 IDENTIFY USER 4 GROUP CASCII) REV. 2026
ENT IDENT
EXT OPEN, LOGLU,CLOSE ,READF ,.ENTR
EXT .MVW,ICAPS
ЕЛЕ хх NN
+ CALL IDENTCIUSN,IGRN, ICAP)
* IGRN 5 WORDS BUFFER
+ IUSN 5 WORDS BUFFER
+ ICAP INTEGER
*
* GRN = GROUP NAME (ASCII)
* USN = USER NAME (ASCII)
+ ICAP= CAPABILITY LEVEL (INTEGER)
+
* IF CALL FAILS ALL PARAMETERS SET TO -1
(RER RES
A EQU O
B EQU 1
D128 DEC 128
DS DEC 5
D4 DEC 4
D16 DEC 16
OPT ОСТ 1 NON EXCLUSIVE OPEN
DCB BSS 144
BUF BSS 128
LU NOP MY TERMINAL LU
GROU NOP
LEN NOP
OFSET NOP
[ER NOP
DUMMY NOP
NAM ASC 3,+@CCT! «ACCOUNT FILE NAME
SEC DEC -31178 «SECURITY CODE
CAR DEC 2 *CARTRIGE LABEL
.USN NOP
.GRN NOP
.CAP NOP
*
20
BIT BUCKET
+ #44 44 4 4 6 +++
+
IDENT NOP
E1
JSB
DEF
JSB
DEF
DEF
DEF
DEF
DEF
DEF
DEF
LDA
SSA
JMP
CLA,
STA
JSB
JSB
DEF
DEF
. ENTR
. USN
OPEN
E1
DCB
ТЕК
NAM
OPT
SEC
CAR
ТЕК
ERROR
INA
BLOC
READ
LOGLU
#+2
LU
HERE WE START «=nnssararanErEAEEAEEEEAEETEEEE
GET PARAMETERS ADDRESSES
OPEN ACCT FILE NON EXCLUSIVE
MUST BE POSITIVE
CURRENT RECORD TO BE READ
READ ONE BLOC
SESSION LU #
«SEARCH FOR MY ACCT IN SESS TABLE
BOU
NEWBL
FIND
LDA
STA
LDA
STA
JSB
CLA
STA
LDB
ADB
LDA
CPA
JMP
LDA
INB
ADA
INB
ADA
INB
ADA
SZA,
JMP
LDA
ADA
CPA
JMP
STA
JMP
152
CLA
STA
JSB
JMP
INB
INB
INB
LDA
BUF +4
GROU
BUF
BLOC
READ
OF SET
. BUF
OF SET
В, 1
LU
FIND
В, 1
В, 1
В, 1
В, 1
RSS
ERROR
D4
OF SET
D128
NEWBL
OF SET
BOU
BLOC
OF SET
READ
BOU
В, 1
RECORD ADDRESS OF ACCT DIRECTORY
RECORD # OF ACTIVE SESSION TABLE
READ SESSION TABLE
SEARCH FOR MY AST
IS FIRST WORD = TO MY LU
YES, WE FOUND IT
CALCULATE SUM OF FOUR ACB WORDS
IF THE SUM IS = TO ZERO
END OF INFO AND SESS NOT FOUND
DO WE REACH END OF CURRENT RECORD
YES READ A NEW ONE
READ NEXT DISC RECORD
RESET OFSET
THE LAST WORD OF OUR ASB
IS OUR ENTRY
IN ACCT DIRECTORY
21
BIT BUCKET
MPY D16
STA OFSET
DIV D128
STB OFSET
ADA GROU
STA BLOC
JSB READ
LDA OFSET
ADA .BUF
INA
LDB .USN
JSB .MVW
DEF DS
NOP
LDB .GRN
JSB .MVW
DEF DS
NOP
EACH ENTRY IS 16 WORDS LONG
AND FIRTS ENTRY HAS NUMBER ZERO
CALCULATE THE CORRESOPNDING RECORD #
USE THE REMAINDER AS OFSET
THE 2ND WORD IS USER NAME
MOVE IT
MOVE GROUP NAME
+++... READ CAPABILITY LEVEL WITH ICAPS CALL #####4##4 4400000008
JSB ICAPS
DEF +#+2
DEF DUMMY
СТА .CAP, I
RE EEE ER EEE HE
CLO JSB CLOSE
DEF +#+2
DEF DCB
JMP IDENT,
* +
THE END
+ READ ONE 128 WORDS RECORD
+ RECORD # 15 IN BLOC
++
BLOC NOP
READ NOP
JSB READF
DEF EE
DEF DCB
DEF IER
.BUF DEF BUF
DEF D128
DEF LEN
DEF BLOC
EE LDA IER
SZA
JMP ERROR
JMP READ,I
++
+ +
ERROR NOP
CCA
STA .GRN,
STA .USN,I
STA .CAP,I
JMP CLO
END
PUT -1 IN ALL PARAMETERS
RETURN IMMEDIATELY
22
BIT BUCKET
Computer
Museum
HOW LONG HAVE | BEEN HERE?
by William J. Loye/Buckbee-Mears,
St. Paul, MN
The program ACTTI was written to facilitate user and group time reporting in the RTE file manager environment. The program
opens the accounts file in a shared read-only mode and accesses the user CPU and connect time, writing to any output lu
(default=6). The most common use will probably be to write to a file that can be post-processed by a separate user program or
by IMAGE. (e.g.):
: SL,6, TIME: :MN,BO
:RU,ACTTI,,6
:CS,6,RW
: RU, TRACK (a user pgm to condense and store on monthly basis)
:CS,6,EN
: TR
Because this program opens and reads the accounts file, it would not take much modification to get it to print all sorts of
information, including passwords. Therefore, it should be kept on a private cartridge or cassette.
The program works by first reading word 5 of the accounts header. This is the pointer to the location of the accounts file
directory. The program then reads the account file directory sequentially keeping the record in an 128 word buffer (IBUF). Each
16 word logical record of the account file directory is checked to see if it is a valid user (word 12 .GT. 0). If itis, the user entry
record number (as pointed to by word 15 of IBUF) is used to read the user entry record into a 128 word buffer (JBUF). The CPU
and connect time will be pulled from either the first or second half of this buffer, depending on bit 15 of the record number
pointer (word 15). User times will be double integer in words 25, 26, 27,and 28 of the entry.
Originally, the program used arrays to store entry record pointers thus minimizing the reads from the disk. However, because
this needed arrays, maximum checks, and other fooling around, and because the accounts file is a type 1 file, that method was
dropped in favor of the present one. | make no effort to see if the desired entry record is already read and stored because the
overhead in doing this is more expensive than just reading (or rereading) each record.
All of the information needed to write (modify, enhance, etc.) this program will be found in Appendix J of the System Manager's
manual (92068-90006).
This program can be compiled with either FTN4 or FTN4X. It will load in about 9K.
FTN4X,Q
PROGRAM ACTTIC3,80), 10/26/81 BL REV 1.10
wn
x
PGM TO READ USER/GROUP TIME FROM ACCT FILE
AND PUT OUTPUT TO LU6, OR OPTIONALLY, ANY LUV.
IF LU IS SL’ed TO A FILE, FILE MAY BE READ BY
ANY OTHER PGMS TO KEEP RUNNING TOTALS OF
USER/GROUP USAGE.
THIS PROGRAM OPENS AND READS THE ACCOUNT FILE,
AND CAN BE MODIFIED TO OUTPUT PASSWORDS, ETC.
IT IS POTENTIALLY A STOOL-PIDGEON PGM.
PLEASE SEE PAGES J-3 THRU J-12 OF SYS. MNGR. MANUAL.
FOR ASSOCIATED DOCUMENTATION.
ооо
23
BIT BUCKET
10/26/81 BILL LOYE
BUCKBEE-MEARS CO.
245 EAST SIXTH ST.
ST.PAUL MN. 55101
QUTPUT: USER CPU CONNECT USER GROUP GROUP
ID MINUTES NAME NAME ID
(16) (F13.1) (F13.1) 2X (5A2) (5A2) (16)
LU 1 INPUT/QUTPUT USER CONSOLE
6 QUTPUT DEFAULT PRINTER
FMP +@CCT!:-31178 ACCOUNTS FILE
RU,ACTTI,,LUOUT
WHERE LUOUT IS THE LU OF THE OUTPUT FILE
(DEFAULT IS 6)
( note luout is second parameter !)
OP SYS: RTE IVB
COMPILES: FTN4X,FTN4
LOADS: STANDARD LOAD
© © О О О О О СО О О © © © ©) ©) © О О О О С ОО ООО
DIMENSION IDCBC144),IBUFC128), JBUFC128), IPRMC5)
DATA ITERM/1/ ,ILST/6/ , IWRD1/32000/
C
С +» » » USER DEFINABLE: JGRP IS USED TO TURN GROUP ACCOUNT PRINTING
C ON (JGRP=1) OR OFF CJGRP=0)
DATA JGRP/0/
C
CALL RMPARCIPRM)
IFCIPRM(2).EQ.6.0R.IPRM(2).LT.1) GO TO 5
ILST=IPRMC2)
WRITEC1,3) ILST
3 FORMAT(C’ QUTPUT LIST LU=",13)
C
C OPEN ACCOUNT FILE (NAME AND SEC. CODE MAY BE DIFFERENT FOR YOUR SYSTEM)
C NAME=+@CCT!, IOPTN=5B (CBITO=OPEN SHARED, BIT2sFORCE TYPE 1) pp. 3-29 pgmr re
5 CALL OPENCIDCB,IER,6H+@CCT'!,5,-311 78)
IFCIER.EQ.1) GO TO 10
WRITEC1,7) IER
7 FORMATO” COULDNT OPEN ACCOUNTS FILE. ТЕК=”, 13)
STOP 7
C
C
C
C READ HEADER RECORD AND GET IMPORTANT POINTERS
10 CONTINUE
CALL READF(IDCB,IER,IBUF,128,IL,1)
IFCIER.EQ.0) GO TO 15
WRITEC1,12) IER
12 FORMAT(’ ERROR ON HEADER READ. IER=",15)
JER= 12
GO TO 900
C
24
11/7 2/81 BL 1.10 ADD JGRP OPTION TO SUPPRESS GROUP PRINTING
оО ООО О О
o OOOO
OOO
BIT BUCKET
15 LUSER=4096-1BUF(23)
LGRP=1BUF (24)
LOCDIR=IBUFC5)
WRITEC1,17) LUSER,LGORP
17 FORMAT(I8,’ USERS,’,I8,’ GROUPS. ‘)
CALL EXECC11,IPRM)
JDATE=] PRM(S)
READ ACCOUNT FILE DIRECTORY (J-11) 16 WORD LOG REC
LOOP THROUGH ACCOUNT FILE DIRECTORY (J-11) STORING ONE PHYSICAL
RECORD (128 WORDS). NOTE THAT EACH PHYSICAL RECORD CONTAINS
EIGHT 16 WORD LOGICAL RECORDS.
CINRD1 1S USED AS POINTER TO WORD 1 OF CURRENT LOGICAL RECORD)
20 CONTINUE
[WRD1=TWRD1+16
IFCIWRD1.LE.126) GO TO 30
read next account file physical record
CALL READFCIDCB,IER, IBUF,128,IL,LOCDIR)
IFCIER.EQ.0) GO TO 25
WRITEC1,23) IER,LOCDIR
23 FORMATC’ ERROR’,IS,” ON READ OF ACC.DIR. RECORD «*,15)
JER= 23
GO TO 900
25 CONTINUE
IWRD1=1
LOCDIR=LOCDIR+1
read account entry (64 words per logical block)
logical record may be in first or second half of 128 word phys. rec.
if so, record pointers will be negative
30 CONTINUE
directory ends at when ibufCiwrd1) =0, ignored when less than 0
IFCIBUFCIWRD1)) 20,100, 31
user ( JUSER=1-4095) or group € IUSER=0)
31 IGRP=IBUFCINRD1+12)
IUSER=IBUF CIWRD1 +113
IFCIUSER.LT.1) GO TO 40
user account
IREC=I ANDCIBUFCINRD1+14)2,7777B)
IOFFST=25
IFCIBUFCINRD1+14).LT.0) IOFFST=89
GO TO 50
roup account
40 IFCJGRP.EQ.0) GO TO 20
IREC= 1 ANDCIBUFCINRD1+13),7777B)
IOFFST=2 |
IFCIBUFCIWRD1+13).LT.0) IOFFST=66
25
BIT BUCKET
©) © ©) ©) ©) ©
©) ©) ©) ©) ОО ©) ©) ©)
© ©) ©) ©) ©) ©
50
53
READ DIRECTORY ENTRIES AND PULL CPU,CONNECT TIMES
store 128 word logical record in array jbuf
ioffst is used to point to first or second log. rec. of phys. rec.
CONTINUE
CALL READF(IDCB,IER,JBUF,128,IL,IREC)
IFCIER.EQ.0) GO TO 55
WRITE(C1,53) IER, IREC
FORMATO” ERROR’,IS5,” ON READ OF ENTRY. RECORD #’,I5)
JER= 53
GO TO 900
CALCULATE CPU AND CONNECT MINUTES. NOTE DOUBLE INTEGER
55 CPU=FLOATC TANDCJBUFCIOFFST+2),77777B)) + 65536. +
+
+
FLOATC IANDCJBUFCIOFFST+3),77777B)) +
CFLOATC IANDCUBUFCIOFFST+3),100000B))+#C-1.3)
CONNCT=FLOATC IANDCJBUFCIOFFST),77777B)) + 65536. +
FLOATC IANDCJBUFCIOFFST+1),77777B)) +
CFLOATC IANDCJBUFCIOFFST+1),100000B)}+#C-1.3)
CONNCT=CONNCT/60.
CPU=CPU/6000.
M= IWRD1 +1
N=IWRD1+10
» + OUTPUT SECTION. MAY BE MODIFIED TO SUIT USER + + » + +
iuser,igrp are user ,group numbers.
iuser ,igrp are user ,group numbers.
cpu,connct are cpu and connect minutes
ibuf(i),i=m,n prints out user and group name (5A2 each)
jdate is julian date.
note present format is image/1000 compatable
WRITECILST,S8) IUSER,CPU,CONNCT,CIBUFCI),I=M,N),IGRP,JDATE
S8 FORMATCI6,2F13.1,2X,10A2,216)
GO TO 20
100
900
901
END OF LOOP
ALL DONE. CLOSE UP FILE AND GO HOME.
CONTINUE
CALL CLOSECIDCB)
STOP
ERRORS.
CONTINUE
WRITEC1,901) IER,JER
FORMAT(’ FATAL ERROR. IER,JER=",219)
STOP 777
END
26
BIT BUCKET
EXECUTING A PROCEDURE AFTER LOGOFF
by Bob Desinger/Hewlett Packard
Data Systems Division
Session Monitor controls access to the system and, under normal use, prevents you from using the system after you log off.
Occasionally, however, you want to do something just after logoff, such as clearing your CRT screen. The program that follows
shows how this can be done; its principles can be used to perform less trivial after-logoff functions.
At logoff, if Session Monitor finds any active programs invoked by your session, it prevents normal automatic logging off. To find
these active programs, Session Monitor examines the last word of each ID segment. This session word identifies the session
that invoked the program, or indicates that the system has started the program up.
This word can be changed with a subroutine that overwrites it. Jack Sadubin's DEATS subroutine from Volume IV, issue 5 of The
Communicator does this by finding the ID segment address and overwriting the 32nd word past it. Or, alternatively, a supported
subroutine DTACH alters the session word to indicate that the system (not a session) owns a program. This allows you to log off
while your program is running, since Session Monitor won't find your session identifier in the active program's session word.
To execute the procedure, a transfer file runs a program which finds out the invoking terminal LU number, detaches from
session, and then delays itself. During the delay, FMGR executes the next line of the transfer file to log you off. After logoff has
completed and all logoff lines have appeared on the screen, the program wakes up and sends a screen-clearing string of
escape codes to your CRT.
Call the transfer file EX. To log off and clear the screen from FMGR, simply enter TR,EX or :EX.
Your FMGR clone should not run the program, since it would wait for the program to finish (leaving active programs at logoff).
RTE can run a program, bypassing FMGR, with its own RU command. RTE commands are issued through FMGR by prefixing
them with SY, so the command in the transfer file to run the program is :SYRU. Running the program using RTE allows your
FMGR clone to execute the next line of the transfer file and log off.
ID SEGMENT CONSIDERATIONS
Every program needs an assigned ID segment to run. FMGR automatically assigns one (if necessary) to the programs that it
schedules, releasing it when the program terminates. RTE neither assigns nor releases. An ID segment must be previously
assigned with the FMGR RP command in order to run a program from RTE.
LOADR assigns an ID segment to a program upon successful loading, which is released by Session Monitor at logoff if the
program is dormant. Remember, though, that the clearing program is detached at logoff; its ID segment has no associated
session and will not be released. It remains assigned until the system is rebooted or a FMGR OF command (or the RTE
command OF,progName,8) is issued.
If an ID segment remains assigned to a program, the system is saved much overhead: searching for the type 6 file, opening,
reading, closing, and other disc-dependent processes. An informal, unofficial guide is that any program run more than 10 times
a day should have its own assigned ID segment (using the RP command). Inserting such a command in the WELCOM file
ensures that an ID segment is allocated to the program at all times.
If ID segment supply is not critically short, leave the ID segment assigned to the program: put the RP command in WELCOM,
and dont OF the program after its loading.
If ID segments are in critically short supply, each invocation of the clearing process should RP the program and then release its
ID segment so another program can use it. The invoking transfer file can RP, but it cannot perform the OF since this would abort
the program before it cleared the screen.
27
BIT BUCKET
The program can release its own ID segment by issuing an RTE OF command with a MESSS call. The buffer passed to MESSS
should be at least 14 words long, since RTE returns messages in this buffer. Of course, if the program releases its own ID
segment, put the RP in the transfer file EX instead of in WELCOM and do your own OF after a successful load and SP of the
program.
The destination CRT LU for the screen-clearing escape codes can be another obstacle. À standard EXEC/REIO write has only
six bits for the destination LU in the control word. Six is not enough if a terminal's system LU number is greater than 63 (77
octal). Normal I/O goes through the Session Switch Table (SST), which maps system LU numbers into session LUs of 63 or less.
The SST is part of Session Monitor, from which the program has detached. So using the SST and normal EXEC/REIO are off
limits for this application.
The “extended EXEC” subroutine XLUEX accepts a two-word control parameter. The first word is the destination LU; bit 16
indicates whether the word contains a system LU or a session LU. If set, the local SST is bypassed and the message is sent to
the system LU.
CUSTOMIZATION AND CAVEATS
This version moves the cursor to the bottom of the screen before clearing. Thus it completely clears the screen even when
invoked from the middle of a block of text. An HP 2640/driver DVROO terminal doesn't recognize the Home Down (escape F)
sequence, so invoke this procedure from the last line of text on a 2640. Logoff is normally executed from the last line anyway, so
this should be no hardship.
Different versions of output are possible. The version below rolls lines off the visible portion of the screen rather than clearing
them. This allows you to later read any logoff lines, such as MESSAGES WAITING. Also, you might be able to tell who just used
the terminal even after the screen is clear, assuming the terminal has enough memory.
If some accounts on your system release private cartridges at logoff, create two exiting transfer files. One, called EXRP, would
exit with an :EX,RP line, while EXSP would exit with an :EX,SP line. Other situations might call for other files named, for example,
EXRG or some other permutation of EX; each user can invoke the one appropriate for his account. If some users log off with
EX, SP and others use just EX, the logoff file can be named simply EX and contain the exit command with the largest number of
parameters. FMGR ignores any extra parameters (like “,SP”) if it only needs EX to exit.
Further information on DTACH and Session Monitor's logoff handler ССОРЕ is in Chapter 14 of the RTE-IVB Technical
Specifications Reference Manual (92068-90013). A description of the XLUEX call is in Chapter 3. Specific FMGR and RTE
command syntax is explained in Chapters 3 and 4 of the RTE-IVB Terminal User's Reference Manual (92068-90002).
FTN4X,L,C,d
PROGRAM CLR (4,51),BD Clear the 26xx Screen After Logoff
pgrmr: Bob Desinger, HP Data Systems Division
date: 82.02.16
purpose: Cleans the CRT screen after logoff.
Used under RTE-IVB and RTE-6/VM for 264x and 262x CRTs.
design: Get the system LU number of the terminal (for [/0).
Detach from session, allowing logoff.
Wait so logoff messages can appear,
then clean off the CRT screen.
Depending on the compiling option, it either releases its
ID segment or keeps it allocated for the next invocation.
* + + + # + & *% *% * * *%
28
BIT BUCKET
+
* It’s typically invoked thru a transfer file containing:
*
+ :SV,1,,1H ++ don’t show anything unless errors
+ : RP, CLR ** give it an ID segment (optional)
+ : SYRU, CLR ++ have RTE run it so FMGR is free to
+ :EX,SP + + execute the next line to log off
* IE
+
* Call this transfer file EX so you can enter just “:EX” to log off.
+
+ Use the Large or Extended Background loading option COP,LB ог ОР, ЕВ).
*
+ If this program will be run many times a day, do an “RP,CLR” from FMGR
* or the WELCOM file after reboot (unless ID segments are critical).
* If you RP it, be sure to:
+
+ 1. Compile it WITHOUT the “d*” option
+ 2. Remove the RP line from the transfer file
*
IMPLICIT INTEGER Ca-z)
DIMENSION cntlWd(2), cursUp(23) ! for CRT 1/0 control
DIMENSION Hdown(2), scroll(21)
d DIMENSION mssC14) ! MESSS message to off ID
d DATA mss /‘0F,CLR ,8 / ! ID segment clean-up
DATA scroll /21 * 6412B/ 1 21 CRLFs to scroll the chars off screen
DATA Hdown /15555B, 15506B/ ! mem lock off Cesc m) 4 home down Cesc Е)
DATA cursUp /23 + 15501B/ ! 23 cursor ups (esc A)
! EXEC call parameters to delay execution:
DATA delay /12/, self /0/, secs /2/, once /0/, write /2/
junk = LOGLU CsysLU) ! get system LU of invoking terminal
cntlkWdC(1) = 100000B + sysLU ! set bit 16 for SYSTEM LU number
cntlWdc2) = 0 ! no special driver instructions
CALL DTACH (junk) ! now detach from session so that
! LGOFF won’t stop the :EX,SP
CALL EXEC (delay, self, secs, once, -5) ! sleep for 5 seconds
* the rest of the code executes once, 5 seconds later
CALL XLUEX (write, cntlild, Hdown, 2) ! put cursor at screen bottom
CALL XLUEX (write, cntlWd, scroll, 21) ! scroll info off screen
CALL XLUEX (write, cntlWd, cursUp, 23) ! put cursor at top of screen
d junk = MESSS (mss, 10) ! release the ID segment
END
29
BIT BUCKET
FAST FORTRAN — AN UPDATE
by John Pezzano/HP El Paso, Texas
In the Vol. 4 Issue 4 of the Communicator | wrote an article entitled “FAST FORTRAN" which contained rules and examples for
writing efficient FORTRAN programs.
With the introduction of the FORTRAN 4X compiler, some of these rules and examples need to be modified. FORTRAN 4X
(FTN4X) is much more efficient than FTN4 generating different code. So here are my modified rules:
1. KNOW WHAT IT TAKES TO COMPILE AN EQUATION FOR MINIMUM COMPILATION
The example shown : |
X= Z#CZ+1.0)
was more efficient as well as shorter than
X=Zua2+2
in FTN4. The FTN4X compiler generates the same efficient code for both versions, converting the equations to
X=222+2
The rule is still valid, but the example is not.
2. REMOVE INVARIANT FROM A DO LOOP
This rule is still valid as is the example. However, the gain is not as great. By removing the part of the loop that does not change
within the loop itself, considerable speed can still be gained. To illustrate the difference in the compilers,
ORIGINAL CODE INVARIENT REMOVED
DO 10 I=1,100 R=SINCX##2+Y=+2)
2C1)=SINCX##2+Y##2)+ZCI)+#2 DO 10 I=1,100
10 CONTINUE 201) =В+2( 1) +2
10 CONTINUE
FTN4 FTN4X FTN4 FTN4X
loop size 38 24 18 17
savings of
instructions --- 1400 2000 2100
in 100X loop
SIN calls 100 100 1 1
- RTOR calls 200 0 0 0
30
BIT BUCKET
3. MAKE SURE CONSTANTS AGREE IN TYPE WITH VARIABLES
Neither the rule nor the example are required in FTN4X although this is still a good programming technique. FTN4X would
automatically convert the example
X=Y+1
to the better
X=Y+1.0
4. COMBINE CONSTANTS
The rule and example are both valid. Use
DATA POVER2/1.570796/
X=POVER2 + Y
tor
DATA P1/3.14159/
X=PI1/2.0 + Y
5. DON'T CALL LIBRARY ROUTINES UNNECESSARILY
No change. The rule is still valid as are the examples.
6. NOW HOW TO USE ARRAYS
The rule is valid but the examples are not. Unlike FTN4, FTN4X calculates fixed array elements at compilation, rather than at run
time. Therefore,
A. The example
Y=XC1)++#+2+XC2)#+#2+XC3)#+#2
in FIN4X takes no more instructions than
EQUIVALENCE CXC1),X19),CXC2),X2),CXC3),X3)
Y=X1=+#2 + X24#42 + X3ux2
whereas it took 15 more words in FTN4.
31
BIT BUCKET
B. The example
DIMENSION AC20,20)
DO 10 I=1,20
DO 10 J=1,20
10 ACI, JI=0.0
took 4400 more executing instructions and was 15 words longer than
DIMENSION AC€20,20),B(400)
EQUIVALENCE (AC1,1),BC(1))
DO 10 I=1,400
10 B(I)=0.0
In FTN4X, the numbers are 1320 and 6 respectively. While it is still a considerable improvement, the numbers are not as
dramatic.
C. The example
XCI)=ACI)/BCI)
Y CI)=ACI)/C+W
ZC1)=R/2.0+ACI)
costs 6 words/loop in FTN4X vs. 19 words/loop in FTN4 over
AI=ACID
XCI)=AI/BCI)
YCI)=AI/C+NW
2(1)=R/2.+Al
which may not be worth the effort.
D. Knowing what the use of the array name without subscript means is still important but not in this example. In FTN4X,
ARRAY =X
and
ARRAYC1)=X
generate the same code.
32
BIT BUCKET
computer
Museur
7. AVOID FORMATTER LIKE THE PLAGUE!
This is still true since the FORMATTER is much slower and takes more space than EXEC and REIO calls. However, the flexibility
in getting status, jumping on errors, and checking EOF's now exist in FTN4X formatted I/O calls. This, combined with the
transportability of FORMATTED I/O must be weighed against the speed/size cost.
CONCLUSION
FTN4X can offer dramatic improvement both in code size generated as well as execution efficiency for a typical FORTRAN
program. As a person who started on FORTRAN II in pre-RTE environment and who worked with the original pre-release (1974)
FTN4 compiler, | can heartily recommend FTN4X. However, one can still “beat” even the best compilers by good coding.
What about FTN7X on RTE-6VM? While | have not completely tested all the above on FTN7X, preliminary testing has shown it to
be similar to FTN4X but with some slight improvement in the number of loop instructions (2 fewer) when doing DO LOOPS in
FORTRAN 77 mode (vs FORTRAN 66 mode).
33
BIT BUCKET
ACCESSING PHYSICAL MEMORY
by Stephen Botzko/Hewlett Packard
Waltham Division
In a recent Communicator/1000 article (“Accessing Physical Memory in FORTRAN and PASCAL", Larry W. Smith, Vol. V, Issue
1), a technique for accessing physical memory was presented. We have also found that direct user management of physical
memory is an efficient method for sharing large data structures among several user programs. The technique presented in the
article has the disadvantage that the mapping mechanism restricts the maximum size of the application programs.
The following subroutines (MXGET MXPUT) overcome this drawback. They allow the user to transfer up to 1024 consecutive
words, starting from any location in physical memory.
The routines maintain maximum logical address space by mapping the physical memory through the user's driver partition map
registers. (All types of user programs have two map registers reserved for driver partitions). Protection from RTE interactions is
provided by using $LIBR to turn off nonpriviledged interrupts during the transfer, and by restoring the user map to its original
state after the transfer completes (but before the call to $LIBX!).
The use of $LIBR and $LIBX make MXGET and MXPUT somewhat slower than the MEMGT routine provided by Larry Smith.
(They execute at about 400 microseconds for a one-word transfer). However, the maintenance of the user's full logical address
space will more than offset this slower running time in many applications.
ASMB,R,L
NAM MXGET,?7
+
+
*
+
*
+
+
+
+
+
+
-…----2-----2-2-" "<<. =-<._ +
+
+
+ NAME : MXGET
« FUNCTION: TRANSFER WORDS FROM/TO PHYSICAL MEMORY
+
4 CALLING SEQUENCE:
+
4 CALL MXGETCPAGE , ADDR , BUFF , NWORD)
# CALL MXPUTCPAGE , ADDR , BUFF ,NWORD)
+
« INPUTS:
+
* РАСЕ PAGE IN PHYSICAL MEMORY
+ ADDR PAGE OFFSET
* BUFF PROGRAM BUFFERCINPUT FOR MXPUT)
a NWORD NUMBER OF WORDS TO TRANSFER
+
34
BIT BUCKE1
OUTPUTS:
BUFF USER BUFFER INTO WHICH DATA TRANSFERRED(MXGET)
PAGE ,ADDR PHYSICAL MEMORY (MXPUT)
ERROR CONDITIONS:
NONE
PROCESS:
GO PRIVILEGED
ADJUST USER MAP (USE DRIVER PARTITION)
TRANSFER WORDS FROM TO USER BUFFER (MXGET)
(OR VICE VERSA FOR MXPUT)
RESTORE USER MAP
RESTORE INTERRUPTS
+ + x # # # * kx * x * x x * x OA A
* *
|
!
!
!
|
)
'
t
I
!
I
I
!
I
!
1
1
!
I
I
|
!
I
1
0
I
I
I
I
I
I
!
I
I
!
I
!
I
I
I
I
I
!
I
I
I
'
I
I
I
'
)
'
'
'
'
'
|
!
'
I
'
'
0
'
I
!
I
*
ENT MXGET ,MXPUT
EXT .ENTR,$LIBR,$SLIBX,$DVPT
JSB .ENTR
DEF PAGE
XLA SDVPT
MPY =B2000 * CONVERT DRIVER PARTITION PAGE INTO LOGICAL ADDR
STA BASE
LDA ADDR, I
STA TEMP
AND =B1777
ADA BASE
STA ADDR
COMMON CODE FOR MXGET,MXPUT STARTS HERE
Z + + =: = *
X.0 LDA TEMP
CLB
LSR 10
STA TEMP + TEMP HOLDS PAGE OFFSET OF ADDRESS
XLA $DVPT
ADA =D32
STA DPBAS
*
«+ NOW FIND PAGE TO MAP INTO DRIVER PART’N (PERMITS PAGE OFFSET > 1023)
*
35
BIT BUCKET
LDA PAGE
ADA TEMP
AND =B1777
STA PAGE
SAVE OFF DRIVER PARTITION PAGES
* +
JSB SLIBR
NOP
LDX =D-2
LDA DPBAS
LDB SAVE
XMM
*
NOW REMAP INTO DRIVER PARTITION AREA
LDX =D1
LDA DPBAS
LDB PAGE
XMS
LDX =D1
LDA DPBAS
INA
LDB PAGE
INB
XMS
NOW MOVE THE DATA
* *
LDA ADDR
LDB BUFF
MVW NWORD, I
RESTORE USER MAP
LDX =D2
LDA DPBAS
LDB SAVE
XMM
TURN OFF INTERRUPTS
*
JSB $LIBX
DEF #+1
DEF #+1
JMP MXGET, I
36
BIT BUCKET
*
* ENTRY POINT FOR MXPUT
+
PAGE 1
ADDR1
BUFF 1
NWRD1
MXPUT
NOP
NOP
NOP
NOP
NOP
JSB
DEF
LDA
STA
XLA
MPY
STA
LDA
STA
AND
ADA
STA
LDA
STA
LDA
STA
LDA
STA
JMP
BSS
BSS
DEF
DEC
DEC
DEF
BSS
END
.ENTR
PAGE 1
MXPUT
MXGET
$DVPT
=B2000
BASE
ADDR1 , I
TEMP
=B1777
BASE
BUFF
BUFF 1
ADDR
NWRD1
NWORD
PAGE 1
PAGE
MX.O
2 * TWO WORD SAVE AREA
37
BIT BUCKET
MORE NOTES ON THE USE OF UNDECLARED MEMORY
by Jeff Wynne/Naval Ordnance Station,
Indian Head, MD
Readers are referred to the article on this subject by John Pezzano which appeared in the Communicator, Volume 5, Issue 2
(1981). Suggested uses for undeclared memory and linking techniques are discussed in some detail.
EDITOR'S NOTE: see also letter from Ernst Stelzer in this issue.
REDUCED DISK STORAGE REQUIREMENTS FOR TYPE-6 FILES
Arrays in undeclared memory (UDCM) are not included in the object image of the program on disk. This is true with RTE-IVB for
both permanently loaded programs and for type-6 object code program files. Just consider the following code:
PROGRAM EXMPL
COMMON IAC20000)
DO 10 I = 1, 20000
10 IACI) = 1
END
The above program requires very little disk storage in an RTE-2 system since temporary COMMON is not included in the object
program space. However, RTE-IVB does put temporary COMMON in the program space and the RTE-IVB type-6 file for this
program requires 159 blocks of disk storage. At our site, where we started with an HP-2100 and a single 5 MByte disk, this
waste is unacceptable (even though we now have 80 MBytes of disk storage on some systems). The same program, with the
array IA in undeclared memory requires 4 blocks for its RTE-IVB type-6 file.
ALL-FORTRAN LINKING TECHNIQUES
In addition to the assembly link described in Mr. Pezzanoss article, there are several ways to get around the problem of passing
the address of undeclared memory as an array reference in a FORTRAN program. If desirable, it can be done with
“all-FORTRAN" code.
The problem was:
PROGRAM MAIN
CALL LIMENCO, IBUF, LEN)
CALL SUBCIBUF, LEN)
etc.
SUBROUTINE SUBCIBUF, LEN)
INTEGER IBUFC1)
etc.
Of course this wont work. As pointed out by Mr. Pezzano, the problem is that the address passed in the call to SUB is an
address where the address of undeclared memory is stored rather than the address itself.
38
BIT BUCKET
Consider the following modifications to the above code.
PROGRAM MAIN
DIMENSION IAC1)
CALL UDC CIA,
IEL1, LEN)
CALL SUB CIACIEL1), LEN)
etc.
SUBROUTINE SUBCIBUF, LEN)
INTEGER IBUFCLEN)
etc.
SUBROUTINE UDCCIA, IEL1, LEN)?
IADD = IGETACIA)
CALL LIMEM CO, IFWAM, LEN)
IEL1 = IFWAM - IADD + 1
CALL EXECC22,3)
END
Here the subroutine UDC(IA,IEL1,LEN) is used to find the index of the first element of IA that is in UDCM and the number of
words in UDCM. The CALL EXEC(22,3) is for systems like RTE-2 which do not swap the entire partition unless this call is made.
It is not required for RTE-IVB (i.e. it has no apparent effect.).
The key to the solution is function subprogram IGETA which may be coded in either FORTRAN or ASSEMBLY. IGETA(IARG)
returns the direct address of IARG in the A-register. In the above code, IADD = IGETA(IA) stores the address of IA in variable
IADD. IADD and !|FWAM are then used to calculate the index of ТА which corresponds to the first word of UDCM. Of course
IGETA may be used to obtain other addresses also; see subroutine SUB in the example program at the end of this article.
FORTRAN VERSION OF IGETA:
100
FUNCTION IGETACIA), RETURN ADDRESS OF ARGUMENT IN A-REGISTER
ASSIGN 100 TO N
N = N +2
K = IDMYCIA)
IGETA = IGETCN)
IFCIGETA.GE.0) RETURN
IGETA = IGETC IGETA.AND.077777B )
GO TO 110
END
FUNCTION IDMYCIA), DUMMY FUNCTION SUBPROGRAM
IDMY = 0
END
39
BIT BUCKET
ASSEMBLY VERSION OF FUNCTION IGETA:
NAM IGETA,7 ROUTINE RETURNS ADDRESS OF ARGUMENT 810929.0842
ENT IGETA
IGETA NOP
LDA IGETA,I SAVE RETURN ADDRESS
STA RETRN
152 IGETA ADVANCE IGETA TO POINT TO ADDRESS OF ARGUMENT.
LDA IGETA,I GET ADDRESS OF THE ARGUMENT.
TEST SSA,RSS IS IT INDIRECT ?
JMP DONE NO, IT’S DIRECT. ALL DONE.
AND MASK YES, MASK BIT 15 AND TRY AGAIN.
LDA 0,1 GET NEW ADDRESS.
JMP TEST GO BACK AND TES AGAIN.
DONE JUMP RETRN,I
RETRN NOP
MASK OCT 077777
END
Note that the FORTRAN version is dependent on the HP-1000 linking convention and on the compiler implementation of the
ASSIGN statement. At this point, HP is committed to supporting the linking convention. implementation of the ASSIGN
statement is fairly standard and one would not expect that to change with future compilers. This technique works with FTN4 REV
1442 part# 24177-60001, RTE-FTN4 and FTN4X. The sample program which follows has been tested with RTE-FTN4 and with
FTN4X.
At this installation, we generate the assembly version of IGETA into the system disk resident library. However, there are a
number of reasons for wanting to stay “all-FORTRAN", not the least of which is the rather awkward requirements for compiling,
assembling and loading mixed FORTRAN and ASSEMBLY code.
The following program uses the techniques described above. It is “all-FORTRAN”. To run it, just compile, load and go. In
RTE-IVB, if you want more UDCM than that between the end of code and the end of the current page, use the system SZ
command to increase the program space after loading the program (this is the usual thing to do). With RTE-2, you automatically
get the entire background or real-time partition.
EXAMPLE FORTRAN PROGRAM
PROGRAM ICOR (3,99), DEMO ON USE OF UNDECLARED CORE 820203.1030
С
С The main program and subroutine UDC are used to find the number of
C elements and the starting element of array IA which are available
C for use in undeclared memory. The main body of the program is in
C subroutine SUB.
С
DIMENSION IAC1)
C
CALL UDCCIA, IEL1, NELS)
C
С Now call SUB and pass along the first array address in undeclared
C memory and the number of words available.
C
CALL SUBCIACIEL1), NELS)
END
SUBROUTINE SUB (ARRAY, N)
INTEGER ARRAY(N), TLU
40
88
100
о ООО ОО О
=> o
no
oO
000
100
BIT BUCKET
TLU = LOGLUCIDMMY)
IFCTLU.LT.1) TLU = 1
DO 100 I = 1, N
IFCI.GT.10.AND.1.LT.N-10) GO TD 100
K = IGETACARRAYCI))
WRITECTLU,88) I, K, ARRAYCID
FORMATC" ELEMENT #" I6 " ADDRESS=" KB * VALUE =" K8)
CONTINUE
RETURN
END
SUBROUTINE UDCCARRAY, ELEM1, NELMS), FIND 1ST AND NUMBER IN UDC
IMPLICIT INTEGER (A-2)
This subroutine calculates the element (ELEM1) of integer array
ARRAY that corresponds to the first word of available memory at
memory address FWAM. It also calculates NELMS the number of
words from FWAM to the end of the partition.
Note that NELMS could be zero if the program had no undeclared
memory. This technique employs subroutine IGETA to get the
address of the array ARRAY.
An EXEC(22,3) call is made so that the entire partition is
swapped (required for RTE-2, etc.).
IADD = IGETACARRAY)
IWW = 0
CALL LIMEMCIWW, FWAM, NELMS)
ELEM1 = FWAM - IADD + 1
Set swapping to get entire partition.
CALL EXECC22, 3)
RETURN
END
FUNCTION IGETACIA), RETURN ADDRESS OF ARGUMENT IN A-REGISTER
ASSIGN 100 TO N
N = N +2
CALL IDMYCIA)
IGETA = IGETCN)
IFCIGETA.GE.0) RETURN
IGETA = IGETC IGETA.AND.077777B )
GO TO 110
END
SUBROUTINE IDMY(IA)
CONTINUE
END
41
BIT BUCKET
SHORT FORMATTED 10 FOR LUS IN PASCAL/1000
by Dave Redmond/HP Albuquerque, NM
When new users are introduced to Pascal/1000 they are usually impressed with the ability to specify either files or LUs for 1O,
especially at run time. This is particularly useful for determining how a developing program outputs to a file; merely direct that
output to your terminal instead. The next impression new users get is typically that IO programs seem to be quite large. For
example, the following program is nine pages long when loaded:
PROGRAM S ( OUTPUT J;
BEGIN
WRITELN € “"Hello!!”)
END.
A look at the loader listing reveals that many of the relocated modules create, open, and generally manipulate files. All these
mcdules allow the user the file/LLU versatility with formatted 10, but also add to the size of his programs, proving the old adage
“You don't get something for nothing!”
Assume, though, that a particular application requires 10 to/from LUs only. In this case the added modules buy nothing, yet still
cost space. The use of Exec reads and writes are fine for ASCII data, but inappropriate for numbers. The need for procedures
specialized for formatted 10 to/from LUs is obvious.
This article presents one attempt to satisfy this need in a fashion similar to the way Pascal/1000 does formatted IO. The
presented procedures are meant to be used instead of the standard Pascal/1000 files (e.g. READs, WRITEs, INPUT, OUTPUT),
and, should allow the programmer most of the primitives required for formatted 10. This is a first step, one that is easily modified
by the reader.
FORMATTED OUTPUT
The following is a table of calling sequences for the relevant output procedures and their Pascal/1000 equivalents:
CALL EQUIVALENT
WrtA CC) WRITE (C)
WrtB (Buf, Length) FOR I := 1 TO Length DO WRITE CBufI])
Wrtl CI, N° WRITE CI:ND
WrtR CR, N, MD WRITE (R:N:M)
WrtLn WRITELN
For all of the above procedures the output is to the LU Out__ Lu. This LU must be set by the programmer. With these primitives
one can output data in any of the generally required formats. (Note: Neither E nor L formats are used.)
These procedures work much the same as the Pascal/1000 procedures. There is an output buffer, Out __ Buf, into which the
appropriate characters are appended by all of the output procedures except WrtLn. An index, Out__ Index, indicates the
position in Out__ Buf where the next character should go: Out_ BuffOut__ Index]. WrtLL.n does an Exec write to Out_ LU and
resets Out _ Index to 1.
WrtA and WrtB are fairly obvious. Wrtl and WrtR, however, are a bit more complex. In an effort to simplify things, an additional
procedure, Wrtl0, was written to determine the appropriate characters for the represention of a signed integer in a given length,
with or without leading zeros. Wrtl calls Wrtl0 without leading zeros. WrtR calls WrtlO without leading zeros for the digits to the
left of the decimal point, and with leading zeros for those to the right. If the ASCII representation of the number will not fit in the
desired length (due to the absolute value being too large or there being no room for a negative sign) the first character will be an
asterisk.
42
BIT BUCKET
FORMATTED INPUT
The following is a table of the calling sequences for the relevant input procedures and their Pascal/1000 equivalents:
CALL EQUIVALENT
RdA (C) READ CC)
RdB (Buf, Length) FOR I := 1 TO Length DO READ (Buf(I))
Ка! (1) Skip_to_Digit; READ (I)
RdR CRD Skip_to_Digit; READ (R)
RdLn
where Skip__to__ Digit is equivalent to
WHILE NOT CINPUT* IN [*07..737, ‘+’, *?-7]) DO READ CC)
Again for the above procedures, the input is from the LU In__ Lu, set up by the programmer. (This sure seems familiar.) With
these primitives one can input data in any of the general formats (once again, neither E nor L formats are used).
There is an input buffer, In__Buf, from which the appropriate characters are read by all of the preceding procedures except
RdLn. An index, In__Index, indicates the last character of In__ Buf that was read. That last character read is in the global Ch,
and the next character to be read is in the global Next__ Ch (the equivalent to INPUT?). Another global, the BOOLEAN Eoln, is
set TRUE by RdLn and when the last character input is read. In both cases the next read will, at least temporarily, set Eoln
FALSE.
RdA and RdB are quite easily implemented. Rdi and RdR, however, require an additional function, R__Int, which returns the
LONGREAL value converted from the next string of integer characters ('0'..9). (Note that R__ Int returns a LONGREAL value.
This is so that both Rd! and RdR can use it. Rd! will correctly convert integers over 7 places long only with LONGREAL.) Rdi and
RAR function quite differently from their Pascal/1000 logical equivalents READ (1) and READ (R), as indicated in the preceding
table. Rd! and RdR actually skip characters from the input stream until a number or a sign (+ or —) is encountered. Only then
does the conversion process begin. This allows more freedom upon input. For instance, RdR (X) will be satisfied by the
following input string:
X should get
the value -6.42
The advantages are obvious, so are some disadvantages (error checking, etc.).
SUGGESTED USAGE
It is recommended that these procedures (with the reader's modifications, of course) be compiled as a separate SUBPRO-
GRAM so that the resulting relocatable can be searched during loading. This way only the procedures required will be loaded,
thus saving some space. An inclusion file is also recommended (here called &IOINC) for the declarations. All of your own
declarations should be included, as well as all of the following:
TYPE
Char_Set = SET OF CHAR;
CONST
User_Buffer_Length = nnn; (+ Typically 80 *)
I0_Buffer_Length = mmm; (+ Typically the same as above *)
Numeric_Set = Char_Set (°0°..°9°, ‘+, 7-7];
Digit_Set = Char_Set [’0’..’9’];
43
BIT BUCKET
TYPE
Int = -32768..32767; (+ One word integers * )
User_Buffer = PACKED ARRAY [1..User Buffer Length] OF CHAR;
10_Buffer = PACKED ARRAY [1.. 10 Buffer Length] OF CHAR;
VAR
Qut_Buf, (+ The output buffer ый
In_Buf (+ The input buffer +)
[0_Buffer;
Ch, (+ The last char read *)
Next_Ch (+ The next char to be read *)
: CHAR;
Eoln
BOOLEAN;
Qut_LU, (+ The output LU +)
In_LU, (+ The input LU +)
Out _Index, (+ The next position to write +)
In_Index (+ The last position read +)
Int;
To initialize the output, the programmer must set Out __ LU to the appropriate output LU and set Out __ Index to one. To initialize
the input, In__LU should be set appropriately and a call should be made to Нап.
The actual code should answer many specific questions. Immediately following the code is an example of its use.
$ SUBPROGRAM,RECURSIVE OFF ,RANGE OFF ,HEAP 0,AUTOPAGE ON,VISIBLE ONS
(+
Note : Any time size is a factor, the programmer should
avoid the added expense of RECURSIVE ON,
RANGE ON, and HEAP n with n <> 0.
See the Pascal/1000 Ref Man for more info.
+)
PROGRAM 10 ;
(»
This subprogram contains the following visible procedures:
WrtA to write a single character
WrtB to write a string of characters
Wrtl to write a signed integer
Wr tr to write a signed real number
Wrtln the WRITELN equivalent
RdA to read a single character
RdB to read a string of characters
Ка! to read a signed integer
RdR to read a signed real number
RdLn the READLN equivalent
* )
44
BIT BUCKET
CONST
Asterisk
Blank
Zero
Minus
Plus
Decimal _Point
847
тоя
"0'
Y A
£4.17
we WE WE gE ww wh
# #
.
$INCLUDE ‘“&IOINC“$
PROCEDURE Reent_IO SALIAS ‘REIO’$
( ICode,
ICnwd : Int;
VAR Buf : 10_Buffer;
Length : Int
2; EXTERNAL:
PROCEDURE Get_Xmit_Len SALIAS “ABREG”S
CVAR A_Reg,
Length : Int
2; EXTERNAL;
1 $ PAGES
(»
SLIIIIINIIIAN NN IAN ITNNINDES WriLn S080 5008800008808 88808888880888080888
*)
PROCEDURE Wrtln;
(+
Equivalent to WRITELN
*)
BEGIN
Reent_10 (2, Out LU, Out _Buf, 1 - Out_Index);
Qut_Index := 1;
END;
(+
"УРУРРРУРУРРРРРРРРЕРРРРРРРРРРЗГУ: МРРРРРРРРРРЕРРРРЕРРРРРРРРРРРРРРРЕРРУР
*)
PROCEDURE WrtA CC : Char);
(+
Equivalent to WRITE CC);
* )
BEGIN (+ Proc WrtA +)
Out _Buf(Out_Index] := C;
(+
Check output line length
* >
IF Out_Index = IO_Buffer_Length THEN Wrtln
ELSE Out_Index := Out_Index + 1;
END;
Ça
"LIZIZIXZI III IZ III III IL E 26-MXIIII III EEE ETE
+ >
PROCEDURE WrtB (Buf : User_Buffer; Length : Int);
45
BIT BUCKET
(»
Equivalent to FOR I := 1 TO Length DO WRITE (Buf{I1)
+)
VAR
I : Int;
BEGIN (* Proc WrtB +»)
FOR I := 1 to Length DO WrtACBuf]]);
END; (+ Proc WrtB +)
1
(»
BEGGS SNS SIERO NR RSs stds sd Writ] Q #0080008 0800000808080 0880808008808 880800808
* >)
$VISIBLE OFF$
PROCEDURE Wrt10 CN : INTEGER; Length : Int; Leading_Zeros : BOOLEAN);
(+
This procedure is used by the other output procedures in this
subprogram and is not designed for general user use.
This procedure has an effect equivalent to WRITE(N:Length)
except that if the integer requires more space than Length
the first char will be an asterisk.
Also, if Leading_Zeros is TRUE then leading zeros will be
included (Note: This works only for positive N; remember that
this is not for general use).
+) -
VAR
Index : Int;
Negative : BOOLEAN;
Buf : PACKED ARRAY [1..20] OF CHAR;
BEGIN (+ Proc WrtIO +)
Buf := Blank:
Negative := N < 0;
N := ABS(N);
Index := Length;
Put ASCII representation of N in Buf
+ >)
WHILE CN > 0) AND (Index > 0) DOD
BEGIN
Buf { Index] := CHR( ORD(Z2ero) + N MOD 10);
Index := Index - 1;
N := N DIV 10;
END;
Check for overflow, sign and leading zeros
> IF CN > 0) OR CCIndex = 0) AND Negative) THEN Buf{1] := Asterisk
ELSE IF Negative THEN BufCindex] := Minus
ELSE IF Leading_Zeros THEN
FOR Index := Index DOWNTO 1 DO BuflIndex]) := Zero;
Qutput the buffer
46
BIT BUCKET
+)
Wrtb (Buf, Length);
END: (+ Proc Wrtl0 +)
1
$VISIBLE ONS
000000000000000 0000000000000 WrtR #4080808 080808 0888088088808 88088808080884898
+
PROCEDURE WrtR CR : REAL; Width, Right : Int);
© Equivalent to WRITECR:Width:Right)
“7 VAR
I : Int;
BEGIN
IF Right > 8 THEN Right := 8; (+ Not required +)
© Wrt digits to left of decimal point without leading zeros
> Wrt10 CTRUNCCR), Width - Right - 1, FALSE);
WrtA CDecimal_ Point);
e Wrt digits to right of decimal point with leading zeros
? R := ABS(R - TRUNCCR));
FOR I := 1 TO Right DOR := 10.0 + R;
Wrt10 CROUNDCR), Right, TRUE);
END; (+ Proc WrtR +)
(+
'РРРРРРРРРРРРРРРРРРРРРРРРРРРИ ЗО ЩЕ РРРРРРРРРРРРЕРРРРРРРРРРЕРРРЕРРЕРРЕ
"PROCEDURE Wrtl (N : INTEGER; Length : Int);
e Equivalent to WRITE (N:Length)
2 BEGIN (+ Proc WrtI +)
WrtIO CN, Length, FALSE);
END; (+ Proc Wrtl +)
1 $ PAGES
(+
'РРЕРРРРРРРРРРРРРРРРРРРРРРРРРИСТООЩоО ИЕ РРРРРУРРРРРРРЕРРРЕРРРЕРРРЕРРРЕРИ,
+ >)
PROCEDURE Get_Ch;
(+
This procedure "reads" the next character from the input stream.
That character is put into the global Ch, and the next character
to be "read" is put into the global Next _Ch.
Eoln is checked before and set after.
47
BIT BUCKET
+)
CONST
Echo = 256;
VAR
A_Reg,
Chars_Read : Int;
BEGIN (+ Proc Get_Ch within IO +)
IF Eoln THEN
BEGIN
Reent_10 C1, In_LU + Echo, In_Buf, -User Buffer Length);
Get_Xmit_Len (A_Reg, Chars_Read);
In_Index := 0;
Ch := Blank; Next_Ch := In _BufC(11; (+ As in Pascal/1000 +)
END
ELSE BEGIN
In_Index := In_Index + 1;
Ch := In_BuflIn_ Index]; Next Ch := In_BuflCIn Index + 11;
END;
Eoln := (In_Index >= Chars_Read);
END; C+# Proc Get Ch +)
(+
PAL XII TE ETT ETEETS SY ETE EEE 2 99 301.380 Y Y Y E E 3 2 3 5325 5552522255552 2252555
+)
PROCEDURE RdA (VAR C : CHAR);
©» Equivalent to READ CC);
© BEGIN (+ Proc RdA within IO +)
Get_Ch;
C := Ch;
END; C+# Proc RdA +)
с.
"РРРРЕРЕРРРРРРРРРРЕРРЕРРЕУРРУР ИТ.) -МЕРРРРРРРРРРРРРЕРРРРРРРРРРРЕРРРРРРРЕР
+)
PROCEDURE RdB (VAR Buf : User_Buffer; Length : Int);
(»
Equivalent to READ (Buf), but, terminate read after
either Length chars being read, or Eoln TRUE.
48
BIT BUCKET
+ >
VAR
N : Int;
BEGIN (+ Proc RdB within IO +)
N := 1;
Buf := Blank; (+ Blank fill to start +)
REPEAT
Get_Ch;
Buf (N] := Ch;
N := N + 1;
UNTIL (N > Length) OR Eoln;
END; (# Proc RdB +)
1
(+
SINN III ZII TINA NINIIT IIS R Int REGEN
+ >
SVISIBLE OFFS
FUNCTION R_Int : LONGREAL;
VAR
R : LONGREAL;
Sign : CHAR;
BEGIN (# Func R Int within IO *#)
R := 0.0; Get Ch;
(+
Skip to digit or sign
* )
WHILE NOT (Next_Ch IN Numeric_Set) DO Get_Ch;
(+
If it is a sign, read and save it.
+ >
IF (Next _Ch = Plus) OR (Next_Ch = Minus) THEN
BEGIN
Get _Ch;
Sign := Ch;
WHILE Next_Ch = Blank DO Get _Ch;
END;
(+
Convert to REAL
+ >
WHILE Next_Ch IN Digit_Set DO
BEGIN
Get_Ch;
R := 10.0 #+ R + 1.0 + CORDCCh) - ORDCZero));
END;
49
BIT BUCKET
IF Sign = Minus THEN R := -R;
R_Int := R;
END; (+ Func R_Int +)
SVISIBLE ONS
(+
"УРРРРРРРРРЕРРРРРРРЕРРЕЕРЕРЕРРЕРЕЕ RT. AREA
*)
PROCEDURE Rdil CVAR I : INTEGER);
(+
Equivalent to Skip_to_Digit; READ (I)
*)
BEGIN (x Proc Rd! within 10 +)
I! := ROUNDC R Int 3;
END: C# Proc Rdl =)
1
( *
AZAR AA MI IIA AAA dle AAA dee
*)
PROCEDURE RdR CVAR R : REAL);
(*
Equivalent to Skip_to_Digit; READ (R)
*)
VAR
Divisor : REAL;
BEGIN (* Proc RdR within IO +)
R := R_Int; (+ Get the integer portion #)
IF Next _Ch = Decimal Point THEN
BEGIN
Get_Ch;
IF R< 0.0 THEN Divisor := -10.0 ELSE Divisor := 10.0;
(*
Now add the fractional portion
*)
WHILE Next_Ch IN Digit_Set DO
BEGIN
Get_Ch;
R := R + (ORD(Ch) - ORDCZero)) / Divisor:
Divisor := Divisor * 10.0;
END;
END;
END; (* Proc RdR +)
50
BIT BUCKET
EERIE IRI IRIE RAL ИГ РРРРРРРЕРРЕРРРЕРРРРРЕРРРРЕРЕРЕРЕРЕРЕЕР,
"PROCEDURE RdLn;
© Equivalent to READLN
E BEGIN <* Proc RdLn within 10 +)
Eoln := TRUE; (+ Get_Ch does the work on next call +=)
END; (+ Proc RdLn +)
(+ END SUBPROGRAM IO +)
An example is worth 1024 words. The following program shows a typical use of the procedures. It loads in 3 pages.
SRECURSIVE OFF, HEAP 0, RANGE OFFS
PROGRAM T;
С +
This program is an example of the use of the presented 10
scheme,
The user is prompted for two real numbers. The sum and
difference of the two numbers is output. This process
is repeated until the first number is zero.
+)
$INCLUDE ‘&I0INC’S C# Includes all suggested and REAL A and B +)
PROCEDURE WrtB (Buf : IO_Buffer; Length : Int); EXTERNAL;
PROCEDURE WrtR CR : REAL: Left, Right : Int); EXTERNAL;
PROCEDURE Wrtln; EXTERNAL;
PROCEDURE RdR (R : REAL); EXTERNAL;
PROCEDURE RdLn; EXTERNAL;
BEGIN
In_LU := 1; Out LU := 1; (+ Initialize the 10 +)
RdLn; Qut_Index := 1;
REPEAT (+ Request and display +)
WrtB C’ Please enter 2 numbers: _*, 26); Wrtlns
RdR (A): RdR CDB);
WrtR (А); MWrtR CB); MWriLn;
WrtB €’ The sum is “, 12); WrtR (A+B, 15, 6); MWrtln;
51
BIT BUCKET
WrtB (/ The difference is ’, 19); WrtR (А-В, 15, 6): Wrtln;
Wrtln;
UNTIL A = 0.0:
END.
After & 10 and &T have been compiled, creating %!0 and %T, the loader is run with the following commands:
LI,%I0
REL ,XT
EN
A sample run follows:
:RU,T
Please enter 2 numbers: 123.0 456.0
123.000000 456.000000
The sum is 579.000000
The difference is -333.000000
Please enter 2 numbers: Let's try -144.6 and 144.6, ok?
-144.600006 -144.600006
The sum is -289.200012
The difference is .000000
Please enter 2 numbers: How about 123456789 and
the number 3.14159
-123456784.000000 -3.141590
The sum is #3456784.000000
The difference is #3456784.000000
Please enter 2 numbers: - 50 and +16
-50.000000 16.000000
The sum is -34.000000
The difference is -66. 000000
Please enter 2 numbers: 0.0 , 456
. 000000 456.000000
The sum is 456.000000
The difference is -456.000000
With these procedures and the reader's own modifications, programs can be written which do formatted 10 to LUs only
resulting in programs which are about six pages smaller than if the standard Pascal/ 1000 procedures had been used. This size
reduction could easily make the difference between running on an L-Series or not. It is hoped that the trade-offs will be
adventageous and that these procedures will be put to good use. Happy Pascalling!!
52
BIT BUCKET
PASCAL ERROR TRAPPING AND REPORTING
by Jeffrey Hirschl/HP, Systems Technology
Organization, Fort Collins, CO
A problem facing the PASCAL applications programmer is how to trap FMP (File Management Package) errors which occur
when opening or otherwise accessing a file. Normally the Pascal run-time system handles errors by printing an error message
and terminating the program. This is fine if the error is not an FMP error, since a programming error is usually the cause. But an
FMP “error” in many cases is really a file status indication rather than an error. Where this is the case, aborting the program may
not be desirable at alll
Suppose, for example, we have a program that uses a sequential access file to store its control information. If the file doesn't
exist, we want the program to create and place some initial values into it. But opening the file with a RESET (to read it) will result
in a program abort if the file doesn't exist (FMP error —6). Using the FMP error trapping subroutine described below, the
program can trap the error and determine that it occurred. It can then issue a REWRITE to initialize the file.
In another case we may have a program which uses several files. If a file is unavailable because another program has opened it
exclusively, we may want to make an orderly cleanup and terminate. We may even want to delay and then try to open it again.
Here again, the FMP error trapping subroutine will inhibit Pascal normal error abort action and will inform the program that an
error (FMP error -8 in this case) occurred.
The FMP error trapping subroutine maintains a storage location where the error number of the last Pascal FMP error is kept. This
location contains zero if no error has occurred. The user's Pascal program obtains this error number by calling subroutine
ERTST (see the program listing for calling details). Each time ERTST is called, the FMP error storage is set back to zero so that
subsequent calls will send back a zero (no error) result until the next error occurs. ERTST is easy to call, requiring just one
external procedure definition and one variable definition. Therefore its impact on the user Pascal program is minimal.
The subroutine allows handling of non-FMP errors by printing a Pascal error message. Then if the error is not a “warning”, the
program is terminated. Using the provided subroutine as a guide and the information from Appendix B of the Pascal/1000
Reference Manual, the subroutine may easily be modified to trap and report other errors.
The package is designed to work on an “F” series processor and may require some modification to work on others.
A Pascal program showing examples of usage is provided. The program deliberately terminates with an error to demonstrate
how non-FMP errors are handled. Note the loading instructions given in this program as well as the subroutine package listing
very carefully. The error trapping package must be relocated before the Pascal library or system library are searched. If this is
not done, no error will be produced at load time, but the trapping routine will not work.
53
BIT BUCKET
ASMB,R,L,T
*
rk * * *% *% *
т + + * x + + »
NAM PSFMP Pascal FMP Error Handler 811007
HED Pascal FMP Error Trapping and Reporting
AA EA N
+ Pascal FMP Error Trapping and Reporting +
HEAR EEE HE #4
Author: Jeffrey S. Hirschl, STO, HP Fort Collins
Designed for "F" Type Processor
This subroutine package provides a means to trap and report FMP
errors arising out of Pascal file handling system calls.
If an FMP type error occurs, no error message is printed. A note
is made of the error for reporting to the user Pascal program upon
request.
If a non-FMP-type error occurs, a Pascal error message is printed,
just as would normally be done. Then if the error is not a "warning"
the program is terminated. If the error is a "warning", control
returns to the user Pascal program.
The package consists of two subroutines: @PREP, which replaces
the @PREP subroutine in the Pascal run-time library. ERTST, which
is called by the user Pascal program to determine if any FMP errors
have occurred. |
Further information on error handling can be found in Appendix B
of the Pascal/1000 Reference Manual, HP 92832-90001.
CAUTION - This routine must be loaded BEFORE the Pascal library is
searched when running LOADR. A loading example is:
RU LOADR
RE , XMYPROG Load user Pascal program
RE , XPSFMP Load error trapping routine.
SE Search libraries.
END
SKP
A A > 255552
+ @PREP +
A E...
This routine replaces the OPREP error handler in the Pascal run-time
library. It should never be called by the user Pascal program.
54
BIT BUCKET
Moe ale] EC
Museum
* The calling sequence for this routine may be found in Appendix B
+ of the Pascal/1000 Reference Manual.
*
+
ENT @PREP
EXT @PRER, .ENTR, EXEC
+
+
+ Storage for addresses of calling parameters (will be filled in
+ by .ENTR).
*
ARTYP BSS 1 “ERR TYPE' PARA ADDR.
ARNUM BSS 1 "ERR NUMBER' PARA ADDR.
ARLIN BSS 1 “ERR LINE' PARA ADDR.
ARFIL BSS 1 “FILENAME' PARA ADDR.
ARLEN BSS 1 “FILENAME LENGTH‘ PARA ADDR.
+
+
+
@PREP NOP SUBROUTINE ENTRY POINT.
*
JSB .ENTR GET PARA ADDRS AND SET
DEF ARTYP ENTRY POINT FOR RETURN.
+
LDA ARNUM,I STORE ERROR NUMBER.
STA ERNUM
+
L DA ARTYP,I GET ERROR TYPE.
CPA FMPER IS IT FMP?
JMP OPREP,I YES, RETURN.
+
+
* Here if we don’t have an FMP error. Copy calling parameters
* 50 that we can call @PRER. This will print a Pascal error message.
+ |
LDA ARTYA SET UP ADDRS FOR
LDB PRNTA “MOVE WORDS".
+
MVW =D5 MOVE 5 PARAS.
+
JSB @PRER PRINT Pascal
DEF «+6 ERR MSG.
+
PRNTE BSS 5 PARAS FOR EPRER CALL.
*
+
* If the error is a warning, return. Else terminate the program.
*
LDA ARTYP,I GET ERROR TYPE.
CPA WARN WARNING?
JMP @PREP,I YES, RETURN.
*
JSB EXEC NO, TERMINATE.
DEF *+2
DEF EXIT
+
+
* Constants and local storage.
55
BIT BUCKET
EXIT DEC 6
FMPER DEC 3
WARN DEC 5
ARTYA DEF ARTYP
PRNTA DEF PRNTE
+
ERNUM DEC 0
SKP
an FMP error occurred.
Pascal calling sequence:
TYPE
Error_Test (lerr);
Otherwise,
cleared.
zero.
+ 4 + + x x + x + x * &k * x x x %x x x * x & x x x * x x x *% xk x &k * A
ENT ERTST
+
* Storage
+
for IERR parameter
AIERR BSS 1
+
*
ERTST NOP
*
JSB . ENTR
DEF AIERR
+
LDA ERNUM
STA AIERR, I
4 4 4 4 44 4 4e 4 6 UE EE EE ER EH
+ Error Test Routine +
(EL EEE X= X= XL == + в
Single_Int: -32768..
If an FMP error has not occurred,
"EXIT" EXEC CODE.
FMP Pascal ERR CODE.
WARN Pascal ERR CODE.
ADDR OF ARTYP,
ADDR OF PRNTE.
ERR NUM STORAGE.
This routine is called by the user Pascal program to determine if
32767;
PROCEDURE Error_Test SALIAS ‘ERTST’
(VAR lerr: Single_Int); EXTERNAL;
zero will be returned in IERR.
the FMP error number will be returned in IERR.
When this routine is called, any FMP error is reported and then
Subsequent calls will yield a zero IERR result until
the next error actually occurs.
If the Pascal program is to be a restartable program, a dummy call
must be made to this routine at the beginning of the Pascal program
(after any calls to RMPAR) to initialize the FMP error storage to
If this is not done, any error remaining from a previous
run of the program will yield incorrect results.
address,
“IERR' PARA ADDR.
ENTRY POINT,
GET PARA ADDR AND
SET UP RETURN.
GET ERROR NUMBER
INTO IERR PARA.
56
BIT BUCKET
CLA CLEAR ERROR STORAGE.
STA ERNUM
*
JMP ERTST,I RETURN.
*
END
$Pascal ‘Pascal FMP Error Example’s
SRECURSIVE OFFS
PROGRAM TSFMP (OUTPUT);
{This routine provides an example of how the Pascal FMP Error trapping
and reporting routine is used.)
{The routine tries to open a file “XYZ. If successful, it reads
the message in the file and prints it. If not successful and the
error indicates the file doesn't exist, the routine creates it and
writes a message into it. If not successful for any other reason,
an error message is printed.)
iTo demonstrate the action with an error message other than "file
doesn’t exist, after the file is created try holding it open with
an editor while you run this routine.}
{NOTE: This program demonstrates what happens in the case of a non-FMP
error by trying to access file Ffile after it is closed. Thus it
deliberately exits in error.}
{To load:
RU,LOADR
RE, ZTSFMP Relocate this program.
RE ,ZPSF MP Relocate error trapper and reporter.
END
To run: RU,TSFMP,1 }
TYPE
Single_Int = -32768..32767;
VAR
Ierr: Single_Int;
Ffile: TEXT;
Fbuf: PACKED ARRAY [1..40] of CHAR;
PROCEDURE Error Test SALIAS ‘ERTST’S (VAR lerr: Single_Int);
EXTERNAL;
57
BIT BUCKET
BEGIN
Error _Test (lerr); {This is a dummy call to
Error_Test to ensure program
restartability.}
RESET (Ffile, 22XYZ2’); {Try to reset file.}
Error_Test (lerr); {Check for FMP error.}
IF Ierr < 0 THEN
BEGIN
WRITELN C Error opening **XYZ, FMP error *, lerr);
IF [err = -G THEN {If FMP error is "nonexistant
file", create the file.}
BEGIN
REWRITE CFfile, “22XYZ’);
Error_Test Clerr); {Test for error during REWRITE}
IF Clerr < 0) THEN
WRITELN C“Error creating **XYZ, FMP error *, lerr)
ELSE
BEGIN
WRITELN (‘Successfully created **XYZ”);
WRITELN CFfile, ‘This is a test file’)
END
END {IF Ierr = -6}
END {IF Ierr < 0}
ELSE
BEGIN
WRITELN (‘No FMP error opening Ffile’);
READLN (Ffile, Fbuf);
WRITELN (’Contents of file: *, Fbuf);
END;
CLOSE (Ffile);
Error_Test (lerr);
IF Clerr < 0) THEN
WRITELN (‘Error closing Ffile, FMP error *, lerr);
{Here we show what will happen with a non-FMP error. Note that
Ffile is no longer open so we will have a Pascal 1/0 type error.)
WRITELN CFfile, “This will cause error exit”)
END. (Program)
58
BIT BUCKET
MVDIR — THE CASE OF THE MOVING DIRECTORY
by John McCabe/HP Stanford Park Division
HOW WE CREATED THE PROBLEM
1.
2.
We had a 256 track disc LU in the pool
We allocated it as 250 tracks long.
AC,cr,G,250
We loaded lots of data on the disc. Everything seemed fine. The directory track was track number 249.
We added the disc LU to the group's session switch table, as we planned to use it for a while.
We did a new system generation. We did not redefine the disc track map.
After we switched to the new system we did a mount cartridge to the disc LU.
MC,lu,G
The system, knowing that the LU size was 256 tracks, used an old directory in track 255.
Since the system didn't know about the directory on track 249, we could not access any of our files. Things looked very
bad.
HOW WE SOLVED OUR PROBLEM
The following solution may not be the best one, but it worked. It does not require the use of any special utilities. It takes
advantage of the following:
The directory of cartridges contains the last track, and is on LU 2, not the cartridge LU. (The disc directory of files on the
cartridge is at the end of the cartridge LU).
LSAVE and RESTR dumps disc LUs to tape track by track, regardless of the location of the directory.
WRITT and READT backs up LUs treating the directory as something special.
1.
We did an LSAVE to store a copy of the disc to tape.
LSAVE, ,lu,,VE, title
We dismounted the disc.
DC,cr,RR
We reallocated the cartridge with the old number of tracks, 250.
AC,cr ,G,250,if
This wiped out all the data on the disc. This was ok.
59
BIT BUCKET
4. We restored the disc from the tape saved in step 1.
RESTR,,lu
This restored everything as it was before the switch to the new system. Our old directory on track 249 accessed all our old
files.
We wanted to move the directory from track 249 to track 255 so we could utilize the last 6 tracks on the disc and so this
same thing would not happen when we switched to another new system.
5. We used WRITT to back up the disc to tape.
WRITT,cr
6. We released the disc back to the pool.
DC,ecr ,RR
7. We used READT to restore the disc and move the directory from track 249 to track 255. We used the tape from step 5.
READT ,er, ,G,256
This moved the directory properly and everything is as it should be.
60
BIT BUCKET
HOW TO BUILD SYSTEM UTILITIES USING A DISC DIRECTORY AND
EDIT/1000 SUBSYSTEM
by Bob Gordon/Boeing Computer Services
Manipulating large numbers of disc files can be tedious and subject to errors. The traditional method is to construct a transfer
file or execute FMGR commands, one at a time, from the keyboard.
The disadvantages of this method are:
e Building transfer files is time consuming and tedious.
e Qld transfer files are kept laying around consuming valuable disc space because the user feels they can be re-used and/or
re-editted. After saving a half-dozen or so, the user forgets why the files were saved.
e Files are purged because the user needs to save disc space.
Our objective is to design and develop a utility from information provided by the system. It has to be easy to use, save disc
space, be able to be reused, and be available to all users.
Using the information contained in a disc directory, one could develop a whole family of utilities to manipulate disc files. The
question is, how can we do this automatically with minima! user intervention? By examining the characteristics of the Edit/1000
sub-system, one will note that Edit/1000 will perform automatic editing when used in the batch mode. This means the editor
receives its commands from a “command file” or from the edit “run string”. Hence, the editor does not have to stop between
each command. The command files are user developed, oriented for a specific task, written only once, and are reusable. The
result of this technique is a "back door” compiler. Every time one of the utilities is executed it compiles a set of FMGR
commands in the form of a transfer file. When the transfer file completes its execution it is purged from the system.
The advantages to this method are;
e It's available to all users (placed on LU 2/3 or any global cartridge).
New utilities can be developed from existing utilities.
Disc space is not consumed by unwanted transfer files.
e Has to be developed only once.
e Easy to use.
Re-usable
e Nospecial FORTRAN or ASSEMBLY LANGUAGE programs are required. (They could be used for more flexibility or special
applications)
e All software is designed around the disc directory.
The limitations are:
e More effective on large number of files.
e Limited to disc files.
61
BIT BUCKET
e Requires a reasonable knowledge of Edit/1000.
e All files must come from the same LU.
e File names cannot be re-named during the transfer process.
e Files with security codes may require more than one pass.
In outline form, the utilities are structured as follows:
e Request information from the user, e.g. LU.
e Create a temporary scratch file.
e Assign the scratch file as the list device.
e List the directory into the scratch file.
e User manually edits directory entries in scratch file.
e Edit/1000 converts contents of scratch file into FMGR commands.
e Executes “edited” transfer file.
e At termination the transfer file is purged from the system.
e List resulttrail on terminal.
In reviewing the utilities below, one will see that various embellishments can be made. This is the whole idea of the concept,
building off existing software to fit your needs.
REFERENCES:
HP Edit/1000 User's Guide part # 92074-90001 pages 2-35 through 2-44. EXTENT Utility written by Dave Markwald, Hewlett
Packard, Bellevue, WA.
FLOW CHART:
CARTRIDGE | — _ _ EDIT/
DIRECTORY 1000
Y
Y Y Y \
DISC TO DISC TO DISC TO PURGE COMPRESS OTHER
MAG TAPE CASSETTE DISC FILES FILE EXT USES
62
BIT BUCKET
The STORE FILES ON TAPE utility has been augmented with comments to explain the various steps. The other utilities are left
uncommented but are structured in a similar manner.
ARERR RRR ER RR RRR RR RR BREE RRR ЕЕ ЕЕ 38 NE SE 38 UHR 06H SA DE HA В 6 NE SE SE HE HE 06 56 IE HA HA Е 06 06 Е 8 IE IE 0 ME IE dE HA HA DE IE HE NE ME SE HE HE
HU UUU4# UT [I LI TI EGS #2aastaaasttattttttsttttstssssss
RRR RRR RRR REAR RRR RARER RRR RRR RRR RRR RRR R RRR RRR RRRRERERR RARER RRRE BARRA RRRERRRRRS
3 LEE STORE FILES O N T APE HEHE + +
eee Ae operator instructions-
:DP,> THE NAME OF THIS UTILITY IS *"+=STT%,
:DP,> WRITE DISC FILES ON MAGNETIC TAPE.
:DP,> TWO TRANSFER FILES ARE GENERATED FROM THIS UTILITY.
:DP,> THESE TRANSFER FILES ARE DERIVED FROM A USER SELECTED CARTRIDGE
:DP,> DIRECTORY. ONE TRANSFER FILE IS USED TO WRITE THE OTHER TRANSFER
:DP,> FILE ON TAPE AS FILE ONE, FOLLOWED BY THE USER FILES.
:DP,> THE FIRST FILE ON TAPE [IS USED AS A DIRECTORY WHICH WHEN READ IN
:DP,> AND EXECUTED AS TRANSFER FILE WILL READ IN THE REMAINING FILES
:DP,> FROM TAPE. EACH FILE TRANSFERRED HAS THE SAME NAME AS ITS SOURCE
:DP,> FILE. THE CONTENTS OF FILE ONE ARE DISPLAYED ON LU 1.
:DP,> THIS UTILITY CAN TRANSFER DATA TO ANY CONVENTIONAL NON-DISC LU.
:DP,> NOTE THAT THIS UTILITY WAS DESIGNED FOR MAGNETIC TAPE.
:DP,> THE TAPE FORMAT IS WRITTEN USING FMGR “ST” COMMAND AND
:DP,> USES THE DEFAULT FORMAT OF THE “ST” COMMAND.
: ОР, >
:DP,> CALLING SEQUENCE:
DP,>
:DP,> STEP 1 (TYPE) ::#STT (RETURN)
:DP,> STEP 2 :SE,l1u1,1u2 (RETURN)
:DP,> STEP 3 : : (RETURN)
РР, >
:DP,> Where LU1 is the SOURCE LU, the cartridge containing the directory
:DP,> list. LU2 is the DESTINATION lu, usually set to a non-disc lu,
:DP,> such as LU 4,5,8,....
DP,>
:DP,> EXAMPLE:
:DP,> ::#STT (RETURN)
:DP,> :SE, :12,8 (RETURN)
: DP,> +: (RETURN)
:DP,>
:DP,> ASSUMPTION: USER IS FAMILIAR WITH THE PAGE EDITOR.
РР, >
: ОР, > THIS UTILITY WILL STAY IN THE EDITOR TO ALLOW THE USER TO
:DP,> CUSTOM EDIT THE "TRANSFER FILE", USUALLY DELETING THOSE
:DP,> DIRECTORY ENTRIES THAT YOU DO NOT WISH TO TRANSFER TO MAG
:DP,> TAPE.
:DP,>
:DP,> YOU MUST HAVE CAPABILITY OF 40 OR MORE TO EXECUTE THIS UTILITY.
DP,>
:DP,> MOUNT TAPE WITH WRITE RING.
63
BIT BUCKET
PAUSE
CN,16 ¡
2 PU, X::12 {---> housekeeping to make sure temporary file doesn’t exist.
PU,Y::12 :
же = == = = = = = = = = = = = = — — {
в СК, У: : 12:4: 256 ----> create a temporary scratch file.
НБ, У: : 12 ----> declare Y as the list device.
:DL,26 ----> copy directory into scratch file.
LL, 1
: DP ,> CUSTOM EDITING CAN NOW BE DONE,IF DESIRED,
:DP,> TYPE A COLON AND (RETURN) TO PROCEED.
: PAUSE
: RU,EDIT,Y::12,TR,STT0/ ----> edit command file STTO deletes BLKS &EXTENTS
:RU,EDIT,Y::12,1/1LN9999:1/ --> list directory, let user edit file.
:DP,>
DP,> «+saxaaaa END OF CUSTOM EDITING #—————————.
: ОР, >
:ST,Y::12,X::12 --> create second transfer file Cused to copy files to tape).
:RU,EDIT,Y::12,TR,STT1/ --> creates tape xfer file 1. STT1 is the command file
:RU,EDIT,X::12,TR,STT2/ --> creates xfer file to write files on tape with STT2
: RU,EDIT,Y::12,$/1CII:TRIER 1---> housekeeping to close transfer files.
КО, ЕР1Т,Х: : 12 ,$/ 5 СЕТ: ТКРЕК |
ST, Y::12,26 ----> write tape directory as file one on tape.
:SE,26,16,36 ----> set up the globals for X transfer file.
3:X::12 ----> write files on tape.
LI, Y::12 ---> list the contents of file one on terminal.
:PU,X::12 !----> purge temporary files from tape.
PU, Y::12 1
:CN,26 ----> rewind tape.
: SE
:DP,> «taa 2n. .2=na2a... END OF TRANSFER «++2=e=m.name.. .as
:SV,0,,IH
64
BIT BUCKET
RRRRRR RR RR RRR RRR RRR RAR RRR RRR RRR RRR RR RRR RRR RR RAR RRR RRR RAR RRB RRRRRRRRRRR ARRAN RS
ananananananenaataa E DIT COMMAND F ILES #8422228 8228000088ann0as
++ + + RRR RRR RRR RR RRR RR RRR RRR RRR RRR RRR RRR RRR RRR RAR ARR RRR RRB RRR RRR RRR RRR RRRRRRRRRN
IT IS ASSUMED THAT THE READER IS FAMILIAR WITH THE DIRECTORY FORMAT.
#+t##.. STTO DELETES ALL OCCURANCES OF “BLKS” AND EXTENTS sasssssssaanaass
SEREON ----> set regular expression mode.
18 D/BLKS/AQ/ ----> deletes all occurances of the string "BLKS“,
1$ D/\+[0-9]+ +$/AVQ/ ---> deletes all occurances of any extents lines.
ER
*#### STT1 COMPILES TRANSFER FILE OF “ST” COMMANDS, FOR TAPE DIRECTORY. «+++
SEREON ----> set regular expression mode
1 ----> go to line 1
1:5V,4, ,IH ----> insert this command at line 1 in transfer file.
1$ Х/ +{[^ ]+*} #0<4>{[1-7]+}@/:ST,1G,&1::2G:&2:-1/Q/ ---> create FMGR commands
from directory. Name, length, and type are substituted into ST string.
:SV,4,,IH
1
MSTT3 ----> merge operator instruction into transfer file
$ ----> go to end of edit file.
== == == == == == = = = wm = = — 3
+CN, 16 !
: SE 1---> insert these files at end of file.
:SV,0,,IH b
«+... STT2 COMPILES TRANSFER FILE OF “ST” COMMANDS,WRITES FILES ON TAPE. «+=..
SEREON ----> set regular expression mode.
1$ Х/ +{[^ ]+} +0<4>{[1-7]+} +0+{[^ ]+#}@/:ST,&1::26:82:8&3,1G/Q/ ----> create
the FMGR ST commands from directory using the name, length, and type.
ER
xauu STT3 USERS INSTRUCTIONS FOR FILE ONE ON TAPE. at...
THIS IS THE OPERATOR INSTRUCTIONS ON HOW TO READ FILES FROM
TAPE. IT CAN BE MODIFIED TO USERS NEEDS.
65
BIT BUCKET
:DP,> THIS UTILITY WILL TRANSFER FILES FROM SOURCE LU CI.E. MAG TAPE)
:DP,> TO DESTINATION LU (I.E. DISC), THEREFORE THE USER MUST ENTER
:DP,> THE SOURCE AND DESTINATION LU.
:DP,> EXAMPLE: ASSUME THE MAG TAPE LU IS 8 AND THE DISK LU TO RECEIVE
:DP,> THE TAPE FILES IS 12. THEN ENTER AS FOLLOWS:
:DP,> :SE,8,12(RETURN)
:DP,> ::(RETURN)
: PAUSE
:CN,1G
:CN,1G,FF
:SV,0,,IH
«..... PRS1 CREATES A TRANSFER FILE TO COMPRESS FILES WITH EXTENTS +++
SEREON ----> set regular expression mode..
1$,D/BLKS/AG/1ER ----> delete all occurances of the string "“BLKS".
1¢,D/\+001+ +#$/AQ/IER ----> deletes all extent lines.
1$,X/ *T[* Je} +{[^ Je} +{[^ ]+} +{[^ ]*} +{[^ J+}@/::#EXTS,&1,&5,3G/Q/-->
create a transfer file to compress extents using a nested utility.
ER
ЕЕ Ех
a.........e.e.....2.. E ND OF COMMAND FILES РРР,
UE EEE EU EEE EE EEE EEE ED EE EEE EE EE EE EE EEE EEE
66
BIT BUCKET
sanrnnnnere TR ANS FER FI LES FROM crn TO сгТ +++ + +++ + ан + ++ +
:SV,4,,IH
:DP,> THE UTILITY NAME IS "'«+STORE",
:DP,>
«+DP,> THIS UTILITY WILL GENERATE A TRANSFER FILE WHICH WILL COPY
:DP,> SELECTED FILES FROM ONE DISC CARTRIDGE TO ANOTHER DISC
:DP,> CARTRIDGE. THE TRANSFER FILE IS COMPILED FROM THE DIRECTORY
:DP,> ENTRIES AND CONVERTED TO FMGR STORE COMMANDS CST).
:DP,>
:DP,> CALLING SEQUENCE
:DP,>
+DP,> :+#STORE Followed by :SE,lu1,lu2 followed by :(RETURN).
:DP,>
:DP,> EXAMPLE: : «STORE
:DP,> :SE,12,13,sc
:DP,> : : (RETURN)
:DP,> Where 12 is source LU, and 13 is the destination LU.
:DP,> sc is the security code to be written on lue.
:DP,> ASSUMPTION: USER IS FAMILIAR WITH PAGE EDITOR.
:DP,>
:DP,> YOU MUST HAVE A CAPABILITY LEVEL OF 40 OR MORE TO EXECUTE THIS
:DP,> UTILITY.
:DP,>
:DP,> THIS UTILITY WILL STAY IN THE EDITOR TO ALLOW THE USER
:DP,> TO CUSTOM EDIT THE TRANSFER FILE. DELETING THOSE
:DP,> DIRECTORY ENTRIES THAT YOU DO NOT WISH TO TRANSFER.
: PAUSE
: PK, 2G
:PU,S....G::12
:CR,S....G::12:4: 256
LL,S....G::12
:DL,16
:LL,1
:DP,> CUSTOM EDITING CAN NOW BE DONE,IF DESIRED.
:DP,> TYPE A COLON AND (RETURN) TO CONTINUE.
: PAUSE
:RU,EDIT,S....G::12,TR,STT0/
:RU,EDIT,S....G::12,1/1LN9999; 1/
в ОР, >
.ensrecos END OF CUSTOM EDITING ==uv......
:RU,EDIT,S....G::12,SEREON: 1$,X/ #{[®* ]J#}@/:ST,&1::1G,&1:3G:2G,/Q/iER
:RU,EDIT,S....G::12,$/1C{I:TRIER
S
.G::12
:PU,S....G::12
: DL, 26
: SE
ОР, ++#————.... END OF FILE TRANSFER ##—#. ууу уу ру у +
:SV,0,,IH
67
BIT BUCKET
* e +
:5V,4,
:DP,>
: ОР, >
: DP,>
:DP,>
:DP,>
:DP,>
:DP,>
:DP,>
: ОР, >
: ОР, >
: ОР, >
: ЭР, >
: ОР, >
: ОР, >
: ЭР, >
: ОР, >
{ ОР, >
: ОР, >
: DP ,>
:DP,>
:DP,>
:DP,>
:DP,>
:DP,>
: PAUSE
+PU,S.
:CR,S.
:LL,S.
:DL,1G
sLL,1
: ОР, >
; ЭР, >
+44 48808 PURGE FROM CARTRIDGE UHGUGEEEEE EEE EE 546644
‚IH
THE NAME OF THIS UTILITY IS "+PURGE"
THIS UTILITY WILL PURGE A SET OF USER SELECTED FILES, FROM DISC,
BY EDITING THE DIRECTORY, CONVERTING THE DIRECTORY ENTRIES TO
A TRANSFER FILE CONTAINING PURGE COMMANDS. AFTER THE TRANSFER FILE
IS EXECUTED THE DISC CARTRIDGE IS PACKED.
CALLING SEQUENCE
: «PURGE Followed by :SE,lu,SC followed by :(RETURN).
EXAMPLE: : : «PURGE
:SE,23,5c Where 23 is cartridge containing the files to
be purged, SC IS THE SECURITY CODE IF REQUIRED.
: : (RETURN)
ASSUMPTION: USER IS FAMILIAR WITH PAGE EDITOR.
THIS UTILITY WILL STAY IN THE EDITOR TO ALLOW THE USER
TO CUSTOM EDIT THE "TRANSFER FILE". DELETING THE DIRECTORY ENTRIES
OF THE FILE YOU DO NOT WISH TO PURGE.
YOU MUST HAVE CAPABILITY OF 40 OR MORE TO BE ABLE TO EXECUTE
THIS UTILITY.
‚. «Р: 12
...P::12:4:256
.…..P::12
ANY CUSTOM EDITING CAN BE DONE NOW,IF DESIRED,
IF NOT,OR TO RESUME, ENTER "ER",
RU, EDIT,S....P::12, TR,STTO/
:RU,EDIT,S....P::12,1/1LN999911/
:DP,
+....e oo. END OF CUSTOM EDITING ««.=eaas.s. es
:RU,EDIT,S....P::12,SEREON:1$,X/ #{[* ]+#}@/:PU,&1:2G:1G//1ER
:RU,ED
t:S...
: PU, S.
:DL,1G
:DP, +
: SE
:SV,0,
IT,S....P::12,$/1C{I:PK,1G{I:TRIER
P::12
-..P::12
, XX ----> WHERE XX IS YOUR MASTER SECURITY CODE.
+++##+#.. END OF PURGE +++ + + а жж бобр ржу
‚IH
68
BIT BUCKET
Computer
Museum
tananaaraaatatar COMPRE SS EXTENTS + 4 + 4 4 4 #4 4 4 6 4 44 4 4 EN ENTREN ENES
: 5У , 4, ‚ 1Н
:DP,> THE NAME OF THIS UTILITY IS "aPRESS“,
:DP,>
:DP,> THIS UTILITY WILL COMPRESS EXTENTS IN A SPECIFIED CARTRIDGE. USES
:DP,> CARTRIDGE DIRECTORY LISTING TO BUILD A SET OF COMMANDS TO COMPRESS
:DP,> ANY OR ALL EXTENTS THAT MAY APPEAR IN A GIVEN CARTRIDGE. THIS PROCESS
:DP,> ALLOWS THE SYSTEM TO RECLAIM UNUSED SPACE ON THE SPECIFIED
:DP,> CARTRIDGE.
:DP,>
+DP,> CALLING SEQUENCE:
:DP,>
:DP,> STEP 1 (TYPE) :+PRESS (RETURN)
:DP,> STEP 2 :SE,lu1 (RETURN) (CARTRIDGE TO COMPRESS EXTENTS)
:DP,> STEP 3 : (RETURN)
:DP,>
:DP,> Where lu! is the LU to compress EXTENTS.
:DP,>
:DP,> EXAMPLE:
:DP,> : : #PRESS (RETURN)
+DP,> ::SE,12 (RETURN)
:DP,> CRETURN)
: DP,>
:DP,> ASSUMPTION: USER IS FAMILIAR WITH THE PAGE EDITOR.
:DP,>
:DP,> YOU MUST HAVE CAPABILITY OF 40 OR MORE TO EXECUTE THIS UTILITY.
:DP,>
:DP,> IF THERE ARE NO EXTENTS IN THE CARTRIDGE, THEN THE UTILITY
:DP,> WILL STOP IN THE EDITOR; ENTER ‘ ER AND return’ TD CONTINUE.
:DP,> THE CONTENTS OF THE CARTRIDGE ARE NOT CHANGED IF THIS CONDITION
:DP,> EXISTS. THIS IS AN EDIT CONSTRAINT.
: ОР, >
: PAUSE
PU, Y::12
: СВ, У: : 12: 4; 256
LL, Y::12
DL, 1G, XX
:LL,1
: RU,EDIT,Y::12,TR,PRS1/
:RU,EDI
:CA, 3,1
::Y::12
:SV,4,,
: PK, 3G
:PU,Y::
: DL, 36
: SE
:DP,>
T,Y::12,$/{CII:TRIER
G
IH
12
+ 4 4 #4 #4 4 4 4 4 4 6 4e 8 #1 RH END OF COMPRESSION «=asn.na.e.m.eo
:Sv,0,,IH
69
BIT BUCKET
+.*..a.ataotaanatana DE LETE EXTENTS anartararatarfttaAaCATRATRATANATANEE
(This is nested into utility +PRESS)
:SV,4,,IH,*+=+ FILE EXTENTS DELETE FEB. 1982 D. MARKWALD NSR-BELLEVUE
++
+. TR, +*+EXTS ,FILE NAME,SC,CRNE ,NEWN SC]
{:** OR : KEXTS,..Q.ornenacsaooaoaoaoanoanoo
: ##
+++ GLOBAL USAGE
XX 1G - FILE NAME
cae 2G - ORIGINAL FILE SECURITY CODE
ож + 36 - CRNC+) OR LUC-)
can 4G - OPTIONAL NEW FILE SECURITY CODE
can EP - CURRENT FMGR ERROR
:## -24P 4G’S TYPE
a.
IF,-24P,GT,0,1
: CA,4,2G
++ DP, 16,26,36,46,-249P
:CA,6:P,0
: PU, I TMPEX: 26:36
:IF,EP,EQ,0,1
:1F,6P,NE,-6,9
:CA,6:P,0
: PU, I TMPEX: 46: 36
:IF,6P,EG,0,1
IF,6P,NE,-6,4
: CA,6:P,0
:ST,1G:2G:3G,)TMPEX: 4G:3G::-1
: IF,6P,EQ,0,4
: PU, ITMPEX: 46:36
: PU, ITMPEX: 26: 36
: DP , +EXTS FMGR ERROR
: CA,6:P,0
PU, 16G: 26: 36
IF ,6P,NE,0,-7
RN, ITMPEX: 46: 36,16
: SE
:SV,0,,IH
70
BIT BUCKET
RRR RRR RRR RRR RRR RRR RRR RRB RRR ERR RRR RRR RRR EEE RE ER BRR RB RB RRR BRR RRRRRREB NERA 3 4
sasnasnnnrnnnsnnasnnnnnsnane EXAMPLE TRAIL OF "2PRESS! #4422222 24252282585 8808000
BRR RR RRB R RRR ERR RRR BERBER BR BERR RR ERR RRR BARR RRR R RRB RB RRR RRR RRR RRBRRRRR EERE RRRRS
The following text is what one would see on the CRT during execution of
this utility.
: «PRESS
THE NAME OF THIS UTILITY IS *“«PRESS".
THIS UTILITY WILL COMPRESS EXTENTS IN A SPECIFIED CARTRIDGE. USES
CARTRIDGE DIRECTORY LISTING TO BUILD A SET OF COMMANDS TO COMPRESS
ANY OR ALL EXTENTS THAT MAY APPEAR IN A GIVEN CARTRIDGE. THIS UTILITY
ALLOWS THE SYSTEM TO RECLAIM UNUSED SPACE ON THE SPECIFIED
CARTRIDGE.
CALLING SEQUENCE:
STEP 1 (TYPE): +PRESS (RETURN)
STEP 2:SE,1lu1 (RETURN) (CARTRIDGE TO COMPRESS EXTENTS)
STEP 3:(RETURN)
Where lui is the LU to compress EXTENTS.
EXAMPLE:
:: «PRESS CRETURN)
::SE, 12 CRETURN)
+ : (RETURN)
ASSUMPTION:USER IS FAMILIAR WITH THE PAGE EDITOR.
YOU MUST HAVE CAPABILITY OF 40 OR MORE TO EXECUTE THIS UTILITY.
IF THERE ARE NO EXTENTS IN THE CARTRIDGE, THEN THE UTILITY
WILL STOP IN THE EDITOR; ENTER 7 ER AND return” TO CONTINUE.
THE CONTENTS OF THE CARTRIDGE ARE NOT CHANGED IF THIS CONDITION
EXISTS.
VV мм Мом ом мм м М мм М ММ м м ом Мм М МУ М м М мм м ММУ
: PAUSE
+: SE, 32
71
BIT BUCKET
SET UP YOUR 2608 LINE PRINTER
by Linnea L. Fort/Central Iowa Power
Co-op, Cedar Rapids, ID
This program deals with the HP 2608 line printer using driver DVB12 and is run on an HP 1000 computer.
SETPR PROGRAM
This program sets up the 2608A line printer to the operator's specifications. It will:
set or clear "auto page eject”
set lines per inch (6 or 8)
set paper length (in inches)
set vertical margin
set horizontal margin
set normal or double size print
о о А © №
The program lists defaults at beginning of program. To default any parameter, hit return key.
To inhibit top-of-page on your 2608A printer, clear “auto page eject”.
The printer will remain set to the specified parameters, until:
1. power on switch on 2608A printer is turned off
2. boot-up
3. reset button on 2608A printer is pushed
4. re-run SETPR program
This program comes in handy for legal sized forms or any form that is not 11 inches in length. Inhibiting T-O-P comes in handy
for printing labels. Resetting horizontal margins comes in handy for vertically perfed paper where your 1st column starts to the
left of that perforation. The applications are merous.
This program can be put in your WELCOM file, if it is to be used a lot.
FTN4,L
C
PROGRAM SETPR
С
С
С 05/07/81 RTE-1VB LINN FORT - CIPCO
C REVISED / 1
С
С SOURCE - SETPRS::CR
C RELO - SETPRR::CR
С
С COMPILE: RU,FTN4,SETPRS::CR,6,SETPRR::CR
C LOAD: RU,LOADR, ,SETPRR::CR, ,NL
76
BIT BUCKET
C
C THIS PROGRAM SETS UP THE PRINTER TO OPERATOR’S SPECIFICATIONS.
C
C (1) SETS OR CLEARS AUTO PAGE EJECT
C (2) SETS LINES PER INCH
С (3) SETS PAPER LENGTH
C (4) SETS VERTICAL MARGIN
C (5) SETS HORIZONTAL MARGIN
C (6) SETS DOUBLE SIZE PRINT
C
C TO RESET PRINTER TURN POWER SWITCH OFF, THEN ON OR RE-BOOT
C
DIMENSION IBUFAC127) ,MARG2C16)
C
DATA MARG2 /00B,
1 01B,
1 02B,
1 03B,
1 04B,
1 05B,
1 06B,
1 07B,
1 10B,
1 11B,
1 12B,
1 13B,
1 14B,
1 15B,
1 16B,
1 17B/
C
ILU=6
ILPI=6
ALNGTH=11.0
MARGIN=6
IMARG=1
C
C===assssss ss Ss EEaE ESSE ERS SIE EE EEE ESET E EER FEN EEEEESEEEREEESREEESR
WRITEC1,1)
1 FORMATC//"THIS PROGRAM SETS PARAMETERS ON THE 2608A LINE",
1'* PRINTER", // ,5X,'"DEFAULTS ARE:",//,
1 7X, "PRINTER LU = 6",/,
1 7X, "AUTO PAGE EJECT = SET",/,
1 7X, "LINES PER INCH = 6",/,
1 7X, "PAPER LENGTH = 11 INCHES",/,
1 7X, "VERTICAL MARGIN = G“,/,
1 7X, "HORIZONTAL MARGIN = 1",/,
1 7X, “PRINT SIZE = NORMAL")
С...
5 WRITEC1,10)
10 FORMATC// , "ENTER PRINTER LU ? _")
C
READ(1,#) ILU
С...
15 WRITEC1,20)
20 FORMATO AUTO PAGE EJECT (SET OR CLEAR) ? _"™)
C
READC1,25) [AUTO
25 FORMATCA2)
77
BIT BUCKET
C
IFCIAUTO.EQ.2H >» IAUTO=2HSE
C
IFCTAUTO.NE.2HSE .AND. TAUTO.NE.2HCL) GO TO 15
С...
30 WRITEC1,35)
35 FORMATC"ENTER LINES PER INCH C6 OR 8) ? _“)
C
READC1,+#) ILPI
C
IFCILPI.EQ.6) ILINE=000B
IFCILPI.EQ.8) ILINE=200B
C
IFCILPI.NE.6 .AND. ILPI.NE.8) GO TO 30
C
IFCIAUTO.EQ.2HSE) WRITEC1,40)
40 FORMAT(ENTER PAPER LENGTH CIN INCHES) ? _'")
C
IFCIAUTO.EQ.2HSE) READC1,*) ALNGTH
С.
IFCIAUTO.EQ.2HSE) WRITEC1,50)
50 FORMATC"ENTER VERTICAL MARGIN LINES ? _")
C
IFCIAUTO.EQG.2HSE) READC1,+) MARGIN
С...
75 WRITEC1,80)
80 FORMAT("ENTER HORIZONTAL MARGIN (1-16) ? _"
C
READC1 ,+) IMARG
С
IFCIMARG.LT.1 .OR. IMARG.GT.16) GO TO 75
С...
85 WRITEC1,90)
90 FORMATC""NORMAL OR DOUBLE SIZE PRINT ? _")
С
READC1,25) ISIZE
IFCISIZE.EQ.2H >) ISIZE=2HNO0
IFCISIZE.NE.2HNO .AND. ISIZE.NE.2HDO) GO TO 85
С
Созоовон зоол нон оно р оо олово ворона р аз ааа
С *
С COMPUTE ALL FACTORS *
С »
CHEAT LEHNEN NN NN
С
С
С COMPUTE LINES PER PAGE
С
LPPAG1 = ALNGTH + ILPI
С
С LINES PER PAGE CANNOT EXCEED 127
С
IFCLPPAG1.GT.127) GO TO 5
С
С COMPUTE PRINTABLE LINES
С
LPPAG2 = ALNGTH *+ ILPI - MARGIN
С
С MAKE SURE PRINTABLE LINES IS = OR « O
78
BIT BUCKET
OOo 000 000 © О О О © OOO
Oo
100
200
Computer
Museum
IFCLPPAG2.LE.1) GO TO 5
FIGURE IBUFL
IBUFL = ILINE + LPPAGH
SET UP IBUFA BUFFER FOR PRINTER
"TOP-OF-PAGE" SWITCH
IBUFAC1) = 5B
“PRINT ON THIS LINE" SWITCH
DO 100 Ix2,LPPAG2-1
IBUFACI) = 4B
CONT INUE
"BOTTOM LINE" SWITCH
IBUFACLPPAG2) = EB
“DON'T PRINT ON THIS LINE" SWITCH
DO 200 I=LPPAG2+1,LPPAGI
IBUFACI) = OB
CONTINUE
| SET UP 2608A PRINTER
CALL EXECC2,1000B+ILU, IBUFA, IBUFL)
CALL EXECC3,2100B+ILU,MARG2CIMARG))
IFCISIZE.EG.2HDO) CALL EXECC3,3000B+ILU,1)
IFCISIZE.EQ.2HNO) CALL EXECC3,3000B+ILU,0)
IFCIAUTO.EQ.2HCL) CALL EXECC3,1100B+ILU,65)
IFCIAUTO.EG.2HSE) CALL EXECC3,1100B+ILU,64)
END
ENDS
79
BIT BUCKET
1351A GRAPHICS GENERATOR WITH A 21MXM COMPUTER IN RTE-IVB
K.H. Kitching, J. Robinson/Canadian Forces Maritime
Nanoose, British Columbia
The first introduction to any graphics system is to draw something on the screen to establish communication with the device. In
our case it consisted of a Mexican hat containing 740 vectors. Our first experience was extremely disappointing since although
the control language is relatively simple and easy to learn, and the commands do exactly what the book says they should do, it
took 15.8 seconds to draw the picture. The following article outlines procedures which have been adopted to improve this
performance to the point where even an M series computer can draw the picture in .6 seconds.
The most important thing to learn is that groups of instructions should be pre-packaged into an array in computer memory and
then transmitted as a block to the graphics generator. This reduced the time consumed from 15.8 to 6.3 seconds. The time
saved was entirely consumed in handshakes between the graphics generator and the computer. The next major step forward is
to use the sub-routine “CNUMD” to convert numbers to ASCII in lieu of the formatter. This further reduced the time required to
draw the picture from 6.3 seconds to 2.0 seconds. The final maneuver which can only be used for static information is to
pre-package the ASCII command string in a disc file. The total time required to open the file and transmit the picture to the
screen was .6 seconds.
One final point to remember is that the graphics generator receives its information on the |EEE-488 interface bus and the
configuration of this bus can affect the presentation and the time consumed. When transmitting the picture from an ASCII disc
file, the visual presentation is instantaneous if the bus is configured for direct memory access. The picture takes a visible
fraction of a second to appear if the bus is configured without direct memory access. Configuring the bus for DMA can be
accomplished from the file manager as follows:
:CN,LU,25B,37000B
Further experimentation showed that the bus should not be configured for DMA when the vectors are being transmitted
individually. In this case it raised the total time from 15.8 to 18.4 seconds, obviously considerably complicating the transmission
protocols.
DESIGN OBJECTIVES OF A FILE SYSTEM
Our computer system is used to control a real time test environment using 3 electronic counters, a signal synthesizer, an
arbitrary waveform generator and a 96-channel multiplex A/D converter. It also uses a 5451B Fourier Analyzer as a satellite.
Displays on the graphics generator are scheduled by event, by time, by operator control, and by request from the satellite. The
variety of displays is evolving rapidly. it soon became apparent that some system was required to make the file structure of the
graphics translator transparent to the operator and the programmer. The best approach would be to allow the system manager
to experiment with different file configurations without requiring any of the display generating programs to be recompiled. All of
these objectives were achieved by use of a program which is scheduled by each program desiring to display on the graphics
generator. The calling program defines by parameters what it requires and the “son” returns a parameter string defining the file
number, the number of files in the group assigned and the start location of each file assigned. In our current system the file
structure is related to the functions by the system manager. A fairly simple extension of this system would allow the computer to
make dynamic allocations similar to the current RTE partition allocations.
A control program has been written for the operator which allows him to define which pattern will be displayed on any or all
graphics screens. This control program determines the file structure by scheduling the “son” and displays, inhibits, or erases
the appropriate file or group of files by an operator function definition without the operator being aware of the file structure or
even necessarily that there is a file structure.
80
BIT BUCKET
A FAST SUBROUTINE
To illustrate these principles first is a subroutine for plotting a prescaled array. This subroutine transmits a prepackaged array
without using the formatter. The integer array to be plotted consists of NUM points each defined by a prescaled x and y pair.
FTN,L
CaKKs
C
C
С
OOO
© © ©
000
OOO
000
10
20
SUBROUTINE VLINCIFL,IAR,NUM), PLOT LINE VECTOR GRAPHICS 811209.1308
PLOT AN ARRAY ON THE 1351A GRAPHICS GENERATOR
IFL DEFINES THE START LOCATION IN GRAPHICS TRANSLATOR MEMORY
IAR IS A PRESCALED ARRAY OF XY POINTS
NUM 1S THE NUMBER OF VECTORS IN THE ARRAY LIMITED BY IQUT TO 100
DIMENSION IARC2,NUM), IBUFCOE), IBFC3), IOUTC613), IFMTC19)
DATA IFMT/*:FL , :PEO, :PA , ;:PE1,:PA"/
ENCODE THE START LOCATION
CALL CNUMDCIFL,IBF)
IFMTC3)=IBF C2)
IFMTC4)=IBFC3)
ENCODE THE FIRST POINT TO BE PLOTTED WITH PEN UP
CALL CNUMDCIARC1,1),IBF)
IFMTC10)=IBFC2)
IFMTC11)=IBFC3)
CALL CNUMDCIARC2,1),IBF)
IFMTC13)=IBFC2)
IFMTC14)=IBFC3)
STORE THE ENCODED STRING IN THE ARRAY FOR LATER OUTPUT
DO 5 N=1,19
IQUTCN2I= IFMTCN)
KK=19
ENCODE THE REST OF THE ARRAY TO BE PLOTTED WITH PEN DOWN
IBUFC3)=2H,
IBUF(B)=2H;
DO 20 N=2,NUM
CALL CNUMD(CIARC1,N), IBF)
IBUFC1)=IBFC2)
IBUF (2) = I BF (3)
CALL CNUMDCIARC2,N),IBF)
IBUFC4)=IBF C2)
IBUFCS)=IBFC3)
DO 10 M=1,6
IOUTCM+KK)=IBUF CM)
KK=KK+6
CONTINUE
PASS THE ENCODED ARRAY TO THE GRAPHICS TRANSLATOR FOR PLOTTING
CALL EXEC(2,23,I10UT,KK)
END
81
BIT BUCKET
A TRANPARENT FILE SYSTEM
Next we present the program VFL which on a menu basis allows initialization and control of the graphics translator.
FTN4,L
PROGRAM VFL(3,99), 811209.1308
C++JR+ CONTAINS VECTOR GRAPHICS FILE STRUCTURE AND ALLOCATION
C
С PERIPHERALS. VECTOR GRAPHICS SYSTEM 1351A WITH TWO DISPLAYS.
С 1317A AND 1311B.
С
С
C PARAMETERS. 1 -1 FOR NO OUTPUT ТЕХ
С 2. MENU ITEM 1 VM
С 3. DISPLAY MENU IDM
С 4
С 5 SEARCH VALUE
С
C FILE CONFIGURATION IS LOADED INTO COMMON 201 AT INITIALIZATION
C
C DATA IVF PARAMETERS. FILE NUMBER, STARTING LOCATION, MENU ITEM, MNEMONIC
C IvMm IS POSITION IN THE MENU LIST
C IDM IF THE FUNCTION MENU ITEM
С
С
DIMENSION IVFCE6E8),IPC5),IARCIO00)
DATA IVF/1, 1, 1,2HSS,
2 2,1001, 2,2HHD,
3 3,1601, 3,2HI1,
4 4,2601, 3,2HI?2,
5 5,3201, 6, 2HWF,
6 6,7201, 4,2HD1,
7 7,7401, 4,2HDZ2,
8 8,7501, 4,2HD3,
9 9,7001, 5,2HF1,
A 10,7801, 5,2HF2,
B 11,7901, 5,2HF3,
С 12,8001, 9,2HT1,
D 13,8046, 9,2HTZ2,
E 14,8091, 9,2HT3,
F 15,8136,10,2HC1,
G 16,8181,10,2HC2,
G 0,8191,0,-99 /
CALL RMPARCIP)
LU=LOGLUCIDUMMY)
IETX=1400B
IEX=IPC1)
IFCIPC2).GT.0) GO TO 50
С
C INTERACTIVE
82
BIT BUCKET
С
20 WRITECLU,25) |
25 FORMATC 4X , "VECTOR GRAPHICS MENU",/,
1 10X,"1. SYSTEM STATUS ",/,
2 10X,"2. DATA HISTORY “,/,
3 10X,"3. 3D IMAGES ".,/,
4 10X,"4. DIRECTION FINDERS ",/,
5 10X,"5. SPECTRA “.,/,
6 10X,"6. WATERFALL DISPLAY ",/,
9 10X,"3. TIMERS ",/,
A 9xX,"10. CLOCKS “./,
B ЭХ, "11. ALL FUNCTIONS “,/,
C 9x,"12. INITIALIZATION DATA",/,
D ЭХ, "13. INITIALIZATION “,/,
E 9x,"14. DEMONSTRATION FILES"™,/,
F 3X,"15. SEARCH FOR A MNEMONIC",/,
G 9X,'"99. EXIT PROGRAM")
30 WRITECLU, “C2X, "ENTER THE DISPLAY MENU ITEM REQUIRED - _"'97)
CALL INPUTCO, IPC2),1,LU, +30)
50 IVM=IPC2)
IFCIVM.EG.99) GO TO 8000
IFCCIVM.LT.1).0R.CIVM GT.15)) GO TO 7000
IFCIVM.EQ.12) GO TO 1200
IFCIVM.EQ.13> GO TO 1300
IFCIVM.EQ.14) GO TO 1400
IFCIVM.EQ.15) GO TO 1500
IFCIPC3).GT.0) GO TO 100
60 WRITECLU,65)
65 FORMATC 15X,"1. LARGE DISPLAY ONLY" ,/,
1 15X,"2. SMALL DISPLAY ONLY",/,
2 15X,"3. BOTH DISPLAYS",/,
3 15X,"4. NONE",/,
4 15X,"5. ERASE THE FILE",/,
5 14X,'99. RETURN TO MAIN FILE")
70 WRITECLU, C10X,"ENTER THE ONE REQUIRED - _'')9”)
CALL INPUTCO,IPC3),1,LU,+70)
100 IDM=IPC3)
IFCIDM.EQ.99) GO TO 7000
IFCCIDM.LT.1).0R.CIDM.GT.S)) GO TO 60
IFCIDM.EQ. 1) JDM=2
IFCIDM.EQ.2) JDM=1
IFCIDM.EQ.3) JDM=0
IFCIDM.EQ.4) JDM=3
IFCIVM.EQ.11) GO TO 1100
IFCIDM.EQ.5) GO TO 500
C CHECK FILE FOR MNEMONIC
С
С
DO 150 I=0,1S
IFCIVFCI+#4+3).NE.I1VM) GO TO 150
WRITECLU, (*:FF*",12,',:BF,:WX*,I11,",:UF",12,",:5X,:"))
1IVF(1+#4+1),JDM, IVF (I #4+1)
WRITEC23,’(*":FF",12,",:BF, WX", I1,",:UF",12,",:5X,:")’)
1IVEFCI=4+1),JDM, IVEFCI=4+1)
150 CONTINUE
GO TO 7000
C ERASE A FILE
83
BIT BUCKET
С
S00 DO 510 I=0,15
IFCIVFCI+#4+3).NE.IVM) GO TO 510
WRITEC23, “(*":EF™,12,%",:")’) IVFCI=4+1)
S10 CONTINUE
GO TO 7000
С
C HANDLE “ALL FILES”
С
1100 IFCIDM.EG.S) GO TO 1150
1120 DO 1130 I=0,1S
WRITEC23, (":FF*",12,",:BF, : WX", I1,",:UF",12,",:SX,:')’)
IIVECI=4+1), JDM, IVFCI=4+1)
1130 CONTINUE
GO TO 7000
1150 DO 1160 1=0,15
WRITE(C23,’(*":EF",12,",:")’) IVFCI=4+1)
1160 CONTINUE
GO TO 7000
C
C INITIALIZATION DATA
С
1200 DO 1210 I=0,15
WRITECLU,“C4X “FILE “,I2,"* INITIALISED FROM *,14,” TO “,14)7)
11МЕС 1+ 4+ 1) , ТУР СТ + 4+2) , ТУР С 1 + 4+ 6) - 1
1210 CONTINUE
GO TO 7000
C
C INITIALIZATION
С
1300 CONTINUE
CALL LURGC1,23,1)
CALL CNFGC23,1,37000B)
WRITEC23,” CA2,":EM, :EN, :EX, :SN, :SX, : UM, :'97) 1424B
DO 1310 N=1,1000,4
TARCNI=2H:P
IAR(N+1)=2HAD
TARCN+2)=2H,0
1310 IARCN+3)=2H;
DO 1340 I=0,15
WRITEC23,/":FL",14," ,:NF",T2,",:PEO,')97) IVFCIT#4+2), IVFCI#4+1)
N=CIVFCI#4+6)-IVFCI +#4+2))#4
1320 IFCN.GT.1000)THEN
CALL EXEC(2,23,1AR,1000)
ELSE
CALL EXEC(2,23,IAR,N)
ENDIF
N=N-1000
IFCN.GT.0)GO TO 1320
WRITEC23,* (":SN,")7)
1340 CONTINUE
CALL LURGCO,23,1)
GO TO 7000
84
BIT BUCKET
С
C DEMONSTRATION FILES
С
1400 CALL LURQ(C1,23,1)
WRITE(23,’(*":CS1,:")’)
DO 1450 IVM=1,10
DO 1405 I=0,15
IFCIVFCI+#4+3).EQ.IVM) GO TO 1406
1405 CONTINUE
WRITECLU, ("THERE IS NO FILE FOR ITEM *,12)’) IVM
14906 IFN=IVFCI=4+1)
IVP=800-IVMx+75
GO TO C1411,1412,1413,1414,1415,1416,1450,1450,1419,1420) IVM
1411 WRITE(C23,’(*FF",12,",:PEOQ, :PA200,",13,";:PE1,:TX 1. ",
1" SYSTEM STATUS" ,A1,*,:")>’) IFN,IVP,IETX
GO TO 1450
1412 WRITEC23,’C"FF",12,",:PE0,:PA200,",13,";:PE1,:TX 2. "
1° DATA HISTORY ",A1,",:")’) IFN,IVP,IETX
GO TO 1450
1413 WRITEC23, "FF", I2,",:PEO, : PA200,",13,*";:PE1,:TX 3. "
1" 3D IMAGES" ,A1,'",:")’) IFN,IVP,IETX
GO TO 1450
1414 WRITEC23, * CFF", I2,",:PEO, :PA200,",13,""::PE1,:TX 4, *
1 DIRECTION FINDERS" ,A1,*,:")’) IFN,IVP,IETX
GO TO 1450
1415 WRITEC23,” C"FF"",I2,", :PEO, :PA200,*, 13, :PE1,:TX 5. ©»
1" SPECTRA" ,A1,",:')’) IFN,IVP,IETX
GO TO 1450
1416 WRITE(C23,’(**FF™",I2,",:PEOD,:PA200,",]I3,";:PE1,: TX 6. "
1" WATERFALL DISPLAY" ,A1,",:')’) IFN,IVP,IETX
GO TO 1450
1419 WRITEC23,’C"FF",12,",:PE0,:PA200,",13,";:PE1,:TX 9. "
1" TIMERS",A1,",:"37) IFN,IVP,IETX
GO TO 1450
1420 WRITEC23,’C"FF",12,",:PE0,:PA200,",13,":;:PE1,:TX10. >”
1° CLOCKS",A1,",::PE0,:")’’) IFN,IVP,IETX
1450 CONTINUE
CALL LURQ(CO0,23,1)
GO TO 7000
С
C RETURN THE BUFFER
С
1500 NUM=0
DO 1510 I=15,0,-1
IFCIANDCIP(S),177400B) .NE.IANDCIVF(1+4+4),177400B>)>G0 TO 1510
NUM= NUM+ 1
I NUMe I
1510 CONTINUE
IVFC67)= NUM
IFCNUM.NE.0) IVFC6G8)=INUM
CALL EXECC14,2,IVF,68)
GO TO 7000
7000 IFCIEX.EQ.-1) GO TO 8000
IP(3)=0
GO TO 20
8000 CALL EXECC6, 0)
END
85
BIT BUCKET
Next we present a simple program using this system.
FTN,L
PROGRAM TVLIN
CaKKs ILLUSTRATE USE OF VLIN AND VFL
DIMENSION IBUFC2,100),NVFLC3),IVF CES)
DATA NVFL/’VFL */
LU= LOGLUCID)
C
C RUNP SCHEDULES VFL WITH WAIT AND ASKS FOR AREA KK
C
CALL RUNP(LU,9,NVFL,-1,15,0,0,2HKK,N,0)
CALL EXECC14,1,IVF,68)
I=IVFC68) II IS THE LINE IN IVF CONTAINING KK
IFCI.EQ.-99)THEN !'THE AREA ASKED FOR IS NOT DEFINED
WRITECLU,’ ("VECTOR GRAPICS AREA ",A2," IS NOT DEFINED')”)IVF (67)
GO TO 100
ENDIF
IFL=IVFCI=4+2) VIFL IS THE START LOCATION
С
С SET UP SOME DEMO DATA
C
DO 10 N=1,100
IBUFC1,N)=N#10
10 IBUF(2,N)=600+N
С
С PLOT THE ARRAY IBUF
C
CALL VLINCIFL,IBUF,100)
100 END
86
BIT BUCKET
And finally a handy little subroutine which schedules the program even if it is not memory resident.
FTN4,L
SUBROUTINE RUNPCLU, ICODE,NAME,IP1,IP2,IP3,I1P4,IP5,IST,NST), PROGRA
1M SCHEDULER 811209.1308
C++ JR«ROUTINE TO RUN A PROGRAM WHICH MAY NOT BE AVAILABLE
ооо
IT
SHOULD REPLACE A PROGRAM NOT IN THE ID LIST
ERROR MESSAGES PRINTED ON THE GIVEN LU
LU
- LOGICAL UNIT NUMBER OF THE CALLING TERMINAL
ICODE - THE EXEC SCHEDULING CODE. 9,10,23,24 ALLOWED
NAME - PROGRAM NAME. A THREE WORD ARRAY
IP1 TO IPS ARE S INPUT PARAMETERS
IST - THE ASCII STRING TO BE PASSED. DO NOT DEFAULT TO 0 USE IST
NST - NUMBER OF WORDS IN THE STRING IST
WARNING. DO NOT DEFAULT ANY PARAMETERS. USE ZERO EXCEPT FOR IST.
10
20
100
200
220
240
DIMENSION NAMEC3),ISTC1),IDCBC144),IDT1C17),IDT2C15),IDT3C123,
1LERC3)
DATA IDT1/’RUNP ERROR MESSAGE NAME IAIB"/
DATA IDT2/’RUNP - OPEN ERROR IERR NAME * /
DATA IDT3/’RUNP - IDRPL ERROR IER’ /
CALL EXECCICODE+100000B,NAME,IP1,IP2,IP3,I1P4,IPS,IST,NST)
GO TO 100
CONTINUE
RETURN
CALL ABREG(IA,IB)
IFCCIA.EQ.2HSC).AND.CIB.EQ.2H053) GO TO 200
IDT1C11)=NAMEC1)
IDT1C12)=NAME C2)
IDT1C13)=NAME C3)
IDT1C16)=IA
IDT1C17)=IB
CALL EXECC1,LU+400B,IDT1,17)
RETURN
CALL OPENCIDCB, IERR,NAME)
IFCIERR.GE.0) GO TO 220
CALL CNUMDCIERR,LER)
IDT2C10)=LERC2)
IDT2C11)=LERC3)
IDT2C13)=NAME C1)
IDT2C14)=NAME C2)
IDT2C15)=NAME C3)
CALL EXECC1,LU+400B,IDT2,15)
RETURN
CALL IDRPLCIDCB, IER,NAME)
IFCIER.NE.0) GO TO 220
CALL CLOSECIDCB)
GO TO 10
CALL CNUMDCIER,LER)
IDT3C11)=LERC2)
IDT3C12)=LERC3)
CALL EXECC1,LU+400B, IDT3,12)
RETURN
END
87
BULLETINS
JOIN AN HP 1000 USER GROUP!
Here are the groups that we know of as of December 1980. (If your group is missing, send the Communicator/1000 editor all of
the appropriate information, and we'll update our list.)
NORTH AMERICAN HP 1000 USER GROUPS
Area
Arizona
Boston
Chicago
Greenville/S. C.
Huntsville/Ala.
Montreal
New Mexico/El Paso
New York/New Jersey
88
User Group Contact
Jim Drehs
7120 E. Cholla
Scottsdale, Arizona 85254
LEXUS
P.O. Box 1000
Norwood, Mass. 02062
David Olson
Computer Systems Consultant
1846 W. Eddy St.
Chicago, lilinois 60657
(312) 525-0519
Henry Lucius lil
American Hoechst Corp.
P.O. Box 1400
Greer, South Carolina 29651
(803) 877-8471
John Heamen ED35
George C. Marshall Space Flight Cir.
Nasa
Marshall Space Flight Ctr., AL. 35812
Erich M. Sisa
Siemens Electric Ltd.
7300 Trans Canada Highway
Pointe Claire, Quebec
HOR 1C7
Guy Gallaway
Dynalectron Corporation
Radar Backscatter Division
P.O. Drawer O
Holloman AFB, NM 88330
Paul Miller
Corp. Computer Systems
675 Line Road
Aberdeen, N.J. 07746
(201) 583-4422
BULLETINS
NORTH AMERICAN HP 1000 USER GROUPS (CONTINUED)
Area User Group Contact
Philadelphia Dr. Barry Periman
RCA Laboratories
P.O. Box 432
Princeton, N.J. 08540
Pittsburgh Eric Belmont
Alliance Research Ctr.
1562 Beeson St.
Alliance, Ohio 44601
(216) 821-9110 X417
San Diego Jim Metts
Hewlett-Packard Co.
P.O. Box 23333
San Diego, CA 92123
Toronto Nancy Swartz
Grant Hallman Associates
43 Eglinton Av. East
Suite 902
Toronto M4P1A2
Washington/Baltimore Mal Wiseman
Hewlett-Packard Co.
2 Choke Cherry Rd.
Rockville, MD. 20850
General Electric Co. Stu Troop
(GE employees only) Special Purpose Computer Ctr.
General Electric Co.
1285 Boston Ave.
Bridgeport, Conn. 06602
OVERSEAS HP 1000 USER GROUPS
Belgium J. Tiberghien
Vrije Universiteit Brussel
Afdeling Informatie
Pleinlaan 2
1050 Brussel
Belgium
Tel. (02) 6485540
89
BULLETINS
OVERSEAS HP 1000 USERS GROUPS (CONTINUED)
Area
France
Germany
Netherlands
Singapore
Switzerland
United Kingdom
90
User Group Contact
Jean-Louis Rigot
Technocatome TA/DE/SET
Cadarache
BP.1
13115 Saint Paul les Durance
France
Tel. (042) 253952
Hermann Keil
Vorwerk + Co Elektrowerke
Abt. TQPS
Rauental 38-40
D-5600 Wuppertal 2
W. Germany
Tel. (0202) 603044
Alpert R. Th. van Putten
National Institute of Public Health
Antonie van Leeuwenhoeklaan 9
Postbox 1
3720 BA Bilthoven
The Netherlands
Tel. (030) 742344
W. S. Wong
Varta Private Ltd.
Р.О. Вох 55
Chai Chee Post Office
Singapore
Tel. 412633
Graham Lang
Laboratories RCA Ltd.
Badenerstrasse 569
8048 Zurich
Switzerland
Tel. (01) 526350
Mike Bennett
Riva Turnkey Computer Systems
Caroline House
125 Bradshawgate
Bolton
Lancashire
United Kingdom
Tel. (0204) 384112
»
">
/
Stiahnuť
Len priateľské pripomenutie. Dokument si môžete pozrieť priamo tu. Ale čo je najdôležitejšie, naša AI si ho už prečítala. Dokáže vysvetliť zložité veci jednoducho, odpovedať na vaše otázky v akomkoľvek jazyku a pomôže vám rýchlo prechádzať aj tie najdlhšie alebo najkomplikovanejšie dokumenty.
Reklama