Function: Allows a program to remove a partition on Wheels' expansion RAM.
Pass: .Y=0 to tell the routine that a program doesn't care which partition # to use. There is a maximum number of 8 partitions to choose from.
Uses: r1, r3H, r6L, GetRAMBam, PutRAMBam.
Temporary address space at $5373 indicating the current partition number.
RAM BAM workspace ($5045-64).
ID# table for each partition at $5065-6c.
Start bank table for each partition at $506d-74.
# of 64Kb banks table for each partition at $5075-7c.
Partition names table for each partition from $507d-$5104.
Return: .X=0 means no error occurred. Any non zero result means an error occurred.
Destroyed: .A, .X, & .Y
Synopsis: The routine removes a partition from the Wheels' expansion RAM by modifying pointers indicating its existence. The partition in question really isn't removed in a physical sense, but rather, its pointers are zeroed out.
First, it calls GetRAMBam to load the RAM BAM workspace, and frees up the corresponding BAM (64Kb bank) entries occupied by the partition as available for future use. Next, it zeroes out the corresponding entries in the four tables mentioned above, from $5065-$5104. Finally, it calls PutRAMBam to save the RAM BAM workspace.
See Also: SvRamDevice, RamDevInfo.