|
|
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 Magic, seg_02fa63
└─⟦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 Magic is
package Io is new Text_Io.Integer_Io (Num => Token);
type Cell is
record
Row : Max_Size;
Column : Max_Size;
end record;
Cursor : Cell;
procedure Go_To_Center (S : in Square) is
begin
Cursor.Row := (S.Size / 2) + 1;
Cursor.Column := (S.Size / 2) + 1;
end Go_To_Center;
procedure Move (S : in Square; D : in Direction) is
begin
case D is
when North =>
Cursor.Row := Max_Size'Succ (Cursor.Row mod S.Size);
when East =>
Cursor.Column := Max_Size'Succ (Cursor.Column mod S.Size);
when South =>
if Cursor.Row = Max_Size'First then
Cursor.Row := S.Size;
else
Cursor.Row := Max_Size'Pred (Cursor.Row);
end if;
when West =>
if Cursor.Column = Max_Size'First then
Cursor.Column := S.Size;
else
Cursor.Column := Max_Size'Pred (Cursor.Column);
end if;
end case;
end Move;
procedure Deposit (S : in out Square; T : in Token) is
begin
S.T (Cursor.Row, Cursor.Column) := T;
end Deposit;
function Cell_Busy (S : in Square) return Boolean is
begin
return S.T (Cursor.Row, Cursor.Column) > 0;
end Cell_Busy;
procedure Display (S : in Square) is
begin
for I in reverse 1 .. S.Size loop
for J in 1 .. S.Size loop
Io.Put (S.T (I, J), 6);
end loop;
Text_Io.New_Line;
end loop;
end Display;
end Magic;
nblk1=4
nid=3
hdr6=4
[0x00] rec0=24 rec1=00 rec2=01 rec3=02e
[0x01] rec0=1e rec1=00 rec2=04 rec3=000
[0x02] rec0=03 rec1=00 rec2=03 rec3=000
[0x03] rec0=02 rec1=80 rec2=46 rec3=442
tail 0x21528d4468491879bbf15 0x42a00088462060003
Free Block Chain:
0x3: 0000 00 02 00 13 00 0a 65 6e 64 20 4d 61 67 69 63 3b ┆ end Magic;┆
0x2: 0000 00 00 00 04 80 01 20 01 02 03 04 05 06 07 08 09 ┆ ┆