tom-seddon / acorn_mos_disassembly

WIP disassembly of Acorn MOS, operating system for Acorn's 8-bit Master series
8 stars 0 forks source link

`*ADFS`, but no ADFS ROM #41

Open tom-seddon opened 3 months ago

tom-seddon commented 3 months ago

*ADFS is a MOS built-in, presumably so that *A. is guaranteed to be an abbreviation for *ADFS. (Probably need to leave it as a built-in for this reason.) Its handler is here: https://github.com/tom-seddon/acorn_mos_disassembly/blob/f94a8ecbb8106ed9cf17a612bbde968a352898c6/src/terminal.s65#L542

But if you don't have an ADFS ROM installed, it ends up passed to FSCV A=3, so the current filing system tries to handle it, possibly by trying to do a *RUN ADFS. Which is not what you want; built-in commands should do the expected thing, or fail.

Should really have a special handler that does only a romServiceCallUnrecognisedCommand service call and then issues an error (maybe with specific No ADFS text?) if nothing handled it. Then if you have ADFS, it'll behave as it does now, and if you don't, you'll get something useful.

acheton1984 commented 2 months ago

And the same for *BASIC if you have no BASIC ROM installed?

Unfulfilled MOS commands (eg, DELETE, INFO under TAPE) seem to do nothing and return with no error.

tom-seddon commented 2 months ago

Good point about *BASIC. The code for that explicitly checks for the BASIC ROM presence and passes it to the FS if absent... hmm, OK, so, perhaps this behaviour was actually thought desirable at the time? And maybe it actually is?

(I suppose in the BASIC case issuing an error would mean you couldn't do *BASIC inside the second processor to .run a suitable BASIC from disk. The ADFS case seems more cut and dried mind you. Perhaps there's something I'm missing though.)

I hadn't realised *DELETE and *INFO behave that way, and I bet *EX is similarly affected. The tape FS could detect these and rather than treat them as no-ops it could issue an error. I should probably ask on stardot about the wisdom of doing this.