-- -- Example that uses peek and poke -- with Peek_and_Poke; with Text_IO; with Interfaces; procedure t2 is use Peek_and_Poke; use Text_IO; use Interfaces; package IO is new Integer_IO (Integer); use IO; Words : array (1 .. 100) of Unsigned_16; begin Put_Line ("Example t2, peek and poke"); -- Poke values into the array for i in 1 .. 100 loop Poke (Unsigned_16 (i), Words (i)'Address); end loop; -- And peek them back again, checking as we go for i in 1 .. 100 loop declare Tmp : Unsigned_16; begin Peek (Tmp, Words (i)'Address); if Tmp /= Unsigned_16 (i) then Put ("Peek check failed at i = "); Put (i); New_Line; end if; end; end loop; Put_Line ("Example t2, finished"); end t2;