agon-mos icon indicating copy to clipboard operation
agon-mos copied to clipboard

Errors in autoexec.txt fail silently

Open stevesims opened this issue 2 years ago • 1 comments

My autoexec.txt file is simple, reading thus:

SET KEYBOARD 0
LOAD bbcbasic
CD test
RUN

On boot I was ending up in the MOS prompt rather than BASIC, which I was somewhat mystified by.

It turns out there are two errors in this file. The first being that it should be LOAD bbcbasic.bin, and making that change landed me in BASIC. The second error is that I don't actually have a test directory on my SD card, so the CD command was also failing silently.

It would be good if errors in the autoexec.txt file could be surfaced.

Ideally if we handled autoexec.txt in a manner similar to how MS DOS dealt with autoexec.bat files, i.e. by passing the contents thru the command line, rather than executing directly, then we would expose both the commands being processed as well as any errors that may have occurred.

stevesims avatar Aug 11 '23 09:08 stevesims

Hi, thanks for the suggestion. The autoexec.txt files do currently execute their commands by passing each line through the command line. Not handling errors and not echoing the details on screen are deliberate. I could modify the code by adding a command to turn echo on and off, and always failing on errors.

breakintoprogram avatar Aug 13 '23 15:08 breakintoprogram