Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new KILLDSKIO environment variable #98

Merged
merged 3 commits into from
Mar 22, 2022

Conversation

Konamiman
Copy link
Owner

@Konamiman Konamiman commented Jan 13, 2022

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.

When this variable is set to "ON" (case insensitive) the 512 byte buffer
that is normally allocated for the DSKI$ and DSKO$ BASIC commands won't
be allocated when starting the BASIC environment, thus these 512 bytes
will be gained back for BASIC programs. This implies that the DSKI$ and
DSKO$ commands will be disabled (they will throw "syntax error").
@Konamiman Konamiman added this to the v2.1.1 beta 2 milestone Jan 13, 2022
@Konamiman Konamiman self-assigned this Jan 13, 2022
PATHNAME can't be zero as it's used as a pathanme buffer in BASIC.
Also set DIRBUF to the same value for compatibility.
@Konamiman Konamiman changed the title Add a new KIILLDSKIO environment variable to disable DSKI$ and DSKO$ Add a new KILLDSKIO environment variable to disable DSKI$ and DSKO$ Jan 18, 2022
@Konamiman Konamiman changed the base branch from v2.1 to v2.1.1-beta2 March 20, 2022 12:17
@Konamiman Konamiman changed the title Add a new KILLDSKIO environment variable to disable DSKI$ and DSKO$ Add a new KILLDSKIO environment variable #98) Mar 22, 2022
@Konamiman Konamiman merged commit da69ce5 into v2.1.1-beta2 Mar 22, 2022
@Konamiman Konamiman deleted the add/killdskio_env_variable branch March 22, 2022 09:12
@Konamiman Konamiman changed the title Add a new KILLDSKIO environment variable #98) Add a new KILLDSKIO environment variable Mar 22, 2022
@Konamiman Konamiman mentioned this pull request Mar 22, 2022
Konamiman added a commit that referenced this pull request Mar 22, 2022
* Change the mechanism to access mounted files (#93)
* Fix: incorrect setting of UD_ACLU when freeing a FAT chain (#96)
* Add the CALL SYSTEM2 command in BASIC (#97)
* Add a new KILLDSKIO environment variable (#98)
* Update kernel version number to 2.1.1 beta 2 (#101)
vipoo pushed a commit to vipoo/Nextor that referenced this pull request Oct 4, 2023
Add a new KILLDSKIO environment variable to disable DSKI$ and DSKO$

When set to "on", the 512 byte buffer for DSKI$ and DSKO$ won't be allocated, and the commands will be disabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant