|
|
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 Towers_Of_Hanoi_Graphic, seg_02c962, seg_02cc9f, seg_02cef4, seg_02d11b, seg_0399e4, seg_03b931, seg_03c0a8, seg_03c515, seg_03c6bc, seg_03c9f1, seg_04a9c6, seg_04b434
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Window_Io;
package body Towers_Of_Hanoi_Graphic is
package Wio renames Window_Io;
The_Tower_Base : constant := 19;
The_Image : Wio.File_Type;
function Get_Needle_Column (For_Needle : Needle) return Wio.Column_Number is
begin
case For_Needle is
when 1 =>
return 14;
when 2 =>
return 40;
when 3 =>
return 65;
end case;
end Get_Needle_Column;
procedure Print_Needle (Which : Needle; Height : Natural) is
Column : constant Wio.Column_Number := Get_Needle_Column (Which);
begin
for I in 1 .. Height loop
Wio.Position_Cursor (The_Image, The_Tower_Base - I, Column);
Wio.Overwrite (The_Image, "|");
end loop;
end Print_Needle;
procedure Print_Disk_With_Char (For_Needle : Needle;
The_Disk : Positive;
Its_Size : Positive;
The_Char : Character) is
Column : constant Wio.Column_Number := Get_Needle_Column (For_Needle);
Line : constant Wio.Line_Number := The_Tower_Base - The_Disk;
The_String : constant String := String'(1 .. 1 => The_Char);
begin
for I in 1 .. Its_Size loop
Wio.Position_Cursor (The_Image, Line, Column - I);
Wio.Overwrite (The_Image, The_String);
end loop;
for I in 1 .. Its_Size loop
Wio.Position_Cursor (The_Image, Line, Column + I);
Wio.Overwrite (The_Image, The_String);
end loop;
end Print_Disk_With_Char;
procedure Print_Disk (For_Needle : Needle;
The_Disk : Positive;
Its_Size : Positive) is
begin
Print_Disk_With_Char (For_Needle, The_Disk, Its_Size, '=');
end Print_Disk;
procedure Delete_Disk (For_Needle : Needle;
The_Disk : Positive;
Its_Size : Positive) is
begin
Print_Disk_With_Char (For_Needle, The_Disk, Its_Size, ' ');
end Delete_Disk;
begin
Wio.Create (The_Image, Wio.Out_File, "Testing the towers of Hanoi");
end Towers_Of_Hanoi_Graphic;
nblk1=4
nid=0
hdr6=8
[0x00] rec0=20 rec1=00 rec2=01 rec3=024
[0x01] rec0=00 rec1=00 rec2=04 rec3=00a
[0x02] rec0=19 rec1=00 rec2=02 rec3=02c
[0x03] rec0=0a rec1=00 rec2=03 rec3=000
tail 0x21524fc4e840747f58a0e 0x42a00088462063c03