Konamiman / Nextor

A disk operating system for MSX computers, forked from MSX-DOS 2.31
Other
183 stars 33 forks source link

Add a new KILLDSKIO environment variable #98

Closed Konamiman closed 2 years ago

Konamiman commented 2 years ago

If an environment variable named KILLDSKIO exists with a value of ON (case insensitive) when the BASIC environment is started, the 512 byte buffer that is normally allocated as a sector buffer for the DSKI$ and DSKO$ commands won't be allocated, thus these 512 bytes will be gained back for BASIC programs. This implies that the DSKI$ and DSKO$ commands will be unavailable (they will throw "syntax error").

This may be useful to load memory-intensive BASIC programs, and compensates for the fact that Nextor allocates about 230 extra bytes in page 3 than MSX-DOS 2.

When this mechanism is used to disable DSKI$ and DSKO$ the DIRBUF variable (&HF351), which holds the address of the 512 byte buffer where these commands read and write sectors, will have the same value as SECBUF (&HF34D), which is a generic sector buffer used internally by Nextor; and the same goes for PATHNAM (&HF33B), a buffer used by BASIC to parse pathnames for commands like FILES. This shouldn't be a problem in most cases, but for robustness it's recommended to use this feature only when that extra memory is absolutely necessary.