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

⟦153505743⟧ TextFile

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

Derivation

└─⟦cde9d517b⟧ Bits:30007477 RC8000 Backup tape fra HT's bus-radio system
    └─⟦6a563b143⟧ 
        └─⟦this⟧ »retbusnumtx « 
└─⟦110021343⟧ Bits:30007476 RC8000 Backup tape fra HT's bus-radio system
    └─⟦a957ba283⟧ 
        └─⟦this⟧ »retbusnumtx « 

TextFile

begin message retbusnumre side 1 - 820305/cl;

  integer i,j,k,pos,busnr,b1,b2,ch,akt,ant,gl_b2,g_nr;
  long array garagenavn(0:99);
  integer array tail(1:10),linie(1:32);
  real t;
  real array field raf;
  long gar,g;
  zone zin,zud(128,1,stderror);

  procedure næste_bus;
  begin
    long array gn(1:2);
    integer t;

    read(zin,busnr);  repeatchar(zin);
    readchar(zin,t);
    if t='/' then readstring(zin,gn,1)
    else gn(1):= long<::>;
    gar:= gn(1);
  end;

  raf:= 0;
  initgnavn(garagenavn);

  write(out,"+",15,<: rettelse af busnummertabel :>,"+",15,
    "nl",2,<:rettelserne skal ske i stigende busnummer-orden:>,
    "nl",2,<:vent på '>':>,"nl",2);
  ud(out);

  open(zin,4,<:busnumre:>,0);
  open(zud,4,<:busnrtemp:>,0);
  monitorcall(42,zin,i,tail,1);
  systime(7,0,t);
  tail(6):= round t;
  monitorcall(40,zud,i,tail,9);
  for i:= readchar(zin,ch) while ch<>25 do
    outchar(zud,ch);
  write(zud,maxinteger,"nl",1,"em",1);
  close(zin,false);
  close(zud,false);
  open(zin,4,<:busnrtemp:>,0);
  open(zud,4,<:busnumre:>,0);

  næste_bus;
  b1:= b2:= 0;
  ant:= 0;
\f

message retbusnumre side 2 - 820305/cl;

næste_linie:
  gl_b2:= b2;
  outchar(out,'>'); ud(out);
  g:= long<::>;
  readchar(in,akt);
  if akt='f' then
  begin
    write(out,<:vent !:>,"nl",1); ud(out);
    goto finis;
  end;
  if akt='i' or akt='u' then
  begin
    for i:= readchar(in,ch) while i<>2 and i<>8 do ;
    if i<>2 then
    begin
      write(out,<:formatfejl (busnr) !!!:>,"nl",1); ud(out);
      goto skip_linie;
    end
    else
    begin
      b1:= 0;
      repeat
        b1:= b1*10 + ch - '0';
        i:= readchar(in,ch);
      until i<>2;
      while i=7 do i:= readchar(in,ch);
      if b1<=b2 then
      begin
        write(out,
          <:ulovligt - rettelse ikke i stigende busnummer-orden !!!:>,"nl",1);
        goto skip_linie;
      end;
\f

message retbusnumre side 3 - 820305/cl;

      if i <> 2 then
        b2:= b1
      else
      begin
        b2:= 0;
        repeat
          b2:= b2*10 + ch - '0';
          i:= readchar(in,ch);
        until i<>2;
      end;
      if b2 < b1 or b1<1 or b2<1 or b1>9999 or b2>9999 then 
      begin
        write(out,<:formatfejl (busnr-2) !!!:>,"nl",1); b2:= gl_b2;
        goto skip_linie;
      end;
      while i=7 do i:=readchar(in,ch);
      if i=6 and akt='i' then
      begin
        j:= 0;
        repeat
          if 'a'<=ch and ch<='å' then ch:= ch-32;
          g:= g shift 8 add ch;
          i:= readchar(in,ch);
          j:= j+1;
        until i<>6 or j=3;
        g:= g shift 24;
        g_nr:= 0;
        for k:= 0 step 1 until 99 do
          if g=garagenavn(k) then g_nr:= k;
        if g_nr=0 then
        begin
          write(out,<:ukendt garage: :>,string g,<: !!!:>,"nl",1); b2:= gl_b2;
          goto skip_linie;
        end;
      end;
      while i=7 do i:= readchar(in,ch);
      if i<>8 then
      begin
        write(out,<:formatfejl (garage/linieslut) !!!:>,"nl",1); b2:= gl_b2;
        goto skip_linie;
      end;
    end;
\f

message retbusnumre side 4 - 820305/cl;

  end <* akt i, akt u *>
  else
  begin
    write(out,<:formatfejl (aktion) !!!:>,"nl",1);
    goto skip_linie;
  end;

  while busnr<b1 do
  begin
    write(zud,<<   dddd>,busnr);
    if gar<>0 then write(zud,"/",1,string gar)
    else write(zud,"sp",4);
    ant:= ant+1;
    if ant mod 6 = 0 then outchar(zud,'nl') else outchar(zud,'sp');
    næste_bus;
  end;

  if akt='i' then
  begin
    for i:= b1 step 1 until b2 do
    begin
      write(zud,<<   dddd>,i);
      if g<>0 then write(zud,"/",1,string g)
      else write(zud,"sp",4);
      ant:= ant+1; outchar(zud,if ant mod 6 = 0 then 'nl' else 'sp');
    end;
    while busnr<=b2 do næste_bus;
  end
  else
  begin <* akt='u' *>
    while busnr <= b2 do 
    begin
      if busnr=9000 then
      begin
        write(zud,<:   9000    :>);
        ant:= ant+1; outchar(zud,if ant mod 6 = 0 then 'nl' else 'sp');
      end;
      næste_bus;
    end;
  end;
skip_linie:
  repeatchar(in);
  for i:= readchar(in,ch) while i<>8 do ;
  goto næste_linie;
\f

message retbusnumre side 5 - 820302/cl;

finis:
  while busnr < maxinteger do
  begin
    write(zud,<<   dddd>,busnr);
    if gar<>0 then write(zud,"/",1,string gar)
    else write(zud,"sp",4);
    ant:= ant+1; outchar(zud,if ant mod 6 = 0 then 'nl' else 'sp');
    næste_bus;
  end;
  outchar(zud,'nl');
  outchar(zud,'em');

  close(zud,true);
  close(zin,true);
  monitorcall(48,zin,0,tail,1);
  monitorcall(42,zud,0,tail,1);
  systime(7,0,t);
  tail(6):= round(t);
  tail(10):= ant;
  monitorcall(44,zud,0,tail,1);
  write(out,<:busnumre ialt::>,ant,"nl",1); ud(out);
  trapmode:= 1 shift 10;
  write(out,"nl",1,<:retbusnumre slut:>,"nl",1); ud(out);
end
▶EOF◀