30 lines
1.1 KiB
Ada
30 lines
1.1 KiB
Ada
package System.Storage_Elements
|
|
with Pure is
|
|
|
|
type Storage_Offset is range -2**31 .. 2**31 - 1;
|
|
subtype Storage_Count is Storage_Offset range 0 .. Storage_Offset'Last;
|
|
|
|
type Storage_Element is mod 2**8;
|
|
for Storage_Element'Size use Storage_Unit;
|
|
|
|
type Storage_Array is array
|
|
(Storage_Offset range <>) of aliased Storage_Element;
|
|
for Storage_Array'Component_Size use Storage_Unit;
|
|
|
|
function "+" (Left : Address; Right : Storage_Offset) return Address
|
|
with Import, Convention => Intrinsic;
|
|
function "+" (Left : Storage_Offset; Right : Address) return Address
|
|
with Import, Convention => Intrinsic;
|
|
function "-" (Left : Address; Right : Storage_Offset) return Address
|
|
with Import, Convention => Intrinsic;
|
|
function "-" (Left : Storage_Offset; Right : Address) return Address
|
|
with Import, Convention => Intrinsic;
|
|
|
|
type Integer_Address is mod 2**32;
|
|
function To_Address (Value : Integer_Address) return Address
|
|
with Import, Convention => Intrinsic;
|
|
function To_Integer (Value : Address) return Integer_Address
|
|
with Import, Convention => Intrinsic;
|
|
|
|
end System.Storage_Elements;
|