diff --git a/runtime/adainclude/system-storage_elements.ads b/runtime/adainclude/system-storage_elements.ads new file mode 100644 index 0000000..0833b23 --- /dev/null +++ b/runtime/adainclude/system-storage_elements.ads @@ -0,0 +1,29 @@ +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;