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

Enhanced *EXEC #18

Open
stevesims opened this issue Oct 25, 2023 · 2 comments
Open

Enhanced *EXEC #18

stevesims opened this issue Oct 25, 2023 · 2 comments

Comments

@stevesims
Copy link
Contributor

Back in the mists of time, it was possible on a BBC Micro to *EXEC a text file in BASIC to load in that file. This was essentially the only way to implement libraries on the Beeb.

Our current *EXEC implementation doesn't support this mode of operation, as it passes file contents directly to the MOS command line interpreter.

We should consider whether it's possible to change the implementation of *EXEC so that it is compatible with BASIC, and potentially other language CLIs too.

One possibility is that instead of passing file contents directly to MOS it instead interprets the file contents as effectively key presses. This needs some more thought and investigation.

@stevesims
Copy link
Contributor Author

*exec on Acorn systems essentially works by effectively sending the contents of a file to the keyboard buffer, and then allowing that to be processed.

our MOS doesn't currently have a keyboard buffer. we may wish/need to add one

@stevesims
Copy link
Contributor Author

there may be a way to do this without adding in a keyboard buffer

if the line editor API had an associated input file handle, then that could be used as a source for input. exec could then be a matter of opening up a file, and setting that as the current input source for the line editor. once the line editor has reached the end of this file it would close it

this may be related to #80 and #81

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

No branches or pull requests

1 participant