Trailing-Edge
-
PDP-10 Archives
-
decuslib10-06
-
43,50415/adres.ovh
There are 2 other files named adres.ovh in the archive. Click here to see a list.
1STRUKTURERAD PR0GRAMMERING
+__________________________
(VAD JAG MENAR MED DET)
UPPDELNING I SM$ ENHETER
MED V#L-DEFINIERAT INTERFACE
T0P-D0WN STRUKTUR: ENHETER
P$ H@GRE NIV$ ANV#NDER
BEGREPP DEFINIERADE P$
L#GRE NIV$
PR0GRAMMETS STRUKTUR
KVAR #VEN N#R PR0GRAMMET
#R KLART
L#SLIG PR0GRAMK0D
ERS#TTER K0MMENTARER
1ADRESS-PR0GRAMMET
+_________________
F0RMATTERA ADRESS-
REGISTER TILL ETIKETT-
ARK
SELEKTERA 0CH S0RTERA
ADRESSREGISTER
K0MMAND0STYRT,
HJ#LPFACILITET
1F0A.LAB=F0A.ADR/SELECT/PRES0RT
SWITCH DEFAULT IN 0UT
+________________________
/N0LABEL LABEL .ADR .LAB
/LIST N0 .ADR .LST
/FILE N0 .ADR .ADR
/PRES0RT N0 .ADR .USR
/AS0RT N0 .SRT .ADR
/0UT1 N0 .ADR ?
/SELECT N0 .ADR ?
/N0CASESHIFT CASESHIFT
/LINES:N 5
/LABELS:N 3
/LEFT:N 6
/WIDTH:N 34
/TAB:N 36
/LINE1:N 300
/LINE2:N 80
/N0TABS TABS
/SINGLE N0
1INITIALIZE_C0NSTANTS; <==
WHILE TRUE D0
+_____ ____ __
BEGIN
+_____
==> READ_INPUT_C0MMAND;
==> 0PEN_FILES;
==> CREATE_LABELS;
RESUME(FIRST_LABEL);
==> CL0SE_FILES;
==> MESSAGE_END_0F_PR0CESSING;
END 0F INPUT_C0MMAND_L00P;
+___
1BEGIN REF (LABEL_DATA) FIRST_LABEL;
+_____ ___
PR0CEDURE INITIALIZE_C0NSTANTS;
+ _________
BEGIN END;
+ _____ ___
PR0CEDURE READ_INPUT_C0MMAND;
+ _________
BEGIN INIMAGE; END;
+ _____ ___
PR0CEDURE 0PEN_FILES;
+ _________
BEGIN END;
+ _____ ___
CLASS LABEL_DATA;
+ _____
BEGIN DETACH; END;
+ _____ ___
PR0CEDURE CREATE_LABELS;
+ _________
BEGIN FIRST_LABEL:- NEW LABEL_DATA; END;
+ _____ ___ ___
PR0CEDURE CL0SE_FILES;
+ _________
BEGIN END;
+ _____ ___
PR0CEDURE MESSAGE_END_0F_PR0CESSING;
+ _________
BEGIN END;
+ _____ ___
1BEGIN REF (LABEL_DATA) FIRST_LABEL;
+_____ ___
PR0CEDURE INITIALIZE_C0NSTANTS;
+ _________
BEGIN END;
+ _____ ___
PR0CEDURE READ_INPUT_C0MMAND;
+ _________
BEGIN INIMAGE; END;
+ _____ ___
PR0CEDURE 0PEN_FILES;
+ _________
BEGIN END;
+ _____ ___
CLASS LABEL_DATA;
+ _____
BEGIN DETACH; END;
+ _____ ___
PR0CEDURE CREATE_LABELS;
+ _________
BEGIN FIRST_LABEL:- NEW LABEL_DATA; END;
+ _____ ___ ___
PR0CEDURE CL0SE_FILES;
+ _________
BEGIN END;
+ _____ ___
PR0CEDURE MESSAGE_END_0F_PR0CESSING;
+ _________
BEGIN END;
+ _____ ___
INITIALIZE_C0NSTANTS;
WHILE TRUE D0
+ _____ ____ __
BEGIN
+ _____
READ_INPUT_C0MMAND;
0PEN_FILES;
CREATE_LABELS;
RESUME (FIRST_LABEL);
CL0SE_FILES;
MESSAGE_END_0F_PR0CESSING;
END 0F INPUT_C0MMAND_L00P;
+ ___
END 0F THE WH0LE PR0GRAM;
+___
1PR0CEDURE MESSAGE_END_0F_PR0CESSING;
+_________
BEGIN
+_____
D0TYPE0UT(SYS0UT); 0UTIMAGE;
==> 0UTLINE("(ADRES PR0CESSING IS READY.)");
+ _____
==> C0UNTPRINT("LABELS IN: ",C0UNT_0F_INPUT);
+ ______ __
==> C0UNTPRINT(" LABELS 0UT: ",C0UNT_0F_0UTPUT);
+ ______ ___
IF C0UNT_0F_ERR0R > 0 THEN
+ __ ____
BEGIN
+ _____
==> C0UNTPRINT(
" UNACCEPTABLE LABELS IN: "
+ ____________ ______ __
,C0UNT_0F_ERR0R);
END;
+ ___
.............
LABELS IN: 123 LABELS 0UT: 112
1PR0CEDURE SET_TAB_SETTINGS_0N_THE_TERMINAL;
+_________
INSPECT 0UTFILEREF D0
+_______ __
BEGIN
+_____
0UTTEXT(M0T0R0N); 0UTTEXT(REM0VETABS); 0UTIMAGE;
SETP0S(P0S+LEFT_MARGIN); 0UTTEXT(SETTAB);
F0R I:= 2 STEP 1 UNTIL LABELS_PER_WIDTH D0
+ ___ ____ _____ __
BEGIN
+ _____
SETP0S(P0S+LABEL_SPACING); 0UTTEXT(SETTAB);
END;
+ ___
END;
+___
1PR0CEDURE CREATE_LABELS;
+_________
BEGIN
+_____
INTEGER LABEL_N0;
+ _______
FIRST_LABEL:- N0NE;
+ ____
F0R LABEL_N0:= 1 STEP 1
+ ___ ____
UNTIL LABELS_PER_WIDTH D0
+ _____ __
IF FILE_0UTPUT THEN
+ __ ____
==> NEW FILE_ADDRESS ELSE
+ ___ ____
IF PRES0RT_0UTPUT THEN
+ __ ____
==> NEW PRES0RT_ADDRESS ELSE
+ ___ ____
IF AS0RT_0UTPUT THEN
+ __ ____
==> NEW AS0RT_ADDRESS ELSE
+ ___ ____
==> NEW LABEL_ADDRESS;
+ ___
END 0F CREATE_LABELS;
+___
1CLASS LABEL_DATA;
+_____
BEGIN
+_____
REF (LABEL_DATA) NEXT;
+ ___
TEXT LINE_BUFFER, S0RT_BUFFER;
+ ____
TEXT ARRAY LINE(1:LINE_DIMENSI0N),
+ ____ _____
STRIPLINE(1:LINE_DIMENSI0N);
IF FIRST_LABEL == N0NE
+ __ ____
THEN FIRST_LABEL:- THIS LABEL_DATA
+ ____ ____
ELSE LAST_LABEL.NEXT:- THIS LABEL_DATA;
+ ____ ____
NEXT:- FIRST_LABEL;
LAST_LABEL:- THIS LABEL_DATA;
+ ____
LINE_BUFFER:-
.........
END 0F LABEL_DATA;
+___
1CLASS LABEL_DATA;
+_____
LABEL_DATA CLASS LABEL_0PERATI0NS;
+ _____
LABEL_0PERATI0NS CLASS LABEL_ADDRESS;
+ _____
LABEL_0PERATI0NS CLASS FILE_ADDRESS;
+ _____
LABEL_0PERATI0NS CLASS AS0RT_ADDRESS;
+ _____
LABEL_0PERATI0NS CLASS PRES0RT_ADDRESS;
+ _____
1LABEL_0PERATI0NS CLASS LABEL_ADDRESS;
+ _____
BEGIN
+_____
DETACH; WHILE TRUE D0
+ _____ ____ __
BEGIN
+ _____
==> NEXTIN: READ_AN_ADDRESS;
==> IF N0T CAN_BE_REF0RMATTED AND
+ __ ___ ___
N0T END_0F_FILE THEN G0T0 NEXTIN;
+ ___ ____ ____
IF THIS LABEL_ADDRESS == FIRST_LABEL
+ __ ____
AND END_0F_FILE THEN DETACH
+ ___ ____
ELSE IF LABELS_PER_WIDTH > 1
+ ____ __
--> THEN RESUME(NEXT);
+ ____
==> IF N0T ERASED_ADDRESS THEN 0UTPUT_C0UNT;
+ __ ___ ____
F0R LINE_NUMBER:= 2 STEP 1
+ ___ ____
UNTIL LASTLINEP1 D0
+ _____ __
BEGIN
+ _____
==> WRITE_LINE(IF LINE_NUMBER
+ __
NUMBER_0F_LINES THEN
+ ____
==> STRIPLINE(LINE_NUMBER) ELSE N0TEXT);
+ ____ ______
IF LABELS_PER_WIDTH > 1
+ __
--> THEN RESUME(NEXT);
+ ____
END 0F F0R L00P;
+ ___
END 0F WHILE L00P;
+ ___
END 0F LABEL_ADDRESS;
+___
1PR0CEDURE READ_AN_ADDRESS;
+_________
INSPECT INFILEREF D0
+_______ __
BEGIN
+_____
T0P: NUMBER_0F_LINES:=
IF LINE1_0UTPUT THEN 2 ELSE 1;
+ __ ____ ____
IF FAULTY_ADDRESS THEN
+ __ ____
C0UNT_0F_ERR0R:= C0UNT_0F_ERR0R+1;
ERASED_ADDRESS:=
FAULTY_ADDRESS:= FALSE;
+ _____
IF ENDFILE THEN
+ __ ____
BEGIN
+ _____
END_0F_FILE:= TRUE;
+ ____
==> ERASE_ADDRESS;
END ELSE
+ ___ ____
1BEGIN
+_____
C0UNT_INPUT; <==
AGAIN:
WHILE N0T ENDFILE AND NUMBER_0F_LINES <= IN_DIMENSI0N D0
+ _____ ___ ___ __
BEGIN
+ _____
IMAGE:- LINE(NUMBER_0F_LINES);
INIMAGE; IF ENDFILE THEN IMAGE:= N0TEXT;
+ __ ____ ______
STRIPLINE(NUMBER_0F_LINES):- LINE(NUMBER_0F_LINES).STRIP;
IF STRIPLINE(NUMBER_0F_LINES) == N0TEXT AND
+ __ ______ ___
NUMBER_0F_LINES
> 1 THEN G0T0 AGAIN;
+ ____ ____
STRIPLINE(NUMBER_0F_LINES).SETP0S(STRIPLINE(
NUMBER_0F_LINES
).LENGTH);
IF NUMBER_0F_LINES > 1 THEN
+ __ ____
WHILE STRIPLINE(NUMBER_0F_LINES).LENGTH >
+ _____
==> LABEL_WIDTH D0 DIVIDE_LINE;
+ __
IF (IF STRIPLINE(NUMBER_0F_LINES) = N0TEXT THEN ' ' ELSE
+ __ __ ______ ____ ____
STRIPLINE(NUMBER_0F_LINES).GETCHAR) = F0RMFEED THEN
+ ____
BEGIN C0MMENT END 0F ADDRESS;
+ _____ _______
STRIPLINE(NUMBER_0F_LINES):-
STRIPLINE(NUMBER_0F_LINES).SUB(1,
STRIPLINE(NUMBER_0F_LINES).LENGTH-1);
IF STRIPLINE(NUMBER_0F_LINES) = N0TEXT THEN
+ __ ______ ____
NUMBER_0F_LINES:= NUMBER_0F_LINES-1;
G0T0 0UT;
+ ____
END;
+ ___
NUMBER_0F_LINES:= NUMBER_0F_LINES+1;
END;
+ ___
1 IF ENDFILE THEN NUMBER_0F_LINES:=
+ __ ____
NUMBER_0F_LINES-1;
IF NUMBER_0F_LINES > IN_DIMENSI0N THEN
+ __ ____
==> BEGIN T00_MANY_LINES; G0T0 T0P;
+ _____ ____
END;
+ ___
0UT: IF NUMBER_0F_LINES <= 1 THEN
+ __ ____
BEGIN IF ENDFILE 0R C0UNT_0F_INPUT = 1 THEN
+ _____ __ ____
C0UNT_0F_INPUT:= C0UNT_0F_INPUT-1 ELSE
+ ____
BEGIN NUMBER_0F_LINES:= 10;
+ _____
==> ERR0R(
"N0 TEXT IN ADDRESS AFTER 0R AT:");
+ _
END;
+ ___
G0T0 T0P;
+ ____
END;
+ ___
IF SELECT_0UTPUT THEN
+ __ ____
==> BEGIN IF N0T SELECT_THIS_ADDRESS
+ _____ __ ___
THEN G0T0 T0P;
+ ____ ____
END; END;
+ ___ ___
END 0F READ_AN_ADDRESS;
+___
1B00LEAN PR0CEDURE SELECT_THIS_ADDRESS;
+_______ _________
BEGIN
+_____
B00LEAN SELECT;
+ _______
==> IF LINE_SCAN
+ __
(LINE1_C0NDITI0N,STRIPLINE(1)) THEN
+ ____
BEGIN
+ _____
==> IF ARRAY_SCAN(LINE2_C0NDITI0N,
+ __
STRIPLINE,2,NUMBER_0F_LINES)
THEN
+ ____
SELECT:= TRUE;
+ ____
END;
+ ___
IF N0T SELECT THEN
+ __ ___ ____
C0UNT_0F_REJECTED:=
C0UNT_0F_REJECTED+1;
SELECT_THIS_ADDRESS:= SELECT;
END;
+___
1B00LEAN PR0CEDURE CAN_BE_REF0RMATTED;
+_______ _________
BEGIN
+_____
==> IF REF0RMAT_FIRST_ALG0RITHM THEN
+ __ ____
CAN_BE_REF0RMATTED:= TRUE ELSE
+ ____ ____
==> IF REF0RMAT_SEC0ND_ALG0RITHM THEN
+ __ ____
CAN_BE_REF0RMATTED:= TRUE ELSE
+ ____ ____
==> ERR0R(
"T00 MUCH TEXT IN THIS ADDRESS");
+ _
END 0F CAN_BE_REF0RMATTED;
+___
1B00LEAN PR0CEDURE REF0RMAT_FIRST_ALG0RITHM;
+_______ _________
BEGIN
+_____
INTEGER FIRSTN0, SEC0NDN0;
+ _______
REF0RMAT_FIRST_ALG0RITHM:= TRUE;
+ ____
WHILE NUMBER_0F_LINES > LASTLINE D0
+ _____ __
BEGIN
+ _____
FIRSTN0:= 2; SEC0NDN0:= 3;
F0R LINE_NUMBER:= 3 STEP 1 UNTIL NUMBER_0F_LINES D0
+ ___ ____ _____ __
BEGIN
+ _____
WHILE STRIPLINE(SEC0NDN0) == N0TEXT D0
+ ______ __
SEC0NDN0:= SEC0NDN0+1;
IF STRIPLINE(FIRSTN0).LENGTH +
+ __
STRIPLINE(SEC0NDN0).LENGTH + 2 < LABEL_WIDTH THEN
+ ____
BEGIN
+ _____
MAINLINE:- LINE(FIRSTN0);
MAINLINE.SETP0S(STRIPLINE(FIRSTN0).LENGTH+1);
PUTTEXT(MAINLINE,", ");
PUTTEXT(MAINLINE,STRIPLINE(SEC0NDN0));
STRIPLINE(FIRSTN0):- MAINLINE.STRIP;
STRIPLINE(SEC0NDN0):- N0TEXT;
+ ______
NUMBER_0F_LINES:= NUMBER_0F_LINES-1;
G0T0 C0MPRESSM0RE;
+ ____
END;
+ ___
FIRSTN0:= SEC0NDN0; SEC0NDN0:= FIRSTN0+1;
END;
+ ___
REF0RMAT_FIRST_ALG0RITHM:= FALSE; G0T0 0UT;
+ _____ ____
C0MPRESSM0RE:
END;
+ ___
0UT: SEC0NDN0:= 3;
F0R LINE_NUMBER:= 3 STEP 1 UNTIL NUMBER_0F_LINES D0
+ ___ ____ _____ __
BEGIN
+ _____
WHILE STRIPLINE(SEC0NDN0) == N0TEXT
+ _____ ______
D0 SEC0NDN0:= SEC0NDN0+1;
+ __
STRIPLINE(LINE_NUMBER):- STRIPLINE(SEC0NDN0);
SEC0NDN0:= SEC0NDN0+1;
END;
+ ___
END;
+___
1PR0CEDURE READ_INPUT_C0MMAND;
+_________
BEGIN CHARACTER C;
+_____ _________
PR0MPT:
DISPLAYDEFAULT:= FALSE;
+ _____
REQUEST("*",N0DEFAULT, <==
TEXTINPUT(C0MMAND,
INTERPRET_LEGAL_C0MMAND), <==
N0TEXT,ADRES_HELP("")); <==
+ ______
SET_DEPENDENT_PARAMETERS; <==
END 0F READ_INPUT_C0MMAND;
+___
1B00LEAN PR0CEDURE INTERPRET_LEGAL_C0MMAND;
+_______ _________
BEGIN
+_____
==> IF N0T DECC0M(UPCASE(C0MMAND),
+ __ ___
0UTFILENAME,INFILENAME)
THEN G0T0 0UT;
+ ____ ____
DISPLAYDEFAULT:= TRUE;
+ ____
==> INTERPRET_INTEGER_SWITCHES;
==> INTERPRET_B00LEAN_SWITCHES;
IF SELECT_0UTPUT THEN
+ __ ____
==> REQUEST_SELECT0RS ELSE
+ ____
LINE1_C0NDITI0N:- LINE2_C0NDITI0N:- N0NE;
+ ____
==> IF N0T ILLEGALSWITCH(
+ __ ___
"UNINTERPRETABLE 0R DUPLICATE SWITCH: /"
+ _
==> ,ADRES_HELP(""))
THEN INTERPRET_LEGAL_C0MMAND:=
+ ____
==> FILES_CAN_BE_CREATED;
0UT:
END;
+___
1PR0CEDURE INTERPRET_INTEGER_SWITCHES;
+_________
BEGIN
+_____
==> INTSWITCH("LINES","5",
+ _____
MAX_NUMBER_0F_LINES,
MAX_NUMBER_0F_LINES > 0 AND
+ ___
MAX_NUMBER_0F_LINES < 11,
"MUST BE BETWEEN 0 AND 11",
+ _
==> ADRES_HELP(" /LINES"));
+ _____
.............
==> INTSWITCH("WIDTH","34",
+ _____
LABEL_WIDTH,LABEL_WIDTH > 5
AND LABEL_WIDTH <
+ ___
(132-LEFT_MARGIN)/
+ /LABELS_PER_WIDTH,
"T00 LARGE 0R < 6",
+ _
==> ADRES_HELP(" /WIDTH"));
+ _____
..............
1B00LEAN PR0CEDURE ADRES_HELP(SELECT0R);
+_______ _________
VALUE SELECT0R; TEXT SELECT0R;
+_____ ____
BEGIN
+_____
IF SELECT0R == N0TEXT AND
+ __ ______ ___
SYSIN.IMAGE =/= N0TEXT THEN
+ ______ ____
BEGIN
+ _____
C0MMAND:- SYSIN.IMAGE.STRIP;
C0MMAND.SETP0S(1);
IF C0MMAND.GETCHAR = '?' THEN
+ __ ____
SELECT0R:-
C0MMAND.SUB(2,C0MMAND.LENGTH-1);
END;
+ ___
==> SQHELP("ADRES",SELECT0R,19,72);
+ _____
END;
+___
1- - - - - - - - - - - - - - - - - PAGE 3 SELECT.SIM (105,120) 2-MAR-1976 0:00
+ ____ ______ ___ ___
21
22 PR0CEDURE SET_0PERAT0R_CHARACTERS(T);
+ _________
23 VALUE T; TEXT T;
+ _____ ____
B2 24 BEGIN
+_ _____
25 0P_CHARS:- T;
26 AND_CHAR:= T.GETCHAR;
27 0R_CHAR:= T.GETCHAR;
28 N0T_CHAR:= T.GETCHAR;
29 LEFT_PARENTHESIS:= T.GETCHAR;
30 RIGHT_PARENTHESIS:= T.GETCHAR;
E2 31 END;
+_ ___
- - - - - - - - - - - - - - - - - PAGE 4 SELECT.SIM (105,120) 2-MAR-1976 0:00
+ ____ ______ ___ ___
32
33
34 CLASS 0PERAT0R(W0RD);
+ _____
35 VALUE W0RD; TEXT W0RD;
+ _____ ____
B3 36 BEGIN
+_ _____
37 B00LEAN F0UND, CASESHIFT;
+ _______
38 L00P:
39 DETACH; INNER;
+ _____
40 G0T0 L00P;
+ ____
E3 41 END;
+_ ___
- - - - - - - - - - - - - - - - - PAGE 5 SELECT.SIM (105,120) 2-MAR-1976 0:00
+ ____ ______ ___ ___
42
43
44 0PERAT0R CLASS SEARCH_0PERAT0R;
+ _____
B4 45 BEGIN
+_ _____
46 IF ARRAY_SEARCH THEN
+ __ ____
B5 47 BEGIN
+_ _____
48 F0UND:= FALSE;
+ _____
49 F0R LA_INDEX:= 1 STEP 1 UNTIL LA_MAX D0
+ ___ ____ _____ __
B6 50 BEGIN
+_ _____
51 LINE:- LINE_ARRAY(LA_INDEX); LINE.SETP0S(1);
52 IF SEARCH(LINE,W0RD) <
+ __
53 LINE.LENGTH THEN G0T0 G00D;
+ ____ ____
E6 54 END;
+_ ___
55 IF FALSE THEN G00D: F0UND:= TRUE;
+ __ _____ ____ ____
E5 56 END ELSE
+_ ___ ____
B7 57 BEGIN
+_ _____
58 LINE.SETP0S(1);
59 F0UND:= SEARCH(LINE,W0RD) < LINE.LENGTH;
E7 60 END;
+_ ___
E4 61 END;
+_ ___
- - - - - - - - - - - - - - - - - PAGE 6 SELECT.SIM (105,120) 2-MAR-1976 0:00
+ ____ ______ ___ ___