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

Muddle 56 doesn't flush buffer on <CLOSE> #1957

Closed
atsampson opened this issue Sep 17, 2020 · 1 comment · Fixed by #1959
Closed

Muddle 56 doesn't flush buffer on <CLOSE> #1957

atsampson opened this issue Sep 17, 2020 · 1 comment · Fixed by #1959
Labels
bug muddle Muddle/MDL

Comments

@atsampson
Copy link
Contributor

@ZoBoRf found that Muddle 56's <CLOSE> doesn't flush its output buffer when closing a file - there's a detailed description and a test program in ZILCH-How-to.

I had a look at this, and it's because some of the IO code was updated for TOPS-20 but not for ITS. In particular, the ODSK and OTTY functions should set the C.DISK/C.TTY flags in -2(B) - the CLOSE code checks for those flags in the channel being closed and assumes it's a network channel if neither is set.

I've tried changing ODSK/OTTY to IOR in the appropriate flags after calling OPEN0/OPEN2. This gets into the right bit of code in BFCLOS but the .CALL SIOT it uses doesn't work - this either needs fixing, or replacing with a call to the usual code for writing bytes to a file (which is how Muddle 54 does it).

@atsampson atsampson added bug muddle Muddle/MDL labels Sep 17, 2020
@atsampson
Copy link
Contributor Author

.CALL SIOT only works on unit mode channels (says the comment in SYSTEM; ITS), and Muddle 54/56 both open files in block mode for "PRINT", so SIOT is not the right thing to use here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug muddle Muddle/MDL
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant