|
|
DataMuseum.dkPresents historical artifacts from the history of: Bogika Butler |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Bogika Butler Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 3328 (0xd00)
Types: TextFile
Names: »CLOCK.SA«
└─⟦2322e079b⟧ Bits:30009789/_.ft.Ibm2.50006594.imd Mogens Pelles Zilog 80,000 / EOS projekt
└─⟦this⟧ »CLOCK.SA«
└─⟦311ba069f⟧ Bits:30009789/_.ft.Ibm2.50006625.imd Mogens Pelles Zilog 80,000 / EOS projekt
└─⟦this⟧ »CLOCK.SA«
└─⟦49237ce80⟧ Bits:30009789/_.ft.Ibm2.50006627.imd Mogens Pelles Zilog 80,000 / EOS projekt
└─⟦this⟧ »CLOCK.SA«
└─⟦8fc713706⟧ Bits:30009789/_.ft.Ibm2.50007356.imd Mogens Pelles Zilog 80,000 / EOS projekt
└─⟦this⟧ »CLOCK.SA«
æ*****************************************************************
Copyright 1984 by
NCR Corporation
Dayton, Ohio U.S.A.
All Rights Reserved
******************************************************************
EOS Software produced by:
NCR Systems Engineering - Copenhagen
Copenhagen
DENMARK
*****************************************************************å
object program clock;
æ$H=0 No heap space å
æ C L O C K object written by V I L H E L M R O S E N Q V I S T å
const orgNo =0 ; orgSys =12 ;
versid='clock version 1.00 83-11-25 ';
æ$L-å
æ$F=FAMILY.UNIV.IDå
æ$F=FAMILY.KNEL.IDå
æ$F=FAMILY.SCHED.IDå
æ$L+å
æ$F=FAMILY.CLOCK.IDå
procedure startPTM; forward;
procedure printText(t:fullId); forward;
procedure megaDivMod(var t : uSecType; var q, r : integer);
type byte8 = array Æ0..7Å of byte;
var i, b : integer;
begin
q:=0; r:=0;
for i:= 0 to 7 do begin
b:= t:byte8ÆiÅ;
if b < 0 then b:= b + 256;
r:= r*256 + b;
q:= q*256 + r div 1000000;
r:= r mod 1000000;
end ;
end ;
type clockData = record
baseTime : integer; æ 32 bits å
baseCnt : integer; æ 32 bits å
end ;
type clockPtrs = record
code : ^^;
cData : ^^clockData;
intsched : ^^scheduler;
æ alloc : ^^allocate; å
æ security : ^^; å
end ;
æ$Eå
program clockSys object clock with clockPtrs;
entry getClock æ; out seconds, optionally: out usecs å
with record t:^^ end;
var cnt,cpu : uSecType; res : resultType;
usec : integer;
param : ^integer;
begin
æ#ENTRY# printText('Clock.GETTIME ') &ENTRY&å ;
with c=cData^^ do begin
res:= GetTime(cnt,cpu); æ cnt:= real time counter in kernel å
megaDivMod(cnt,seconds,usec);
seconds:=seconds-c.baseCnt+c.baseTime;
if nextValArg(param) then begin
param^:=usec;
end ;
end æwithå ;
end ægetTimeå;
entry setClock æ; seconds å
with record t:^^;
ig : ^^ gate;
end ;
var xxx,cnt,cpu : uSecType; res : resultType;
i : integer;
begin
æ#ENTRY#å printText( versid ) æ&ENTRY&å ;
with c=cData^^ do begin
res:= GetTime(xxx,cpu);
res:= GetTime(cnt,cpu);
æ perform security check on caller å
æ**********************************å
if ( xxx.highOrder=cnt.highOrder ) and ( xxx.lowOrder=cnt.lowOrder ) then begin
æ obs obs obs this code is for the EXORmacs version only ? å
æ the kernel counter is not running å
res:= intsched.newGate(out ig; in 1);
res:= ig.lock; æ enter driver mode, context becomes resident å
startPTM; æ allow PTM chip to operate å
res:= ig.open;
end ;
c.baseTime:= seconds;
megaDivMod(cnt,c.baseCnt,i);
end æwithå ;
end æsetTimeå;
otherwise error with record t:^^; end;
var res : resultType;
begin
res.main:= - entryIllegal;
res.family:= universal;
res.orgSys:=orgSys;
res.orgNo :=orgNo;
objReturn(res);
end ;
end æclockSyså ;
initialize clockSys 'clock' : cData, intsched 'intscheduler'
end.
«eof»