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 - download

⟦5de1d614f⟧ TextFile

    Length: 2304 (0x900)
    Types: TextFile
    Names: »tcspterm    «

Derivation

└─⟦110021343⟧ Bits:30007476 RC8000 Backup tape fra HT's bus-radio system
    └─⟦a957ba283⟧ 
        └─ ⟦this⟧ »tcspterm    « 

TextFile

begin
  zone z(16,1,stderror);
  integer i,j,k;
  integer array shd(1:12), attr(1:8), ia(1:10);
  long array navn(1:2);
  boolean setattr;

  setattr:= false;
  system(7,k,navn);
  open(z,k,navn,0);
  getshare6(z,shd,1);
  shd(1):= 1;
  shd(4):= 134 shift 12 + 0;
  for i:= 5 step 1 until 11 do shd(i):= 0;
  setshare6(z,shd,1);
  monitor(16,z,1,shd);
  i:=monitor(18,z,1,attr);

  write(out,<:Terminal:  :>,navn,<:  Mode: :>,<<d>,k shift (-12),
    <:  Kind: :>,k extract 12,"nl",1,
    <:Ekko: :>,case (attr(2) shift (-11) extract 1)+1 of (<:off:>,<:on :>),
    <:  Opmode: :>,case (attr(2) extract 10)+1 of (<:0:>,
       <:conversional.with.lineedit:>,<:conversional.without.lineedit:>,
       <:cononical:>,<:4:>,<:5:>,<:6:>,<:7:>,<:8:>,<:filetransfer:>),
    <:  Prompt: :>,attr(4) shift (-8) extract 8,
    <:  Timeout: :>,attr(7) shift (-8),"nl",1);

  if findfpparam(<:timeout:>,true,ia) >= 1 then
  begin
    setattr:= true;
    attr(7):= ia(1) shift 8;
  end;
  if findfpparam(<:prompt:>,true,ia) >= 1 then
  begin
    setattr:= true;
    attr(4):= ia(1) shift 8;
  end;
  if findfpparam(<:opmode:>,true,ia) >= 1 and 
     ((1<=ia(1) and ia(1)<=3) or (ia(1)=9)) then
  begin
    setattr:= true;
    attr(2):= attr(2) shift (-10) shift 10 + ia(1) extract 10;
  end;
  if findfpparam(<:ekko:>,true,ia) >= 1 then
  begin
    setattr:= true;
    attr(2):= attr(2) extract 10 + (ia(1) extract 1) shift 11;
  end;

  if -, setattr then goto exit;

  getshare6(z,shd,1);
  shd(1):= 1;
  shd(4):= 132 shift 12 + 0;
  for i:= 5 step 1 until 11 do shd(i):= attr(i-3);
  setshare6(z,shd,1);
  monitor(16,z,1,shd);
  i:=monitor(18,z,1,attr);

  write(out,"nl",1,<:Terminal:  :>,navn,<:  Mode: :>,<<d>,k shift (-12),
    <:  Kind: :>,k extract 12,"nl",1,
    <:Ekko: :>,case (attr(2) shift (-11) extract 1)+1 of (<:off:>,<:on :>),
    <:  Opmode: :>,case (attr(2) extract 10)+1 of (<:0:>,
       <:conversional.with.lineedit:>,<:conversional.without.lineedit:>,
       <:cononical:>,<:4:>,<:5:>,<:6:>,<:7:>,<:8:>,<:filetransfer:>),
    <:  Prompt: :>,attr(4) shift (-8) extract 8,
    <:  Timeout: :>,attr(7) shift (-8),"nl",1);
exit:
  close(z,false);
end
▶EOF◀