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

Mimic CP/M: update FCB's CR, EX and S2 fields even on some errors from sys_readrand() #93

Merged
merged 1 commit into from
Nov 11, 2019

Conversation

mecparts
Copy link
Contributor

Update FCB's CR, EX and S2 fields in _ReadRand() unless an error # 6 is returned from _sys_readrand (seek past physical end of disk). Updating in the case of a #1 or #4 error mimcs CP/M's behaviour and allows a program to use _ReadRand as a sort of seek() call to position for a subsequent Seq Write. It's a little weird, but it seems that at least one program out there does that kind of thing.

Removed _sys_extendfile() calls from _sys_read* functions. WordStar 4.0 actually does a random read of record# 65530 after it finishes printing a file, and the source file was being inflated to 8MB. Gulp!

…ockbaTheBorg#6 is returned (seek past physical end of disk). Updating in the case of a MockbaTheBorg#1 or MockbaTheBorg#4 error mimcs CP/M's behaviour and allows a program to use Random Read as a sort of seek() call to position for a subsequent Seq Write. It's a little weird, but it seems that at least one program out there does that kind of thing.

Removed _sys_extendfile() calls from _sys_read* functions. WordStar 4.0 actually does a random read of record# 65530 after it finishes printing a file, and the source file was being inflated to 8MB. Gulp!
@MockbaTheBorg MockbaTheBorg merged commit 6ae9d15 into MockbaTheBorg:master Nov 11, 2019
MockbaTheBorg added a commit that referenced this pull request Nov 22, 2021
Mimic CP/M: update FCB's CR, EX and S2 fields even on some errors from sys_readrand()
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.

2 participants