top - download
⟦610931509⟧ Wang Wps File
Length: 11104 (0x2b60)
Types: Wang Wps File
Notes: FIX/1256/PSP/0049
Names: »4618A «
Derivation
└─⟦c7fef4850⟧ Bits:30006144 8" Wang WCS floppy, CR 0418A
└─ ⟦this⟧ »4618A «
WangText
4618A…02…FIX/1256/PSP/0049
…02…JL/840215…02……02…#
GET ̲DTG
PROCEDURE
PSP
…02……02… FIKS
GET ̲DTG PROCEDURE PSP
FIX/1256/PSP/0049
J]rgen Lindballe
Ole Eskedal
AMC (6), APE, LOL, REV, LU
…0f… FIKS S/W Mgr 840215
1
840215
…0e… Conf. Mgmt. 840215
4618A…02…FIX/1256/PSP/0049
…02… JL/840215…02……02…ii
GET ̲DTG PROCEDURE PSP
…02……02… FIKS
840215 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 .........................
03
3.1 FUNCTIONAL CAPABILITIES ..................
03
3.2 INTERFACE DESCRIPTION ....................
03
3.3 PROCESSING ...............................
06
3.3.1 The Procedure.........................
06
3.3.2 Initialization .......................
12
3.4 DATA ORGANIZATION ........................
12
3.4.1 The Data Bases .......................
12
3.4.2 Queues ...............................
12
3.4.3 Buffers ..............................
12
3.4.4 Tables ...............................
12
3.4.5 Constants and Variables ..............
12
3.5 STORAGE ALLOCATION .......................
13
3.5.1 Memory Space Requirements ............
13
3.5.2 Disc Space Requirements ..............
13
3.6 PERFORMANCE CHARACTERISTICS ..............
13
3.7 LIMITATIONS ..............................
13
3.8 ERROR CODES ..............................
13
3.9 LISTING REFERENCES .......................
13
4 QUALITY ASSURANCE ............................
14
4.1 QUALIFICATION TESTS ......................
14
4.2 OTHER QUALITY ASSURANCE PROVISIONS .......
14
5 PREPARATIONS FOR DELIVERY ....................
14
1 S̲C̲O̲P̲E̲
1.1 I̲N̲T̲R̲O̲D̲U̲C̲T̲I̲O̲N̲
This document specifies the G̲E̲T̲-̲D̲T̲G̲ monitor procedure
within the FIKS application software. The design is
based on issue 5 of the Requirements Specifications.
The main tasks of the GET ̲DTG are:
- to return the date-time group (DTG) as an ASCII
string and/or
- to return the number of seconds since 010000Z JAN
80.
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 calls the system monitor procedure READRTC
and the monitor procedure INTASC. It returns the date/time
group DTG as an ASCII string, and/or the number of
seconds since 010000Z JAN 80.
3.2 I̲N̲T̲E̲R̲F̲A̲C̲E̲ ̲D̲E̲S̲C̲R̲I̲P̲T̲I̲O̲N̲
MON GETDTG
Register use at:
CALL RETURN
R5 ref (work-area) unchanged
R7 link unchanged
Return points:
error: link + 0
successful: link + 1
C̲a̲l̲l̲
- work-area of 30 words
- mode
0: Long integer time only
1: ASCII DTG only
2: Both formats
̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
WORK: MODE +0
̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ +29
R̲e̲t̲u̲r̲n̲
- ASCII string of 14 bytes, forming the current date/time
group DTG, DDHHMMZ MMM YY and/or
- The number of seconds since 010000Z JAN 80
WORK:
̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲ ̲ ̲M̲O̲D̲E̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲+0
̲ ̲ ̲ ̲D̲2̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲D̲1̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲+1
̲ ̲ ̲ ̲H̲2̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲H̲1̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲ ̲ ̲M̲2̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲M̲1̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲ ̲ ̲S̲P̲A̲C̲E̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲"̲Z̲"̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲ ̲ ̲M̲4̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲M̲3̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲ ̲ ̲S̲P̲A̲C̲E̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲M̲5̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲ ̲ ̲Y̲2̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲Y̲1̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲+7
T̲I̲M̲E̲ ̲I̲N̲ ̲S̲E̲C̲O̲N̲D̲S̲,̲ ̲L̲.̲S̲.̲W̲.̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲+8
T̲I̲M̲E̲ ̲I̲N̲ ̲S̲E̲C̲O̲N̲D̲S̲,̲ ̲M̲.̲S̲.̲W̲.̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲+9
̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲+29
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 overleaf.
First the READ ̲RTC procedure is called.
3.3.1.1 T̲i̲m̲e̲ ̲i̲n̲ ̲S̲e̲c̲o̲n̲d̲s̲
If the number of seconds is requested, the time elapsed
since 010000Z JAN 80 is calculated in a fast way:
To get the understanding of this 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 D̲a̲t̲e̲-̲T̲i̲m̲e̲ ̲G̲r̲o̲u̲p̲
If the DTG is requested, then the day, the hour and
the minute are converted to ASCII, and the letter Z
is stored.
The name of the month is found in a table by calling
the procedure MONTH.
Finally the year is converted to ASCII.
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
lookup.
FIGURE
FIGURE
FIGURE
3.3.2 I̲n̲i̲t̲i̲a̲l̲i̲z̲a̲t̲i̲o̲n̲
During initialization the procedure 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̲
A working area of 30 words is supplied by the calling
process.
It is used for:
- the input parameter: mode
- the output parameters: DTG and/or time
- working area
- storage of the registers: R0-R7
3.4.4 T̲a̲b̲l̲e̲s̲
The procedure MONTH contains a table of three-letter
abbreviations of the names of the months.
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: 273 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 READ-RTC will deliver the year correctly until
year 1900 + 255 = year 2155.
The algorithm calculating the No. of seconds will work
properly until 28th Feb. 2100.
So in fact there are no real limitations.
3.8 E̲R̲R̲O̲R̲ ̲C̲O̲D̲E̲S̲
If some error occurs during the integer-to-ASCII conversion,
the error exit will be taken.
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 applicable.
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*GENERAL PARAMS.S
̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ MONITORNAMES.S
and
FIX ̲PREFIX.D*FIX ̲MONITORNAMES
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.