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

⟦10740f388⟧ TextFile

    Length: 6912 (0x1b00)
    Types: TextFile
    Names: »pttxt       «

Derivation

└─⟦9ccaf6601⟧ Bits:30008165 Bånd med SW8000 kildetekst/release værktøjer
    └─⟦f546e193b⟧ 
        └─⟦this⟧ »pttxt       « 

TextFile

****** Program til udskrift af testoutput fra tascat ******
begin
  zone z(128,1,end_file);
  integer field type,besked_adr,besked_lgd,corout_nr,b_prio,
                c_prio,wait_time,semafor_nr,akt_cor_nr,
                proc_nr,param,cause,status_w;
  long field klok,wait_select;
  long array field document;
  integer array field besked;
  integer i,max_seg,min_tid_seg,seg;
  long tid,min_tid,oldklok;
  real t;
  real array inname(1:2);
  boolean stop;
  integer array tail(1:10);

  procedure end_file(z,s,b);
  zone z;
  integer s,b;
  begin
    if s extract 1=1 then
      stderror(z,s,b)
    else
      if (s shift (-18)) extract 1=1 then
      begin
        setposition(z,0,1);
        inrec6(z,512);
        b:=512;
      end
      else
        stderror(z,s,b);
  end;

  procedure print_rec(max_rec);
  value max_rec;
  integer max_rec;
  begin
    integer rec;

    rec:=0;
    repeat
      inrec6(z,16);
      rec:=rec+1;
      if (z.klok>=oldklok) or (z.type<3) then
      begin
        if z.type>2 then
        begin
          write(out,<:<'nl'>:>,<<dddddddd>,z.klok-oldklok);
          oldklok:=z.klok;
        end
        else
          write(out,<:<'nl'>        :>);
        if z.type=0 then
        begin
          write(out,<: nul record stop:>);
        end;
        if z.type=1 then 
        begin
          write(out,<: s-data    :>);
          for i:=1 step 1 until 7 do
            write(out,<<-ddddddd>,z.besked(i));
        end;
        if z.type=2 then 
        begin
          write(out,<: w-data    :>);
          for i:=1 step 1 until 7 do
            write(out,<<-ddddddd>,z.besked(i));
        end;
        if (z.type=4) or (z.type=5) then
        begin
          write(out,<: signal    :>);
          write(out,<<-ddddddd>,z.akt_cor_nr,z.semafor_nr,
                               z.besked_adr,z.besked_lgd,z.b_prio);
        end;
        if z.type=8 then
        begin
          write(out,<: wait      :>);
          write(out,<<-ddddddd>,z.akt_cor_nr,z.semafor_nr,
                               z.wait_time,z.wait_select);
        end;
        if (z.type=16) or (z.type=18) then
        begin
          write(out,<: wait-exit :>);
          write(out,<<-ddddddd>,z.akt_cor_nr,z.semafor_nr,
                               z.besked_adr,z.besked_lgd,z.c_prio);
        end;
        if z.type=64 then
        begin
          write(out,<: cor-to-sem:>);
          write(out,<<-ddddddd>,z.corout_nr,z.semafor_nr);
        end;
        if z.type=128 then
        begin
          write(out,<: activate  :>);
          write(out,<<-ddddddd>,z.corout_nr);
        end;
        if (z.type=1024) then
        begin
          write(out,<: stop :>);
        end;
        if (z.type=1025) then
        begin
          write(out,<: trap      :>);
          write(out,<<-ddddddd>,z.akt_cor_nr,z.proc_nr,
                               z.param,z.cause);
        end;
        if (z.type=1026) then
        begin
          write(out,<: give_up   :>);
          write(out,<<-ddddddd>,z.akt_cor_nr,z.proc_nr,
                               z.param,z.status_w);
        end;
        if (z.type=1027) then
        begin
          write(out,<: document  :>);
          write(out,z.document);
        end;
        if (z.type=1028) then
        begin
          write(out,<: cont      :>);
          write(out,<<-ddddddd>,z.akt_cor_nr,z.proc_nr,
                               z.param);
        end;
        if (z.type=1029) then
        begin
          write(out,<: trace     :>);
          write(out,<<-ddddddd>,z.akt_cor_nr,z.proc_nr,
                               z.param,z.cause,z.status_w);
        end;
        if (z.type=1030) then
        begin
          write(out,<: message   :>);
          write(out,<<-ddddddd>,z.akt_cor_nr,z.proc_nr,z.param);
        end;
      end;
    until ((z.type>2) and (oldklok>z.klok)) or 
          (z.type=1024) or (max_rec=rec) or (z.type=0);
  end;

  type:=besked:=document:=2;
  proc_nr:=besked_adr:=corout_nr:=4;
  param:=besked_lgd:=wait_select:=6;
  cause:=b_prio:=c_prio:=wait_time:=8;
  status_w:=semafor_nr:=10;
  akt_cor_nr:=12;
  klok:=16;
  system(4,1,inname);
  open(z,4,inname,1 shift 18);
  monitor(42,z,0,tail);
  max_seg:=tail(1)-1;
  inrec6(z,16);
  tid:=z.klok;
  write(out,<:<10>Segments in testfile: :>,max_seg+1,<:<10>:>);
  oldklok:=z.klok;
  write(out,<:Test start: :>,<< dd dd dd>,
            systime(4,z.klok/10000,t),t,<:<10>:>);
  setposition(z,0,0);
  print_rec(32);
  min_tid:= (extend (-1)) shift (-1); <* Max long *>
  min_tid_seg:=0;
  seg:=1;
  stop:=false;
  while (seg<=max_seg) and -,stop do
  begin
    setposition(z,0,seg);
    inrec6(z,16);
    while (z.type=1) or (z.type=2) do
      inrec6(z,16);
    if z.type=0 then
      stop:=true
    else
      if z.klok<min_tid then
      begin
        min_tid:=z.klok;
        min_tid_seg:=seg;
      end;
    seg:=seg+1;
  end;
  if min_tid_seg>0 then
  begin
    write(out,<:<10><10>:>,"-",79,<:<10>:>);
    write(out,<:Start segment: :>,min_tid_seg,<:<10>:>);
    setposition(z,0,min_tid_seg);
    print_rec(max_seg*32);
  end;
  close(z,true);
end;
    

*******************************************************************************
Udskrift format:

<tid siden start> <navn>   <data>

<data> afhænger af <navn> som følgende:

s-data:      data ord 1 til data ord 7.

w-data:      data ord 1 til data ord 7.

signal:      aktuel korutine nummer,
             semafor nummer,
             besked adresse,
             besked længde,
             besked prioritet.

wait:        aktuel korutine nummer,
             semafor nummer,
             wait time,
             wait select.

wait-
exit:        aktuel korutine nummer,
             semafor nummer,
             besked adresse,
             besked længde,
             korutine prioritet.

cor-to-
sem:         korutine nummer,
             semafor nummer.

activate:    korutine nummer.

trap:        aktuel korutine nummer,
             procedure nummer,
             parameter,
             cause.

give-up:     aktuel korutine nummer,
             procedure nummer,
             parameter,
             status word.

document:    document navn

cont:        aktuel korutine nummer,
             procedure nummer,
             forrige trap procedure nummer.

trace:       aktuel korutine nummer,
             parameter 1,
             parameter 2,
             parameter 3,
             parameter 4.

message:     aktuel korutine nummer,
             fra procedure nummer,
             årsag.

stop:

nul stop:

-------------------------------------------------------------------------------
Er aktuel korutine nummer negativ er korutinen i disable mode
under genereringen af test record'en

*******************************************************************************
▶EOF◀