top - download
⟦defe9d119⟧ Wang Wps File
Length: 12275 (0x2ff3)
Types: Wang Wps File
Notes: FIX/1256/PSP/0039
Names: »4634A «
Derivation
└─⟦074b80a9e⟧ Bits:30006146 8" Wang WCS floppy, CR 0345A
└─ ⟦this⟧ »4634A «
WangText
4…05……86…1
…02…
…02…
…02…
4634A/rt…02…FIX/1256/PSP/0039
…02…JL/840221…02……02…#
CONVERT
̲DTG PROCEDURE
PSP
…02……02…FIKS
CONVERT ̲DTG PROCEDURE PSP
FIX/1256/PSP/0039
J]rgen Lindballe
Ole Eskedal
AMC (6), APE, LOL, REV, LU
…0f… FIKS S/W Mgr 840221
1
840221
…0e… Conf. Mgmt. 840221
4634A/rt…02…FIX/1256/PSP/0039
…02… JL/840221…02……02…ii
CONVERT ̲DTG PROCEDURE PSP
…02……02… FIKS
840221 All First Issue of Document
T̲A̲B̲L̲E̲ ̲O̲F̲ ̲C̲O̲N̲T̲E̲N̲T̲S̲
1 SCOPE ........................................
02
1.1 INTRODUCTION .............................
02
1.2 ABBREVIATIONS ............................
02
1.3 DEFINITION OF TERMS ......................
02
2 APPLICABLE DOCUMENTS .........................
03
3 MODULE SPECIFICATION .........................
04
3.1 FUNCTIONAL CAPABILITIES ..................
04
3.2 INTERFACE DESCRIPTION ....................
04
3.3 PROCESSING ...............................
06
3.3.1 The Procedure ........................
06
3.3.2 Initialization .......................
14
3.4 DATA ORGANIZATION ........................
14
3.4.1 The Data Bases .......................
14
3.4.2 Queues ...............................
14
3.4.3 Buffers ..............................
14
3.4.4 Tables ...............................
14
3.4.5 Constants and Variables ..............
14
3.5 STORAGE ALLOCATION .......................
15
3.5.1 Memory Space Requirements ............
15
3.5.2 Disc Space Requirements ..............
15
3.6 PERFORMANCE CHARACTERISTICS ..............
15
3.7 LIMITATIONS ..............................
15
3.8 ERROR CODES ..............................
15
3.9 LISTING REFERENCES .......................
15
4 QUALITY ASSURANCE ............................
16
4.1 QUALIFICATION TESTS ......................
16
4.2 OTHER QUALITY ASSURANCE PROVISIONS .......
16
5 PREPARATIONS FOR DELIVERY ....................
17
1 S̲C̲O̲P̲E̲
1.1 I̲N̲T̲R̲O̲D̲U̲C̲T̲I̲O̲N̲
This document specifies the C̲O̲N̲V̲E̲R̲T̲-̲D̲T̲G̲ monitor procedure
within the FIKS application software. The design is
based on issue 5 of the Requirements Specifications.
The main task of the procedure is:
- to convert the number of seconds elapsed since
010000Z JAN 80 to a string in the Date ̲Time
Group format, or vice versa.
1.2 A̲B̲B̲R̲E̲V̲I̲A̲T̲I̲O̲N̲S̲
DTG Date-Time Group
1.3 D̲E̲F̲I̲N̲I̲T̲I̲O̲N̲ ̲O̲F̲ ̲T̲E̲R̲M̲S̲
DATE ̲TIME GROUP (DTG)
The time expressed in the format:
DDHHMMZ MMM YY
where:
DD means date (2 digits)
HH means hour (2 digits)
MM means minute (2 digits)
Z means zone (1 letter)
MMM means month (3 letters)
YY means year (2 digits)
2 A̲P̲P̲L̲I̲C̲A̲B̲L̲E̲ ̲D̲O̲C̲U̲M̲E̲N̲T̲S̲
1. REQUIREMENTS SPECIFICATION
FIX/0000/SPC/0002
VOL. I - III, issue 5, 800310
2. FIKS SYSTEM DESIGN SPECIFICATION
FIX/1000/DSP/0001
Issue 5, 800507
3. FIKS SOFTWARE INTERFACE REFERENCE
FIKS/0100/MAN/0003
Issue 2, 800530
4. FIKS DATA INTERFACE REFERENCE
FIX/0100/MAN/0004
Issue 2, 800530
5. CR80 AMOS KERNEL
CSS/302/PSP/0008
Issue 2, 810303
6. CR80 AMOS I/O SYSTEM
CSS/006/PSP/0006
Issue 3, 810401
7. CR80 FILE SYSTEM PSP
CSS/910/EWP/0001
Issue 2, 790226
8. SUPPORT SOFTWARE DESIGN SPECIFICATION
FIX/1103/DSP/0009
Issue 1, 800430
3 M̲O̲D̲U̲L̲E̲ ̲S̲P̲E̲C̲I̲F̲I̲C̲A̲T̲I̲O̲N̲
3.1 F̲U̲N̲C̲T̲I̲O̲N̲A̲L̲ ̲C̲A̲P̲A̲B̲I̲L̲I̲T̲I̲E̲S̲
This procedure converts a long integer (number of seconds
since 010000Z JAN 80) to an ASCII string in the usual
DTG format, or vice versa.
3.2 I̲N̲T̲E̲R̲F̲A̲C̲E̲ ̲D̲E̲S̲C̲R̲I̲P̲T̲I̲O̲N̲
MON CONVDTG
Register use at:
CALL RETURN
R6: ref (work-area) ref (work-area)
R7: link completion code
( #0000: OK
#0B04: Non-existing month in
DTG)
Return points:
error: link + 0
successful: link + 1
I̲n̲p̲u̲t̲
- Reference to a work-area of 30 words containing:
o DTG character buffer (14 bytes) or
o time in seconds (long integer) corresponding
to the
o conversion flag
= 0: ASCII format long integer
seconds
= 1: long integer seconds ASCII format
WORK:
̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲
^ ^
^ CONVERSION ̲FLAG ^
0
^ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲^
^ D2 D1 ^
1
^ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲^
^ H2 H1 ^
2
^ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲^
^ M2 M1 ^
3
^ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲^
^ SPACE "Z" ^
4
^ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲^
^ M4 M3 ^
5
^ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲^
^ SPACE M5 ^
6
^ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲^
^ Y2 Y1 ^
7
^ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲^
^ DTG SEC., L.S.W. ^
8
^ DTG SEC., M.S.W. ^
9
^ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲^
^ REGISTER SAVE AREA ^10-17
^ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲^
^ WORK AREA ^18-29
^ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲^
O̲u̲t̲p̲u̲t̲
- DTG character buffer, or
- time in seconds
corresponding to the conversion flag.
3.3 P̲R̲O̲C̲E̲S̲S̲I̲N̲G̲
3.3.1 T̲h̲e̲ ̲P̲r̲o̲c̲e̲d̲u̲r̲e̲
The flow chart of the procedure is shown in figures
3.3.1-1 and -2.
3.3.1.1 Conversion of DTG to number of seconds (flag = 0).
First the elements of the DTG: the date, the hour,
the minute, the month and the year are converted from
ASCII characters to integers.
To get the understanding of the remaining part of the
algorithm we will look closer at the calculation of
the number of days.
The number of days in a 4-year period is:
365 + 365 + 365 + 366 = 1461 days
including the leapyear.
It is seen that the function:
(1461 * YEAR) DIV 4
means the number of days in the years elapsed since
the start of year No. 0. Note that the operator DIV
means division with truncation.
We now let year No. 0 begin on the 1st March 1900,
i.e. the months are numbered in this way:
NAME MONTH NO.OF DAYS
March 3 31
April 4 30
May 5 31
June 6 30
July 7 31
August 8 31
September 9 30
October 10 31
November 11 30
December 12 31
January 13 31
February 14 XX
In this way we gain three advantages:
- we can forget that year 1900 wasn't a leapyear,
and
- we don't need to care about the exact number of
days in the month of February.
- we get 5-month groups each having the number of
days equal to 31, 30, 31, 30, 31.
We are now prepared to look at the function:
(153 * MONTH + 3) DIV 5 - 92
Its value is the number of days in the months elapsed
since the 1st March.
By adding the functions and the daynumber we get:
(1461*YEAR) DIV 4+(153*MONTH+3)DIV5 - 92+DAY-1
which is the number of days since midnight before the
1st March 1900.
The number of days until midnight before the 1st January
1980 is found to be:
28854 + 398 - 92 + 1 - 1 = 29160 days
Because we want the calculation of the number of seconds
to start from this time, we must subtract 29160 days
from the function, and we finally get:
K = (1461*YEAR)DIV 4 + (153*MONTH+3)DIV 5+DAY - 29253
which is the number of days since the 1st January 1980.
Hereafter the number of seconds is calculated in a
straight forward way.
This algorithm is valid in the period of time from
1st March 1900 to 28th February 2100, because year
2100 is not a leapyear.
3.3.1.2 C̲o̲n̲v̲e̲r̲s̲i̲o̲n̲ ̲o̲f̲ ̲n̲u̲m̲b̲e̲r̲ ̲o̲f̲ ̲s̲e̲c̲o̲n̲d̲s̲ ̲t̲o̲ ̲D̲T̲G̲ ̲(̲f̲l̲a̲g̲ ̲ ̲ ̲ ̲ ̲0̲)̲.̲
The calculation of the minute and the hour is straightforward.
During the calculation of the year the number 80 is
added to let the numbering start from year 1900.
During the calculation of the month the temporary representations
of 13 and 14 in the preceeding years are used for January
and February.
Having calculated year and month the calculation of
day is straightforward.
After the computation of the integer values they are
finally converted to a string of ASCII characters.
3.3.1.3 P̲r̲o̲c̲e̲d̲u̲r̲e̲s̲
The procedure MONTH converts the number of the month
to the name of the month. However, it must be called
twice to deliver the first two characters and the third
character, respectively.
It calls the procedure TABLE, which provides the table
look-up.
FIGURE
FIGURE
FIGURE
FIGURE
FIGURE
3.3.2 I̲n̲i̲t̲i̲l̲i̲z̲a̲t̲i̲o̲n̲
During the initialization MON ̲INIT is called.
3.4 D̲A̲T̲A̲ ̲O̲R̲G̲A̲N̲I̲Z̲A̲T̲I̲O̲N̲
3.4.1 T̲h̲e̲ ̲D̲a̲t̲a̲ ̲B̲a̲s̲e̲s̲
Not applicable.
3.4.2 T̲h̲e̲ ̲Q̲u̲e̲u̲e̲s̲
Not applicable.
3.4.3 B̲u̲f̲f̲e̲r̲s̲
The buffer used for:
- input parameters,
- output parameter,
- register save area and
- working area
is delivered by the calling process.
3.4.4 T̲a̲b̲l̲e̲s̲
Not applicable.
3.4.5 C̲o̲n̲s̲t̲a̲n̲t̲s̲ ̲a̲n̲d̲ ̲V̲a̲r̲i̲a̲b̲l̲e̲s̲
Not applicable.
3.5 S̲T̲O̲R̲A̲G̲E̲ ̲A̲L̲L̲O̲C̲A̲T̲I̲O̲N̲
3.5.1 M̲e̲m̲o̲r̲y̲ ̲S̲p̲a̲c̲e̲ ̲R̲e̲q̲u̲i̲r̲e̲m̲e̲n̲t̲s̲
Program size = 485 words.
3.5.2 D̲i̲s̲c̲ ̲S̲p̲a̲c̲e̲ ̲R̲e̲q̲u̲i̲r̲e̲m̲e̲n̲t̲s̲
No disc space is required.
3.6 P̲E̲R̲F̲O̲R̲M̲A̲N̲C̲E̲ ̲C̲H̲A̲R̲A̲C̲T̲E̲R̲I̲S̲T̲I̲C̲S̲
Not applicable.
3.7 L̲I̲M̲I̲T̲A̲T̲I̲O̲N̲S̲
The conversion procedure will not work properly after
the 28th February 2100, because this year is not a
leapyear.
So in fact there are no real limitations.
3.8 E̲R̲R̲O̲R̲ ̲C̲O̲D̲E̲S̲
CC # 0B04 An illegal name of the month has been specified
in the input DTG.
3.9 L̲I̲S̲T̲I̲N̲G̲ ̲R̲E̲F̲E̲R̲E̲N̲C̲E̲S̲
Ref. to SOURCE LIBRARY.
4 Q̲U̲A̲L̲I̲T̲Y̲ ̲A̲S̲S̲U̲R̲A̲N̲C̲E̲
4.1 Q̲U̲A̲L̲I̲F̲I̲C̲A̲T̲I̲O̲N̲ ̲T̲E̲S̲T̲S̲
Not appliclable.
4.2 O̲T̲H̲E̲R̲ ̲Q̲U̲A̲L̲I̲T̲Y̲ ̲A̲S̲S̲U̲R̲A̲N̲C̲E̲ ̲P̲R̲O̲V̲I̲S̲I̲O̲N̲S̲.̲
Not applicable.
5 P̲R̲E̲P̲A̲R̲A̲T̲I̲O̲N̲ ̲F̲O̲R̲ ̲D̲E̲L̲I̲V̲E̲R̲Y̲
Preparation of the binary object code starts with an
editing of the source text.
The source text is merged together with prefix files:
GENS.D*SWELLPREFIX.D*GENERALPARAMS.S
̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ MONITORNAMES.S
and
FIX ̲PREFIX.D*QACCESS.TYPES.S
The merge file is compiled by running the SWELL compiler,
and the listing is printed.
The object code is then linked together with other
pieces of object code by the LINKER.
Finally the binary code may be installed.