Ethy_Soft/runtime/adainclude/system-storage_elements.ads
2025-06-28 21:58:51 +02:00

32 lines
1.2 KiB
Ada

package System.Storage_Elements
with Pure is
type Storage_Offset is range
-2 ** (Word_Size - 1) ..
2 ** (Word_Size - 1) - 1;
subtype Storage_Count is Storage_Offset range 0 .. Storage_Offset'Last;
type Storage_Element is mod 2 ** Storage_Unit;
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 Memory_Size;
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;