On 12/12/2011 6:31 AM, A2CPM wrote:
Hi! On Dec 7, 1:03 am, David wrote:Dave Lyons' Davex shell is now available in source and executable form from Sourceforge here: http://davex.sourceforge.net The current (preliminary) version is 1.30p, and includes executables on disk images for both ProDOS and SOS computers and emulators. The ProDOS version currently lacks some of the external commands (but you can watch the Sourceforge project for more), and the SOS version is currently a minimal subset of the ProDOS version. One an all are welcome to use and contribute.I took a look at "main.asm" and am baffled by the " SET_LEVEL" lines. I don't see a macro definition for 'SET_LEVEL' and see no mention of it in the ca65 Users Guide.
The macros are buried a bit - they're defined in src/Common/2 and src/Common/3 for the II and ///, respectively. The notion of a "level" of open files is common to ProDOS and SOS, but the implementation differs. The idea is this: a numeric level defines a point at which you can tell the OS, "close all files that are open at this level [or higher]."
ProDOS has a lot of different possible numeric levels - Davex originally defined five or so distinct levels, using pretty big jumps in numbers (I dunno, maybe it was a Fibonacci sequence or something...). But SOS only has three possible levels: 1, 2, and 3. And the console is open at level 1, so that only left SOS with 2 distinct file levels to play with in Dav3x. Since I/O redirection isn't implemented there (yet), that's not much of a concern (yet).