1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
PACKET pcb and init control DEFINES (* Autor: J.Liedtke *)
(* Stand: 25.08.84 *)
session ,
pcb ,
set line nr ,
clock ,
INITFLAG ,
:= ,
initialized ,
storage ,
id ,
ke :
LET line number field = 1 ,
myself id field = 9 ;
TYPE INITFLAG = INT ;
INT PROC session :
EXTERNAL 126
ENDPROC session ;
INT PROC pcb (INT CONST field) :
EXTERNAL 80
ENDPROC pcb ;
PROC write pcb (INT CONST task nr, field, value) :
EXTERNAL 105
ENDPROC write pcb ;
PROC set line nr (INT CONST value) :
write pcb (pcb (myself id field), line number field, value)
ENDPROC set line nr ;
OP := (INITFLAG VAR flag, BOOL CONST flagtrue) :
IF flagtrue
THEN CONCR (flag) := myself no
ELSE CONCR (flag) := 0
FI .
myself no : pcb (myself id field) AND 255 .
ENDOP := ;
BOOL PROC initialized (INITFLAG VAR flag) :
IF CONCR (flag) = myself no
THEN TRUE
ELSE CONCR (flag) := myself no ;
FALSE
FI .
myself no : pcb (myself id field) AND 255 .
ENDPROC initialized ;
REAL PROC clock (INT CONST nr) :
EXTERNAL 102
ENDPROC clock ;
PROC storage (INT VAR size, used) :
EXTERNAL 89
ENDPROC storage ;
INT PROC id (INT CONST no) :
EXTERNAL 129
ENDPROC id ;
PROC ke :
EXTERNAL 6
ENDPROC ke ;
ENDPACKET pcb and init control ;
|