-
Notifications
You must be signed in to change notification settings - Fork 11
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
SUBMIT.COM doesn't work #16
Comments
I'll try to fix this. It may take some time. I never really understood how SUBMIT.COM works not tried to emulate it. It's time to learn it now. Thanks. |
Fixed, hopefully. Thanks to your detailed report, starting to tackle it was easier. Several things had to be fixed and supported:
None of that was implemented. Reading the docs I thought that they were only used internally by BDOS. |
Awesome news. Having submit makes compiling, assembling and linking code so much more pleasant. I have to say that I love what you did, recently, with the integration tests and also present in the commits here to test the operation of the submit-commands/output. An idea which I immediately borrowed for myself - skx/cpmulator#154 |
Yes, having at least some integration tests was long due. I started simpler, but having commands like DIR testing for control C during execution made having all the input in just one string more complex. I don't know haw you have dealt with that. Also testing a complete snapshot of the output is probably useful to make sure there are no regressions. |
I suspect resolving this will involve a number of changes, but the short version is simple enough:
There is a related utility I found called "slash", source/binary available within my distribution of utilities:
The short version is that both of these utilities work the same way, they allow the submission of a number of sequential commands to be automatically executed.
SUBMIT.COM will read a text file containing commands, with optional parameter expansion. It will then generate a file
$$$.SUB
on A:, which should be processed the next time the CCP is reloaded.SLASH.COM is similar, but it allows you to create the
$$$.SUB
file without the need for a temporary file, for example:Both of these utilities should produce a file named
$$$.SUB
. That file will contain N 128-byte records, one record for each command. The records will be in reverse order:I played around with fixing this but I hit a bunch of errors which both annoyed and confused me, so I think this will be better placed for you to attack if you wish!
The first issue is that the drive-reset function 13, DRV_ALLRESET, is supposed to return 0xFF if there is a $$$.SUB file present, but ast the moment you hard-code the return value as 0x00. I thought that updating that function to return 0xFF would be OK - because if the file were present it would then be processed, and in the case where opening failed the CCP would move on. But unfortunately it wasn't that simple.
If I make this change:
The end result is actually a failure to open the file:
Running with tracing that's trying to open the file, which does exist:
I stopped investigating there.
However I suspect if you resolve this problem you'll hit another, I see you don't truncate files when they're closed, and so I suspect that if you return the value to indicate the SUB-file is present, and fix the opening you'll end up with an infinite loop:
$$$.SUB
Unless/until the truncation of the last record happens it'll just run forever, until cancelled.
The text was updated successfully, but these errors were encountered: