|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 5120 (0x1400)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Screen_Io, seg_058292
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Text_Io;
-- with Integer_Text_Io;
-- use Integer_Text_Io;
package body Screen_Io is
package Integer_Text_Io is new Text_Io.Integer_Io (Integer);
use Integer_Text_Io;
Protect : Access_Binary_Semaphore := new Binary_Semaphore;
procedure Clear is
begin
Put (Ascii.Esc);
Put ("[2J");
end Clear;
procedure Put_Int (R : Integer) is
Digs : constant String := "0123456789";
D : Integer := R;
begin
if D >= 100 then
Put (Digs (D / 100 + 1));
D := D mod 100;
end if;
-- always write at least two digits (if setting screen position).
Put (Digs (D / 10 + 1));
Put (Digs (D mod 10 + 1));
end Put_Int;
procedure Set_Cursor (R : Row := 1; C : Column := 1) is
-- uses escape sequence ESC [ row ; column H
begin
Put (Ascii.Esc);
Put ('[');
Put_Int (R);
Put (';');
Put_Int (C);
Put ('H');
end Set_Cursor;
procedure Puts (S : String; R : Row; C : Column) is
Index : Integer;
begin
Protect.P;
Set_Cursor (R, C);
Put_Line (S);
Protect.V;
end Puts;
procedure Putsn (S : String; N : Integer; R : Row; C : Column) is
Index : Integer;
-- put string and integer values
begin
Protect.P;
Set_Cursor (R, C);
Put (S);
Put_Int (N);
Put_Line (" ");
Protect.V;
end Putsn;
procedure Putcb (Ch : Character; R : Row; C : Column) is
-- put "emphasized" character
Index : Integer;
begin
Protect.P;
Set_Cursor (R, C);
Put (Ascii.Esc);
Put ("[5m"); -- turn on blinking
Put (Ch);
Put (Ascii.Esc);
Put_Line ("[0m"); -- turn off blinking
Protect.V;
end Putcb;
procedure Putc (Ch : Character; R : Row; C : Column) is
begin
Protect.P;
Set_Cursor (R, C);
Put (Ch);
New_Line;
Protect.V;
end Putc;
procedure Fill_Screen (C : Character) is
Line : String (1 .. 80) := (1 .. 80 => C);
begin
for I in 2 .. 23 loop
Set_Cursor (I, 1);
Put_Line (Line);
end loop;
end Fill_Screen;
end Screen_Io;
nblk1=4
nid=0
hdr6=8
[0x00] rec0=24 rec1=00 rec2=01 rec3=016
[0x01] rec0=00 rec1=00 rec2=04 rec3=012
[0x02] rec0=27 rec1=00 rec2=03 rec3=05c
[0x03] rec0=13 rec1=00 rec2=02 rec3=000
tail 0x217658a3687e281ddfdf1 0x42a00088462060003