top - download
⟦062096130⟧ Wang Wps File
Length: 36871 (0x9007)
Types: Wang Wps File
Notes: PC/PDS/001
Names: »3028A «
Derivation
└─⟦51742e6e8⟧ Bits:30006248 8" Wang WCS floppy, CR 0238A
└─ ⟦this⟧ »3028A «
WangText
…00……00……00……00……00…D…0a……00……00…D…0b…D
C…0a…C…00…C…01…C…07…B…0b…B…01…A…86…1 …02… …02… …02…
…0e…
…02… PC/PDS/001
…02… /821101…02……02…#
PROTOCOL CONVERTER
PACKAGE DESIGN SPECIFICATION…02……02… PC…0f…
4.2.7 M̲a̲i̲n̲t̲e̲n̲a̲n̲c̲e̲ ̲C̲o̲n̲t̲r̲o̲l̲l̲e̲r̲ ̲(̲M̲A̲C̲)̲
4.2.7.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
MAC performs the following tasks:
a) Read a command line from the VDU and echo characters.
Check for 'attention/break' entered on the VDU.
b) Compare the command keyword to the known PC command
keywords. If the keyword is not recognized, classify
the command as 'unknown'. Check whether the keyword
is legal in the maintenance mode. If not, classify
the command as
'unacceptable'. Command keywords accepted by MAC
are: CHECK, DUMP, and INIT. Cf. Reference 17, p
64 for the complete command syntax.
c) Read the parameters of the command entered and store
them in a common parameter stack.
d) Perform the function requested including 'break',
syntax errors, or a legal command. 'Break' provokes
a mode prompt on the VDU. Errors in the command
line are indicated by typing:
'UNKNOWN COMMAND' or
'UNACCEPTABLE COMMAND' or
'PARAMETER ERROR'
Immediately following the error message, the system
will prompt for a new command.
Commands accepted by MAC are executed using procedure
calls, except for the INIT command. This command
copies all other PC programs from the EPROM into
RAM. MAC then loads the SGI process, which eventually
transfers the VDU control to the CI process.
HW tests and dump facilities performed by MAC are
described in sections 4.2.7.1.1 through 4.2.7.1.5.
Upon completion of commands CHECK and DUMP MAC presents
a result line to the operator:
(command keyword) EXECUTED, RESULT= (hex number)
If an error has occured, MAC sets the leftmost of
the four digits in the result code to 'D', which
is reserved for MAC error codes. The error is further
described in the two rightmost digits.
The possible errors are listed in section 4.2.7.3 declared
as enumerated constants of type
'mac ̲results'. A successfully completed command is
indicated by the result code #0000. A CHECK EPROM command
will furthermore cuse the following line to be printed
on the VDU following the result line:
'CHECKSUM=' (checksum ̲acc)
The results are followed by a mode prompt for a new
command. When output by MAC, the prompt contains the
letter M.
4.2.7.1.1 C̲P̲U̲-̲S̲C̲M̲ ̲T̲e̲s̲t̲
The CPU-SCM test computes a checksum of the SCM prom
and compares the result to a given value.
If the result of the checksumming is OK, a selected
set of CPU instructions are executed from each of the
following instruction groups:
move instructions,
jump instructions,
arithmetic instructions,
shift instructions,
single bit instructions, or
input/output instructions
4.2.7.1.2 E̲P̲R̲O̲M̲ ̲T̲e̲s̲t̲
An EPROM checksum is generated assuring that the EPROM
is accessible, and that the contents of the EPROM is
unaltered.
4.2.7.1.3 R̲A̲M̲ ̲T̲e̲s̲t̲
The RAM accessibility and addressing logic is tested
by reading and writing the address of all memory locations
into the locations themselves. The result is verified
by reading the address for each memory location. The
original RAM contents is restored. The RAM configuration
to be tested is described in an array of 64 entries.
Each entry specifies the address space of a 4k RAM
segment. Only memory segments specified in the array
will be tested.
This way, the SCM prom, the MAC program/process areas,
as well as unavailable memory are excluded from the
read/write test
4.2.7.1.4 L̲T̲U̲ ̲T̲e̲s̲t̲
The specified LTU is checked for accessibility by excercising
the LTU/CR80 shared RAM area. The test is performed
using CR80 I/O instructions activating the prommed
part of the LTU firmware.
4.2.7.1.5 D̲u̲m̲p̲
The DUMP command will dump the requested amount of
RAM or PROM within page boundaries. Message buffer
areas may be dumped as well. However, MAC clears these
buffers whenever it is invoked. The dump consist of
lines such as:
FE08: ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD
where FE08 is the absolute address of the first word
dumped within the specified address, and ABCD is an
example of the contents of the following 8 memory locations.
4.2.7.2 S̲o̲f̲t̲w̲a̲r̲e̲ ̲S̲t̲r̲u̲c̲t̲u̲r̲e̲
MAC is implemented as s CR80 process consisting of
a mainprogram calling the two procedures read ̲command
and perform ̲function until an INIT command is entered
or the power is switched off.
MAC software structure reflects the functional description
given in section 4.2.7.1.
Procedure analyze ̲command compares keywords entered.
Procedure read ̲parameters fetches parameters from the
input line.
Check and dump procedures are described in sections
4.2.7.1.1 through 4.2.7.1.5.
FIGURE 4.2.7.2-1 MAC Software
4.2.7.3 P̲a̲c̲k̲a̲g̲e̲ ̲D̲a̲t̲a̲
CONST
local ̲mode = 76; "ASCII L
maintenance ̲mode = 77; "ASCII M
operational ̲mode = 79; "ASCII O
test ̲mode = 84; "ASCII T
left ̲par = 91; "for prompt
right ̲par = 93;
name ̲size = 18; "keyword size
max ̲mac ̲events =MAX(mac ̲functions);
mac ̲result ̲base =#D000;
"vdu parameters
null = 0; "ASCII NULL
bel = 7;
bs = 8;
lf = 10;…06…1 …02… …02… …02… …02… …02… …02… …02… …02…
…02… …02…
cr = 13;
esc = 27;
del = 127;
line ̲limit = 80;
"SCM parameters
vdu ̲address = 1;
input ̲ready = 1; "status bit no
output ̲ready = 0; "status bit no
get ̲status = #0101;
get ̲command ̲reg = #0301;
clear ̲break = 4;
break ̲done = 5;
ltua ̲address = TBD;
ltub ̲address = TBD;
init ̲process ̲abs ̲ptr= TBD;
scm ̲checksum = TBD; "long constant
eprom ̲checksum = TBD; "long constant
eprom ̲start ̲addr = TBD; "copy eprom during INIT
eprom ̲stop ̲addr = TBD; "copy until stop address
ram ̲prog ̲start ̲addr = TBD; "copy to start addr
TYPE
name ̲block =
RECORD
name: ARRAY(0..name ̲size) OF CHAR;
identifier: mac ̲functions;
legal ̲mode 1,
legal ̲mode 2: integer; "legal modes
END;
mac ̲functions =( "constants for MAC
escape, "attention, break,
legal
unknown, "unknown keyword
unacceptable, "OK, but mode not M
param ̲error, "error in parameters
maintenance, "result line MAC start
logon,
logoff,
show ̲stat,
reset ̲stat,
test,
verify,
check,
dump,
init ̲system);
ascii ̲group = ( "char. classification
back ̲space,
line ̲feed,
delete ̲line,
escape,
carriage ̲return,
normal ̲char)
results = (ok, not ̲ok) "locally used results
module ̲names = ( "used as HW test id
cpu,
eprom,
ram,
ltua,
ltub);
user ̲input =
RECORD
module ̲name: module ̲names;
dump ̲page; "which page to dump on
start ̲addr,
stop ̲addr: integer;
END;
ram ̲config: ARRAY (0..63) OF boolean; "true if tested
mac ̲results = ( "constants displayed IOR #D000
ok,
illegal ̲name, "wrong param
illegal ̲mac ̲function,
scm ̲error,
cpu ̲error,
eprom ̲not ̲responding,
eprom ̲checksum,
ram ̲not ̲responding,
ram ̲addressing ̲error,
ltu ̲ram ̲compare,
ltu ̲ram ̲timeout,
eprom ̲ram ̲copy);
VAR
in ̲buffer: ARRAY (0..line ̲limit) OF CHAR;
char ̲group: ascii ̲group;
mode ̲line, unknown ̲line ̲unacceptable ̲line,
param ̲error ̲line, bs ̲line, lf ̲line, new ̲line, del
̲line, break ̲line, in ̲buffer, out ̲buffer:
ARRAY(0..line ̲limit) OF CHAR;
out ̲char ̲ptr, out ̲char ̲count, in ̲buffer ̲ptr,
in ̲char ̲ptr, in ̲char ̲count:
integer;
command ̲names: ARRAY(0..max ̲mac ̲events) OF name ̲block;
user ̲input ̲params: user ̲input; "record for input
"parameters
mac ̲result: mac ̲results;
ram ̲config: ARRAY (0..63) OF boolean;
checksum ̲acc: LONG;"eprom checksum
accm.
module ̲name: module ̲names; "cpu,
prom
INIT
bs ̲line = bs, null;
lf ̲line = lf, null;
new ̲line = lf, cr, null;
del ̲line = bel, lf, cr, null;
break ̲line = …08…*break*…08…, bel, cr, null;
mode ̲line = cr, lf, left ̲par, …08…M…08…, right ̲par, null;
unknown ̲line = cr, lf, UNKNOWN COMMAND, cr, lf, null;
unacceptable ̲line = cr, lf, …08…UNACCEPTABLE COMMAND…08…,
cr, lf, null;
param ̲error ̲line = cr, lf, …08…PARAMETER ERROR…08…, cr, lf,
null;
command ̲names( 0) = …08…MAINTENANCE …08…, null,
maintenance, local ̲mode, local ̲mode;
command ̲names( 1) = …08…M …08…, null,
maintenance, local ̲mode, local ̲mode;
command ̲names( 2) = …08…LOGON …08…, null,
logon, local ̲mode, local ̲mode;
command ̲names( 3) = …08…LOGOFF …08…, null,
logoff, operational ̲mode, test ̲mode;
command ̲names( 4) = …08…SHOW STATISTICS …08…, null,
show ̲stat, operational ̲mode, test ̲mode;
command ̲names( 5) = …08…S …08…, null,
show ̲stat, operational ̲mode, test ̲mode;
command ̲names( 6) = …08…RESET STATISTICS …08…, null,
reset ̲stat, operational ̲mode, test ̲mode;
command ̲names( 7) = …08…R …08…, null,
reset ̲stat, operational ̲mode, test ̲mode;
command ̲names( 8) = …08…TEST …08…, null,
test, operational ̲mode, operational ̲mode;
command ̲names( 9) = …08…T …08…, null,
test, operational ̲mode, operational ̲mode;
command ̲names(10) = …08…VERIFY …08…, null,
verify, test ̲mode, test ̲mode;
command ̲names(11) = …08…V …08…, null,
verify, test ̲mode, test ̲mode;
command ̲names(12) = …08…SIMULATE …08…, null,
simulate, local ̲mode, local ̲mode;
command ̲names(13) = …08…S …08…, null,
simulate, local ̲mode, local ̲mode;
command ̲names(14) = …08…CHECK …08…, null,
check, maintenance ̲mode, maintenance ̲mode;
command ̲names(15) = …08…C …08…, null,
check, maintenance ̲mode, maintenance ̲mode;
command ̲names(16) = …08…DUMP …08…, null,
dump, maintenance ̲mode, maintenance ̲mode;
command ̲names(17) = …08…D …08…, null,
dump, maintenance ̲mode, maintenance ̲mode;
command ̲names(18) = …08…INIT …08…, null,
init ̲system, maintenance ̲mode, maintenance
̲mode;
command ̲names(19) = …08…I …08…, null,
init ̲system, maintenance ̲mode, maintenance
̲mode;
4.2.7.4 P̲a̲c̲k̲a̲g̲e̲ ̲D̲e̲s̲i̲g̲n̲
4.2.7.4.1 M̲A̲C̲ ̲M̲a̲i̲n̲p̲r̲o̲g̲r̲a̲m̲ ̲P̲s̲e̲u̲d̲o̲ ̲C̲o̲d̲e̲…06…1 …02… …02… …02… …02… …02…
init ̲mac:
disable interrupts
clear message buffer areas
write ̲result ̲vdu(mac ̲function:= maintenance,
mac
̲result:=
ok)(); write
̲line
̲vdu(ADDRESS(mode
̲line))();
"prompt
WHILE A=A DO
BEGIN "endless loop
read ̲command()(mac ̲function);
perform ̲function(mac ̲function)();
END; "while a=a
4.2.7.4.2 R̲e̲a̲d̲ ̲C̲o̲m̲m̲a̲n̲d̲ ̲P̲s̲e̲u̲d̲o̲ ̲C̲o̲d̲e̲
PROCEDURE read ̲command
() "no input
(mac ̲function: mac ̲functions)
input :
none
output :
constants identifying the command entered,
this identifier may indicate an illegal command,
a syntax error, an illegal parameter, or that …08…break…08…
has been entered on the VDU.
function:
read a command from the VDU
procedures called:
analyze ̲command "for recognizing keywords
read ̲char ̲vdu "for fetching characters
write ̲line ̲vdu "echo characters
write ̲char ̲vdu "echo a single character
external data:
in ̲buffer, in ̲char ̲count: integer;
character: char; "character last read
BEGIN "procedure read ̲command
initialize in ̲buffer to null…08…s
in ̲char ̲count:= 0;
char ̲group:= normal ̲char; "start while loop
WHILE char ̲group NE carriage ̲return LOGAND
char ̲group NE escape DO
BEGIN "read charaters into in ̲buffer
IF in ̲char ̲count LT line ̲limit THEN "if too long,
cr
read ̲char ̲vdu()(character)
ELSE
character:= cr; "terminate too long lines
char ̲group:= "classify the character read or set
back ̲space or
line ̲feed or
delete ̲line or
escape or "escape used for indicating break
carriage ̲return or
normal ̲char;
CASE char ̲group OF
back ̲space:
BEGIN
IF in ̲char ̲count GT 0 THEN
BEGIN
in ̲buffer(in ̲char ̲count):= null;
in ̲char ̲count:= in ̲char ̲count-1;
write ̲line ̲vdu(ADDRESS(bs ̲line))(); "echo bs
END;
END;
line ̲feed:
write ̲line ̲vdu(ADDRESS(lf ̲line))(); "echo lf
delete ̲line:
BEGIN
clear in ̲buffer
in ̲char ̲count:= 0;
in ̲buffer(in ̲char ̲count):= del;
write ̲line ̲vdu(ADDRESS(del ̲line))();
END;
escape:
BEGIN "service break on SCM module
clear break on SCM
clear in ̲buffer;
in ̲char ̲count:= 0;
in ̲buffer(in ̲char ̲count):= esc; "escape character
write ̲line ̲vdu(ADDRESS(break ̲line))();
END;
carriage ̲return:
write ̲line ̲vdu(ADDRESS(new ̲line))();"cr and lf
normal ̲char:
BEGIN "insert character in array in ̲buffer
in ̲char ̲count:= in ̲char ̲count+1;
in ̲buffer(in ̲char ̲count):= character;
write ̲char ̲vdu(character)(); "echo char
END;
OTHERWISE ; "ignore character
END; "while NOT cr and NOT escape(break)
"classify command as escape, unknown, unacceptable,
"parameter ̲error, or a legal command using procedure
"analyze ̲command
analyze ̲command(ADDRESS(in ̲buffer), system ̲mode:=
maintenance ̲mode)(mac ̲function);
END; "procedure read ̲command
4.2.7.4.3 R̲e̲a̲d̲ ̲C̲h̲a̲r̲ ̲V̲D̲U̲ ̲P̲s̲e̲u̲d̲o̲ ̲C̲o̲d̲e̲
PROCEDURE read ̲char ̲vdu
() "no input
(character: char) "character read
input :
none
output :
character read on VDU
function:
check break on SCM - if set, then clear break and
set character to esc else sense status until input
character is ready, and read the character from the
SCM module.
procedures called:
none
external data:
constants for SCM commands,
character: char;
local data:
none
BEGIN "procedure read ̲char ̲vdu
"pseudo code
END; "procedure read ̲char ̲vdu
4.2.7.4.4 W̲r̲i̲t̲e̲ ̲C̲h̲a̲r̲ ̲V̲D̲U̲ ̲P̲s̲e̲u̲d̲o̲ ̲C̲o̲d̲e̲
PROCEDURE write ̲char ̲vdu
(character: char)
() "no output
input:
character to be written
output:
none
function:
clear break on SCM module, sense SCM until ready
for output, then write the character to the VDU.
procedures called:
none
external data:
constants for SCM commands,
character: char;
local data:
none
BEGIN "procedure write ̲char ̲vdu
"pseudo code
END; "procedure write ̲char ̲vdu
4.2.7.4.5 W̲r̲i̲t̲e̲ ̲L̲i̲n̲e̲ ̲V̲D̲U̲ ̲P̲s̲e̲u̲d̲o̲ ̲C̲o̲d̲e̲
PROCEDURE write ̲line ̲vdu
(ptr: integer) "pointer to buffer
"terminated by null
() "no output
input :
address of buffer to be written
output :
none
function:
type the characters in the buffer addressed by the
input parammeter until a null character is met
procedures called:
write ̲char ̲vdu
external data:
buffer containing output data,
out ̲char ̲count: index in array to be output
local data:
none
BEGIN "procedure write ̲line ̲vdu
out ̲char ̲count:= 0;
"assume the output array to be output ̲buffer
character:= output ̲buffer(out ̲char ̲count);
WHILE character NE null LOGAND
out ̲char ̲count LT line ̲limit DO
BEGIN "write characters
write ̲char ̲vdu(character)();
out ̲char ̲count:= out ̲char ̲count+1;
character:= output ̲buffer(out ̲char ̲count);
END; "while legal char and count is ok
END; "procedure write ̲line ̲vdu
4.2.7.4.6 A̲n̲a̲l̲y̲z̲e̲ ̲C̲o̲m̲m̲a̲n̲d̲ ̲P̲s̲e̲u̲d̲o̲ ̲C̲o̲d̲e̲
PROCEDURE analyze ̲command
(ptr, "address of in ̲buffer
system ̲mode) "maintenance ̲mode
(mac ̲function)
input :
address of line read holding a command or an escape
character.
output :
constant of type mac ̲functions
function:
check for escape char in position 0 of array,
compare the keyword(s) with the members of array
command ̲names. If the keyword is wrong, set
mac ̲function to unknown. If mode is wrong, mac ̲function:=
unacceptable. Read the pertinent parameters, if not
ok, mac ̲function:= param ̲error.
procedures called:
read ̲parameters
external data:
array command ̲names, "list of keywords
user ̲input ̲params, "input stack
in ̲buffer "input line from VDU
local data:
index in array commnad ̲names
mode1, mode2, "legal modes of keyword
in ̲char ̲count: integer; "current position in in ̲buffer
BEGIN "procedure analyze ̲command
mac ̲function:= unknown;
set user ̲input ̲params to defaults
IF in ̲buffer(0)=esc THEN "escape flags …08…break…08…
mac ̲function:= escape;
ELSE
BEGIN "normal command
compare keywords to elements of array command ̲names,
set index pointing at element in command names
and result
IF result=not ̲ok THEN "keyword not found
mac ̲function:= unknown
ELSE
BEGIN "keyword(s) recognized, index & in ̲char ̲count
"have been updated
mac ̲function:= command ̲names(index).identifier;
mode1:= command ̲names(index).legal ̲mode1;
mode2:= command ̲names(index).legal ̲mode2;
IF mode1 NE maintenance ̲mode LOGAND
mode2 NE maintenance ̲mode THEN
mac ̲function:= unacceptable
ELSE
BEGIN "keyword and mode ok, now fetch parameters
read ̲parameters(mac ̲function,
in ̲char ̲count)(result);
IF result NE ok THEN
MAC ̲function:= param ̲error;
END; "fetch parameters
END; "legal keywords
END; "in ̲buffer was not escape
END; "procedure analyze command
4.2.7.4.7 R̲e̲a̲d̲ ̲P̲a̲r̲a̲m̲e̲t̲e̲r̲s̲ ̲P̲s̲e̲u̲d̲o̲ ̲C̲o̲d̲e̲
PROCEDURE read ̲parameters
(mac ̲function: mac ̲functions,
in ̲char ̲count: integer)
(result: results)
input :
mac ̲function "function identifier
index in in ̲buffer pointing at characters following
the keyword(s)
output:
result = ok or not ̲ok
function:
read the parameters pertinent to the mac ̲function
and store them in the record user ̲input ̲params.
procedures called:
TBD
external data:
user ̲input ̲params "input parameter stack
in ̲buffer "input line
in ̲char ̲count "current index in in ̲buffer
local data:
TBD
BEGIN "procedure read ̲parameters
result:= ok;
CASE mac ̲function OF
check: read check parameters; "CPU, RAM, etc
dump: read and normalize dump parameters; "page,
start
"only dumps within the page are allowed
"start ̲addr therefore LT stop ̲addr
init ̲system: ; "no paramters, no action
OTHERWISE result:= not ̲ok;
END; "procedure read parameters
4.2.7.4.8 P̲e̲r̲f̲o̲r̲m̲ ̲F̲u̲n̲c̲t̲i̲o̲n̲ ̲P̲s̲e̲u̲d̲o̲ ̲C̲o̲d̲e̲
PROCEDURE perform ̲function
(mac ̲function: mac ̲functions)
() "no output
input :
mac ̲function containing the value escape, unknown,
unacceptable, param ̲error, check, dump, or init ̲system.
output :
none
function:
perform the function requested. This may be either
an escape (…08…attention/break…08… indicator), an error message
in response to an illegal command, or a CHECK, DUMP,
or INIT command. When a legal command has been executed,
a result line is output. All events are followed
by a prompt for a new command.
external data:
system ̲mode: integer; "fixed value ASCII M
user ̲input ̲params: user ̲input; "record containing
"input
local data:
module ̲name: module ̲names; "HW module id
BEGIN "procedure perform ̲function
IF mac ̲function = unknown LOGOR
mac ̲function = unacceptable LOGOR
mac ̲function = param ̲error THEN
BEGIN "write error line
CASE mac ̲function OF
unknown: write ̲line ̲vdu(ADDRESS(unknown ̲line))();
unacceptable: write ̲line ̲vdu(ADDRESS
(unacceptable ̲line))();
param ̲error: write ̲line ̲vdu(ADDRESS
(param ̲error ̲line))();
END; "write syntax error messages
ELSE
BEGIN "no syntax error
CASE mac ̲function OF
escape: ; "no action
check:
BEGIN
module ̲name: =
user ̲input ̲params.module ̲name;
CASE module ̲name OF
cpu: check ̲cpu() (mac ̲result);
eprom: check ̲eprom() (mac ̲result);
ram: check ̲ram() (mac ̲result);
ltua,
ltub: check ̲ltu (ADDRESS (user ̲input ̲params))
(mac ̲result);
OTHERWISE mac ̲result: = illegal ̲name;
END;
dump: dump ̲ram (ADDRESS (user ̲input ̲params))
(mac ̲result)
init:
BEGIN "service init
"the EPROM must be checked prior to system load
"according to the PC SRS
check ̲eprom()(mac ̲result);
IF mac ̲result = ok THEN
BEGIN "copy EPROM to RAM and load SGI
copy eprom between eprom ̲start ̲addr and
eprom ̲stop ̲addr to ram starting at ram address
ram ̲prog ̲start ̲addr
IF local time out THEN
mac ̲result:= eprom ̲ram ̲copy
ELSE
LDP(init ̲process ̲abs ̲ptr); "load SGI process
END; "copy eprom and load SGI
END; "init servicing
OTHERWISE mac ̲result: = illegal ̲mac ̲function;
IF mac ̲function NE escape THEN
write ̲result ̲vdu (mac ̲function, mac ̲result) ();
END; "no syntax error
write ̲line ̲vdu (ADDRESS (mode ̲line)) ();
"prompt for new command
END; "procedure perform function
4.2.7.4.9 C̲h̲e̲c̲k̲ ̲C̲P̲U̲ ̲P̲s̲e̲u̲d̲o̲ ̲C̲o̲d̲e̲
PROCEDURE check ̲cpu
() "no input
(mac ̲result: mac ̲results)
input :
none
output :
mac ̲result: hexadecimal integer written on the VDU
as a part of the result line.
function:
enable local interrupts to check SCM prom accessibility,
generate a checksum of the CPU-SCM prom and compare
the results to the constant scm ̲checksum.
If the result is OK, execute a subset of CR80 instructions
from each of the following main groups:
move instructions
jump instructions
arithmetic instructions
shift instructions
single bit instructions
input/output instructions
Update the output variable
procedures called:
none
external data:
scm ̲checksum constant "reference value
result codes "mac ̲results
local data:
TBD
BEGIN "procedure check ̲cpu
"pseudo code
END; " procedure check ̲cpu
4.2.7.4.10 C̲h̲e̲c̲k̲ ̲E̲P̲R̲O̲M̲ ̲P̲s̲e̲u̲d̲o̲ ̲C̲o̲d̲e̲
PROCEDURE check ̲eprom
() "
(mac ̲result: mac ̲results)
input :
none
output :
mac ̲result: hexadecimal
integer written on the VDU
as a part of the result line
function:
enable local interrupts to check whether the EPROM
is accessible
calculate a checksum of the EPROM module and
compare the result to the constant eprom ̲checksum
procedures called:
none
external data:
eprom ̲checksum, "reference value
result codes "constants of type mac ̲results
checksum ̲acc: LONG; "checksum accumulator
local data:
none
BEGIN "procedure check eprom
"pseudo code
END; "procedure check eprom
4.2.7.4.11 C̲h̲e̲c̲k̲ ̲R̲A̲M̲ ̲P̲s̲e̲u̲d̲o̲ ̲C̲o̲d̲e̲
PROCEDURE check ̲ram
()
(mac ̲result: mac ̲results)
input :
none
output :
mac ̲results: hexadecimal integer
written on the VDU as a part of
the result line
function:
enable local interrupts to check RAM accessibility.
Check the addressing logic by storing a test pattern
in RAM outside MAC program and process areas.Read
and compare.
The RAM is tested in blocks of 4k words as indicated
by 64 entries in the array ram ̲config. If an entry
is true, the 4k segment is tested. PROM and non-existing
RAM are masked out.
procedures called:
none
external data:
ram ̲config "array of booleans with 64 entries, one
"for each 4k segment in up to 256k memory
result codes "indicates the type of error, if any
local data:
current ̲page "the memory section under test
current ̲segment "4k segment in page
current ̲address "absolute location
segment ̲count "address counter within a 4k segment
label access ̲error
address ̲error
BEGIN "procedure check ̲ram
interrupt address:= LOCATION (access ̲error)
current ̲segment:= 0;
WHILE current segment LT 64 DO
BEGIN "check presence
IF ram ̲config. (current ̲segment) = true THEN
BEGIN "test segment
segment count:= 0;
REPEAT
compute page and absolute
address of segment start
read contents of current address
store address in current address
read contents of current address
IF contents of address NE current ̲address THEN
BEGIN
store original contents in current address
mac ̲result:= ram ̲addressing ̲error;
GOTO address ̲error
END;
store original contents in current address
segment ̲count: = segment ̲count + 1;
UNTIL segment ̲count = #1000;
END; "test segment
current ̲segment: = current ̲segment + 1;
END; "while current ̲segment LT 64
mac ̲result:= ok;
IF current ̲segment LT 64 THEN
BEGIN "dummy block
access ̲error:
mac ̲result:= ram ̲not ̲responding;
address ̲error: ; "no ̲action
END;
restore program/process context
END; "procedure check ̲ram
4.2.7.4.12 C̲h̲e̲c̲k̲ ̲L̲T̲U̲ ̲P̲s̲e̲u̲d̲o̲ ̲C̲o̲d̲e̲
PROCEDURE check ̲ltu
(ptr: integer) "pointer to user ̲input ̲params
(mac ̲result: mac ̲results)
input :
user ̲input ̲params indicating LTUA or LTUB to be tested.
output :
mac ̲result: hexadecimal integer written on the VDU
as a part of the result line
function:
check for the presence of the specified LTU.
Exercise the LTU/CR80 shared RAM. Start by writing
the following commands to the LTU:
- enable LTU, clear
- load address counter
Write/read/compare all memory locations of the shared
RAM using the current address itself as data.
procedures called:
read ̲ltu(data ̲item, address ̲cmd ̲code)
write ̲ltu(data ̲item, address ̲cmd ̲code)
These "procedures" are implemented as CR80 I/O instructions,
WIO, RIO.
external data:
user ̲input ̲params: user ̲input, "record with input
params.
"indicates LTUA or
LTUB
local data:
ltu ̲address: integer; "ltua ̲address or ltub ̲address
enable ̲clear ̲ltu = #A00; "const. for clear command
load ̲byte ̲pointer = #C0; "const. for load pointer
in LTU
write ̲word ̲cmd = #200; "const.: write word & update
ptr
read ̲word ̲cmd = #100; "const.: read word & update
ptr
test ̲item, data ̲item: integer; "address and contents
BEGIN "procedure check ̲ltu
IF user ̲input ̲params.module ̲name = ltua THEN
ltu ̲address:= ltua ̲address
ELSE
ltu ̲address:= ltub ̲address;
enable local interrupt for trapping time ̲out intrpt's
mac ̲result:= ok; "initiate result code
write ̲ltu(0, enable ̲clear ̲ltu+ltu ̲address); "clear
ltu
write ̲ltu(0,load ̲byte ̲pointer+ltu ̲address);
data ̲item:= 0;
WHILE data ̲item LT #4000 DO
BEGIN
write ̲ltu(data ̲item, write ̲word ̲cmd+ltu ̲address);
write ̲ltu(data ̲item, load ̲byte ̲pointer+ltu ̲address);
"adjust ptr. backwards
read ̲ltu(test ̲item, read ̲word ̲cmd+ltu ̲address);
IF test ̲item NE data ̲item THEN
BEGIN "set result and terminate test
mac ̲result:= ltu ̲ram ̲compare;
data ̲item:= #4000;
END "error
ELSE
data ̲item:= data ̲item+1;
END; "while test loop
IF data ̲item NE #4000 THEN
BEGIN "block only entered in case of interrupt
local ̲interrupt:
mac ̲result:= ltu ̲ram ̲time ̲out; "set error code
disable local interrupts
END;
END; "procedure check ̲ltu
4.2.7.4.13 D̲u̲m̲p̲ ̲R̲A̲M̲ ̲P̲s̲e̲u̲d̲o̲ ̲C̲o̲d̲e̲
PROCEDURE dump ̲ram
(ptr: integer) "address of parameter stack
(mac ̲result: mac ̲results) "result
input :
user ̲input ̲params containing current ̲page, start
̲addr, and stop ̲addr computed from the user input
string
output :
mac ̲result which may be used for indicating a bad
result in case of a non-responding RAM
function:
check the presence of the RAM locations by trapping
local interrupts. Write the absolute address of the
first word word to be output in each line. Write
': '.
Write the hexadecimal contents of the following 8
words in memory. Check for the occurence of 'atttention/break'
and repeat until the desired amount of memory has
been dumped.
procedures called:
write ̲line ̲vdu
write ̲hex ̲vdu "writes a hexadecimal number on the
VDU
external data:
user ̲input"̲params "input parameters
local data:
save ̲psw, "for saving program status word temporarily
dump ̲page, "page 0, 1, 2, or 3
current ̲addr, "absolute address in page
stop ̲addr, "last address to be dumped
line ̲count, "word no in line, 1 through 8
dump ̲word: integer; "current hex word to be dumped
BEGIN "procedure dump ̲ram
enable local interrupt "trap a non responding RAM
"location
current ̲addr:= user ̲input ̲params.start ̲addr;
dump ̲page:= user ̲input ̲params. dump ̲page;
stop ̲addr:= user ̲input ̲params.stop ̲addr;
WHILE current ̲addr LE stop ̲addr DO
BEGIN "at least one word
line ̲count:= 0;
write ̲hex ̲vdu(current ̲addr)(); "write line number
write ̲line ̲vdu(ADDRESS(': ', null))(); "space before
"output
REPEAT
fetch word in memory "addressed by page & cur.
addr
store word in variable dump ̲word
write ̲hex ̲vdu(dump ̲word)();
write ̲char ̲vdu((: :))(); "space
line ̲count:= line ̲count+1;
current ̲address:= current ̲address+1;
UNTIL current ̲addr=stop ̲addr LOGOR
line ̲count=8;
write ̲line ̲vdu(ADDRESS(new ̲line))()
check break on SCM "check break for some time
IF break is set THEN current ̲addr:=stop ̲addr+1;
END; "while current ̲addr LE stop ̲addr
mac ̲result:= ok;
IF 0=1 THEN
BEGIN "only entered when interrupt
time ̲out: mac ̲result:= ram ̲not ̲responding;
END; "interrupt block
disable local interrupts
END; "procedure dump ̲ram
4.2.7.4.14 W̲r̲i̲t̲e̲ ̲R̲e̲s̲u̲l̲t̲ ̲V̲D̲U̲ ̲P̲s̲e̲u̲d̲o̲ ̲C̲o̲d̲e̲
PROCEDURE write ̲result ̲vdu
(mac ̲function: mac ̲functions,
mac ̲result: mac ̲results)
() "no output
input :
mac ̲function: constant identifying a command entered
or an abnormal situation
mac ̲result: hexadecimal integer containing result
output :
none
function:
look up the text string corresponding to the
mac ̲function. The string is a command keyword or
an error message. In both cases the text is fetched
from the array 'command ̲names'.
Type the following on a new line:
(17 char text string) EXECUTED, RESULT= (mac ̲result)
If the mac ̲function is 'check' and module ̲name =
eprom, output the following on a new line:
'CHECKSUM= ' (checksum ̲acc)
Variables module ̲name and checksum ̲acc are declared
in section 4.2.7.3, MAC Package Data. 'checksum ̲acc'
is of type LONG.
procedures called:
write ̲line ̲vdu
write ̲hex ̲vdu
external data:
array 'command ̲names' containing keywords
local data:
TBD
BEGIN "procedure write ̲result ̲vdu
"pseudo code
END; "procedure write ̲result ̲vdu
4.2.7.5 P̲a̲c̲k̲a̲g̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲s̲
MAC loads the SGI process by means of the CR80 load
process instruction. The SGI process base must reside
as indicated by the MAC constant 'init ̲process ̲abs
̲ptr'.
4.2.8 S̲y̲s̲t̲e̲m̲ ̲G̲e̲n̲e̲r̲a̲t̲o̲r̲ ̲a̲n̲d̲ ̲I̲n̲i̲t̲i̲a̲l̲i̲z̲e̲r̲ ̲(̲S̲G̲I̲)̲
The SGI processing is performed by the INIT part of
the AMOS KERNEL and by the ROOT process. The processing
is based on INITLIST.
4.2.8.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
4.2.8.1.1 A̲M̲O̲S̲ ̲S̲t̲a̲r̲t̲u̲p̲
The functions performed by SGI are outlined in the
following:
a) INIT prepares data structures in memory to be used
by KERNEL. These data structures are generated
on the basis of information in INITLIST that specifies
max number of CR80 processes and number of AMOS
message buffers.
The data structures created by INIT are:
- interrupt tables
- monitor jump tables
- process control blocks
- message buffers and event tables
- CPU control blocks
- process area for ROOT
KERNEL then loads and starts ROOT, which is the
first ordinary CR80 process.
ROOT interpretes the modules to be either PROGRAMS,
DATA (for process areas), or TABLES.
Each time ROOT detects a data block, a process
is created in memory. This process is an incarnation
of the program block last encountered.
b) Besides information mentioned above, INITLIST specifies
memory addresses of all specific PC and standard
S/W modules to be included in the operative PC
system.
Processes are started one by one as they are met
in the list.
An extra program named IDLE is included. IDLE consists
of an endless loop doing nothing. IDLE is included
since AMOS must have at least one process which
is never suspended. Also a RTC program is included
to take care of the system timing.
4.2.8.1.2 I̲m̲p̲l̲e̲m̲e̲n̲t̲a̲t̲i̲o̲n̲ ̲o̲f̲ ̲S̲G̲I̲ ̲T̲a̲s̲k̲s̲
The functions specified in Reference 17 to be performed
by SGI comprise:
a) startup of AMOS and LTU drivers
b) PC system generation
c) EPROM checksumming
d) LTU boot loading
a) and b) are implemented by KERNEL and ROOT.
c) is performed by MAC when the INIT command has been
entered, cf. section 4.2.7.4.8.
d) is performed by the two versions of the LTU drivers
servicing the SCARS/CAMPS (SCAMPS) link and the CCIS
link, respectively. These drivers are implemented as
two processes named SCADRV for the SCAMPS LTU and CISDRV
for the CCIS LTU. Upon completion of the bootload tasks
each LTU driver sends an AMOS signal to the CI process
allowing it to receive commands from the operator.
4.2.8.2 P̲a̲c̲k̲a̲g̲e̲ ̲D̲a̲t̲a̲
The list of running CR80 processes will, according
to the above discussion, have the following lay-out:
̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲ ̲
^ ^ ^
^ N̲A̲M̲E̲ ^ C̲R̲8̲0̲ ̲S̲Y̲S̲T̲E̲M̲/̲A̲P̲P̲L̲I̲C̲A̲T̲I̲O̲N̲ ̲P̲A̲C̲K̲A̲G̲E̲ ^
^ ^ ^
^ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲^̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲^
^ ^ ^
^ RTC ^ real time clock ^
^ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲^̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲^
^ ^ ^
^ KERNEL ^ initialization of data structures ^
^ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲^̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲^
^ ^ ^
^ ROOT ^ startup of processes ^
^ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲^̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲^
^ ^ ^
^ IDLE ^ idle process ^
^ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲^̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲^
^ ^ ^
^ SCADRV ^ CAMPS/SCARS LTU driver ^
^ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲^̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲^
^ ^ ^
^ CISDRV ^ CCIS LTU driver ^
^ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲^̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲^
^ ^ ^
^ TRC ^ Traffic Controller ^
^ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲^̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲^
^ ^ ^
^ CSPA ^ CAMPS/SCARS Protocol Adaptor ^
^ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲^̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲^
^ ^ ^
^ CPA ^ CCIS Protocol Adaptor ^
^ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲^̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲^
^ ^ ^
^ CI ^ Command Interpreter ^
^̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲^̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲^̲
TABLE 4.2.8.2-1 PC CR80 Processes
MAC replaces the usual CR80 boot loader residing in
the
CPU-SCM prom and is unaffected by SGI. MAC copies the
PC software of Table 4.2.8.2-1 from EPROM to RAM and
then loads SGI.
CSLP and CLP are loaded into the LTU's from EPROM by
processes SCADRV and CISDRV.