Name: SvRamDevice
Address: G0$5018

Function: Allows a program to create a partition on Wheels' expansion RAM.

Pass:
r0
points to a null-terminated partition name. Name it any way you want. Up to 16 characters can be used.
r2L=# of contiguous 64Kb banks needed.
r3L=0 to tell the routine that a program doesn't care which starting 64Kb bank to use.
r7L=ID number, can be any number less than 128. Any number higher than 128 designates a ramdisk.
.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: r0, r1, r2L, r3L, r7L, GetRAMBam, RamBlkAlloc.
Temporary address space at $5373 indicating the current partition number.
RAM BAM checksum at $5024.
RAM BAM homespace ($5025-44).
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.
.Y contains the partition number.
r3L contains the starting 64Kb bank number.

Destroyed: .A, .X, & .Y

Synopsis: A program can permanently set up a partition onto Wheels' expansion RAM by creating a partition into Wheels' extended Kernal with this routine. This way, the partition will be reserved by a program and have it survive various computing sessions. Once created, a program can simply reuse that partition over and over instead of individually allocating and freeing up expansion RAM memory everytime it boots.

This routine makes heavy use of the four tables mentioned above, from $5065-$5104. This way, ram partitions have their own corresponding entries and are preserved for use in future computing sessions. The RAM BAM workspace at $5045 is written back to the homespace ($5025-44) and the checksum is generated and stored at $5024.

See Also: DelRamDevice, RamDevInfo.

EOF