h6. [[OS SWI Calls]] h6(. » [[OS_Memory]] h6((. » OS_Memory 7 h2. OS_ Memory 7 h5. (SWI &68) |_<^{width:4em}. Entry | | |<^. R0 |<^. 7, and all flags bits reserved | |<^. R1 |<^. Pointer to table to be filled in | |_<^{width:4em}. Exit | | |<^. R0 |<^. Preserved | |<^. R1 |<^. Preserved | h4. Use The purpose of this call is to read the physical memory arrangement table, into the block pointed to by R1. The table is organised with one entry for each page of physical memory, where each entry is 4 bits. Each byte thus contains two entries, the lower-order 4 bits relating to the address before the higher-order bits (ie little endian). Each nibble indicates: |_<^{width:4em}. Bit |_<^. Meaning | |<^. 0-2 |<^. Type of memory: | |<^. |<^. 0 not present | |<^. |<^. 1 DRAM | |<^. |<^. 2 VRAM | |<^. |<^. 3 ROM | |<^. |<^. 4 I/O | |<^. |<^. 5-7 undefined | |<^. 3 |<^. 0=page available for allocation, 1=not available | h4. Notes To read the size of the table, use [[OS_Memory 6]]. If a RAM page is not available for allocation, this means it's allocated for something that cannot be replaced with a different RAM page (eg OS' page tables or screen memory). For a dynamic area with particular physical address requirements (eg contiguous physical RAM), issue this call inside the DA's PreGrow handler and then choose which pages to ask for based on the result. If you make this call before creating the area, the page availability may then change. h4. See also * [[OS_Memory]] * [[OS_Memory 6]] This entry based on RISC OS 3.6 PRM