|DOS_SET_1346||013F||Rebuild the sector cache and RAM disk|
Rebuild the sector cache and RAM disk.
This routine is used to make some store available to the user, or to return store to DOS. Note that if the RAM disk is moved, or its size is changed, then all files thereon are erased.
Pages 1, 3, 4, 6 are considered as an array of 128 sector buffers (numbered 0...127), each of 512 bytes. The cache and RAMdisk occupy two separate (contiguous) areas of this array.
The location and size of the cache and RAMdisk can be specified separately; any remaining buffers are unused by DOS and are available to the caller.
Note that the sizes actually used may be smaller than those specified as in practice, there is a maximum cache size and a minimum size of RAMdisk (4 sectors).
A cache size of 0 will still work but will seriously impair the floppy disk performance.
This routine will fail if there are any files open on drive M:
|D||First buffer for cache|
|E||Number of cache sector buffers|
|H||First buffer for RAM disk|
|L||Number of RAM disk sector buffers|
|Note: E + L <= 128|
- If OK
- Carry true
- A corrupt
- Carry false
- A = Error code
- BC DE HL IX corrupt, all other registers preserved.