|
|
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: 3072 (0xc00)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Pstack, seg_050e5f
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Text_Io;
package body Pstack is
use Text_Io;
procedure Initial (Pile : in out Tpile) is
begin
Pile.Courant := 0;
Pile.Tab (Pile.Courant) := 0;
end Initial;
function Is_Empty (Pile : in Tpile) return Boolean is
State : Boolean := False;
begin
if Pile.Courant = 0 then
State := True;
return State;
end if;
end Is_Empty;
function Is_Full (Pile : in Tpile) return Boolean is
State : Boolean := False;
begin
if Pile.Courant = Nmax then
State := True;
end if;
return State;
end Is_Full;
procedure Push (Pile : in out Tpile; Value : in Integer) is
begin
if not (Is_Full (Pile)) then
Pile.Tab (Pile.Courant) := Value;
Pile.Courant := Pile.Courant + 1;
else
Put ("error: stack overflow");
end if;
end Push;
procedure Pop (Pile : in out Tpile; Value : out Integer) is
begin
if not (Is_Empty (Pile)) then
Value := Pile.Tab (Pile.Courant);
Pile.Courant := Pile.Courant - 1;
else
Put ("error:stack is empty");
end if;
end Pop;
begin
[statement]
end Pstack;
nblk1=2
nid=0
hdr6=4
[0x00] rec0=23 rec1=00 rec2=01 rec3=02e
[0x01] rec0=0d rec1=00 rec2=02 rec3=001
tail 0x21758637c8796650c8fd7 0x42a00088462060003