summaryrefslogtreecommitdiff
path: root/system/base/1.7.5/src/pcb control
diff options
context:
space:
mode:
Diffstat (limited to 'system/base/1.7.5/src/pcb control')
-rw-r--r--system/base/1.7.5/src/pcb control79
1 files changed, 79 insertions, 0 deletions
diff --git a/system/base/1.7.5/src/pcb control b/system/base/1.7.5/src/pcb control
new file mode 100644
index 0000000..9bf0e2d
--- /dev/null
+++ b/system/base/1.7.5/src/pcb control
@@ -0,0 +1,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 ;
+