DataMuseum.dk

Presents historical artifacts from the history of:

RC4000/8000/9000

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RC4000/8000/9000

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦54ffc2ebe⟧ TextFile

    Length: 5376 (0x1500)
    Types: TextFile
    Names: »nextnumberx«

Derivation

└─⟦00964e8f7⟧ Bits:30007478 RC8000 Dump tape fra HCØ.
    └─⟦b2ec5d50f⟧ 
        └─⟦0f6e8048b⟧ »preditfile« 
            └─⟦this⟧ 

TextFile


\f



comment predit text           * page 45   11 02 80, 16.42
0 1 2 3 4 5 6 7 8 9 ;  

comment case 12, nextnumber
nextnumber is used to create or change non area entries
describing magtapes

call:

a) nextnumber<s><entryname>.<init><s><tapelabel>

b) nextnumber<s><entryname>.<number>.<s><low>.<high><s><mtletters>

the call a) will initialize a catalog entry on scope
temp, pointing to file 1 on the tape<tapelabel>.

the call b) will change the tail of an existing catalog entry
to point to a magtape having the mtnumber of the existing
tail raised by <number>.

the program is usefull when having a series of worktape
such as dumptapes going from mtme<low> to mtme<high>.
You may then create a catalog entry pointing to mtme<low>
by using the call a) and give it a permanent scope.
When you need the the next
tape in the serie you may use te call b) with <number> = 1.
When the tape mtme<high> has been used the next call b)
will choose mtme<low> as the next tape.

;  

begin
  integer i, j, p, h, l;  
  boolean init, mttest;  
  integer array  tail(1:10);  
  array tapename, plus, low, high, mtname(1:2);  
  long array field longdoc, mtlaf;  

  procedure stop(s);  
  ____________________
  string s;  
  system(9, 0*write(out, <:<10>*** :>, s), <:<10>system9:>);  

  procedure stap(a, s);  
  ______________________
  array a;  string s;  
  begin
    long array field lafl;  
    lafl:=0;  
    system(9, 0*write(out, <:<10>*** :>, 
    (a.lafl), s), <:<10>system9:>);  
  end;  

\f



comment predit text           * page 46   11 02 80, 16.42
0 1 2 3 4 5 6 7 8 9 ;  

  integer procedure xlookupproc(tapenamep, tailp, mtnamep);  
  ____________________________________________
  array tapenamep, mtnamep;  integer array  tailp;  
  begin integer i, M, x;  
    long tailnumber;  
    boolean raise;  
    integer array q(0:4), maxa, mina(0:3);  
    integer array field numb;  
    long array field inc;  
    zone zhelp(1, 1, stderror);  

    longdoc:=2;  
    numb:=0;  
    open (zhelp, 0, tapenamep, 0);  
    xlookupproc:=i:=monitor(42<*lookup*>, zhelp, 0, tailp);  
    if i<>0 then
    stap (tapenamep, <:-magtapeentry does not exist:>);  
    h:=high(1);  l:=low(1);  
    maxa(3):=h//1000+48;  
    mina(3):=l//1000+48;  
    maxa(2):=h mod 1000//100+48;  
    mina(2):=l mod 1000//100+48;  
    maxa(1):=h mod 100//10+48;  
    mina(1):=l mod 100//10+48;  
    maxa(0):=h mod 10+48;  
    mina(0):=l mod 10+48;  

    M:=1;  
    for i := 0 step 1 until 3 do
    begin
      maxa(i) := maxa(i) + M;  
      M:=0;  
      if maxa(i) = 58 then
      begin
        maxa(i) := 48;  
        M := 1;  
      end;  
    end;  

    raise := (-, mttest) or
    (tailp.longdoc (1) shift (-16) shift 16 = mtnamep.mtlaf(1));  
    if raise then
    begin
      inc:=4;  
      x:=plus(1);  
      tailnumber := tailp.inc(1) ;  
      for i := 0 step 1 until 4 do
      q(i) := tailnumber shift (-8 -i*8) extract 8;  

      for p:= 1 step 1 until x do
      begin
        M:=1;  
        for i:=0 step 1 until 3 do
        begin
          q(i):= q(i) + M;  
          M:=0;  
          if q(i) = 58 then
          begin
            q(i) := 48;  
            M := 1;  
          end;  
        end;  

\f



comment predit text           * page 47   11 02 80, 16.42
0 1 2 3 4 5 6 7 8 9 ;  

        if q(3) = maxa(3) and
        q(2) = maxa(2) and
        q(1) = maxa(1) and
        q(0) = maxa(0) then
        for j := 3 step -1 until 0 do 
        q(j):= mina(j);  
      end;  
      tailp (3) := tailp (4):=0;  
      for i := 4 step -1 until 3 do
      tailp(3) := (tailp(3) add q(i)) shift 8;  
      tailp(3):=tailp(3) add q(2);  

      for i:= 1 step -1 until 0 do
      tailp(4):= (tailp(4) add q(i)) shift 8;  

    end else stap(mtnamep, <:- mt letters incorrect:>);  
  end xlookupproc;  

  init:=mttest:=false;  

  if readparam(tapename) = -1 then stop(<:param error:>);  
  p:=readparam(plus);  
  if -, (p=3 or p=4) then stap(plus, <:-param error:>);  
  init:=real <:init:> = plus(1);  
  if -, init and p = 4 then stap(plus, <:-param error:>);  
  if -, init and p = 3 then
  begin
    if readparam(low) <> 1 then stop(<:param error low:>);  
    if readparam(high) <> 3 then stop(<:param error high:>);  
    mttest := readparam(mtname) = 2;  
    mtlaf:=0;  
    xlookupproc(tapename, tail, mtname);  
    longdoc:=0;  
    chngentrpr (tapename.longdoc, tail);  
    trapmode := 1 shift 10;  
  end;  
  if init and p = 4 then
  begin
    p := readparam (mtname);  
    if p <> 2 then stap(mtname, <:-param error:>);  
    mtlaf:=0;  longdoc := 2;  
    tail(1) := 1 shift 23 +18;  
    tail.longdoc(1):=mtname.mtlaf(1);  
    tail.longdoc(2):=mtname.mtlaf(2);  
    for i := 6 step 1 until 10 do tail(i):=0;  
    tail(7):=1;  
    if setproc(tapename.mtlaf, tail) <> 0 then
    stap(tapename, <:-no resources:>);  
  end;  
end case 12, nextnumber;  
▶EOF◀