|
|
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 Square, seg_02f4db
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
with Text_Io;
package body Square is
procedure Display_Square is
package My_Int is new Text_Io.Integer_Io (Num => Token);
begin
Text_Io.Put_Line ("Magic Square started ...");
Text_Io.Put_Line ("");
for J in Square_Large loop
for I in Square_Large loop
if I = 1 then
Text_Io.Put ("|");
end if;
My_Int.Put (Magic (I, J));
Text_Io.Put ("|");
end loop;
Text_Io.Put_Line ("");
end loop;
end Display_Square;
procedure Clear_My_Square is
begin
for I in Square_Large loop
for J in Square_Large loop
Magic (I, J) := Token'First;
end loop;
end loop;
end Clear_My_Square;
procedure Move (D : Direction) is
begin
case D is
when North =>
Y := Y - 1;
when South =>
Y := Y + 1;
when East =>
X := X + 1;
when West =>
X := X - 1;
end case;
end Move;
procedure Go_To_Center is
begin
X := (Large / 2) + 1;
Y := X;
end Go_To_Center;
procedure Deposit (T : Token) is
begin
Magic (X, Y) := T;
end Deposit;
function Get_Token return Token is
begin
return Magic (X, Y);
end Get_Token;
procedure Wrap_If_Edge is
begin
if X > Square_Large'Last then
X := Square_Large'First;
end if;
if X < Square_Large'First then
X := Square_Large'Last;
end if;
if Y > Magic'Last then
Y := Magic'First;
end if;
if Y < Square_Large'First then
Y := Square_Large'Last;
end if;
end Wrap_If_Edge;
end Square;
nblk1=4
nid=3
hdr6=4
[0x00] rec0=24 rec1=00 rec2=01 rec3=028
[0x01] rec0=2d rec1=00 rec2=02 rec3=000
[0x02] rec0=01 rec1=00 rec2=03 rec3=000
[0x03] rec0=02 rec1=78 rec2=87 rec3=442
tail 0x215286ac8848d7c5e0aae 0x42a00088462060003
Free Block Chain:
0x3: 0000 00 04 00 0b 80 05 75 61 72 65 3b 05 00 00 00 00 ┆ uare; ┆
0x4: 0000 00 00 00 0a 80 07 20 20 20 20 20 20 59 07 20 20 ┆ Y ┆