Closed stevesims closed 5 months ago
we have a solution to this released as part of 2.2.2
the fix was to perform a malloc(6502);
during startup to grab a chunk of memory, which is then immediately freed. including that seems to allow later calls to malloc
work inside MOS even when an ADL application has been started which may have changed the stack pointer on the processor
With the 2.2.0 release it was found that
*dir
did not work on a freshly started system that booted straight into ADL BASIC.Further investigation shows that this is an issue with the use of
malloc
- it seems thatmalloc
will fail, and since DIR had no fallback it would just fail completely.A fix has been made as part of #46 to allow
dir
to work in the event of themalloc
failing, however this does not address the underlying issue.malloc
still fails, this is just being detected, and a fallback to a different non-sorted, and non-coloured, directory display is used instead.Another piece of functionality that does not work from inside of BASIC24 is the
*hotkey
command, as that too usesmalloc
.Curiously, leaving BASIC via
*bye
, doing a*dir
, and then loading up BASIC again and running it resolves the issue, and after doing so the new version of*dir
that shows a sorted directory with colours will work.