Showing changes from revision #2 to #3:
Added | Removed | Changed
Entry | |
---|---|
R0 | Minimum address |
R1 | Maximum address |
Exit | |
---|---|
R0 | Preserved |
R1 | Preserved |
C flag is clear if the range is OK, else set |
The purpose of this call is to check that a given address range is valid, i.e. that it maps to some kind of addresses are in logicalRAM.
SWIThis call does not check that the memory actually exists, only that it ought to exist. If you have used checks the address range between R0 and R1-1 to see if the specified range lies in logical OS_SetMemMapEntriesRAM, then this call will not work as expected. This call also does not report any access information – no guarantee is made that you will be able to read or write to the memory in your current and has a mapping into physical CPURAM mode..
This The call behaviour does of not OS_ValidateAddress check has that changed the significantly memory between actually different exists, OS only versions. that it ought to exist. If you have usedOS_SetMemMapEntries, then this call will not work as expected.
Prior to RISC OS 3.5, the following areas were considered valid:
From RISC OS 3.5, the following areas were considered valid:
However note that this version of Service_ValidateAddress does not correctly detect valid regions of Sparse Dynamic Areas. Additionally, not all special regions are reported – e.g. the CAM, page tables, kernel buffers used with long command lines, RISC OS 5 HAL workspace, etc.
Under RISC OS Select the call was reimplemented as a call to OS_Memory 24. Physically mapped regions will not be reported as valid, however Service_ValidateAddress can be used to override this. The LegacyScreen module uses this technique to mark screen memory as valid. All other regions reported by OS_Memory 24 are considered valid, e.g. system dynamic areas such as the ROM dynamic area. Special code also exists to mark zero page as valid.
In RISC OS 5.21 the call was also changed to be implemented via OS_Memory 24. The OS considers the following locations as valid:
Under RISC OS 5 no special code is required to mark zero page as valid, as zero page is one of the areas which OS_Memory 24 will report on.