From a2ed5a7526b7700d8b6001bb0e60450c6dbf240b Mon Sep 17 00:00:00 2001 From: Folkert Kevelam Date: Fri, 27 Jun 2025 21:53:53 +0200 Subject: [PATCH] Initial commit --- .../adainclude/system-storage_elements.ads | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 runtime/adainclude/system-storage_elements.ads 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;