[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DOS 3.3 command interpreter accessible from ML?
- Subject: Re: DOS 3.3 command interpreter accessible from ML?
- From: dempson@actrix.gen.nz (David Empson)
- Date: 1998/08/14
- Newsgroups: comp.sys.apple2
- Organization: Empsoft
- References: <6r01qj$sfb$1@news.NERO.NET>
Benjamin Summers <summersb@ucs.orst.edu> wrote:
> I was wondering if the DOS 3.3 command interpreter (i.e. the one you issue
> commands to from the ] prompt or with a chr$(4) from BASIC) is accessible
> from machine language routines.
The DOS 3.3 one is, and you can access it via faking a PRINT command.
Some commands are only available if the machine code routine was CALLed
from within a running BASIC program (notably the text file commands such
as OPEN, READ, etc.)
The only catch (which affects BASIC as well as machine code) is that DOS
will only recognise the Ctrl-D character if it is the first one in an
output line. You might need to send a Ctrl-M (carriage return) first.
If I remember right, you can avoid this by poking zero into the cursor
horizontal position ($24). It has been about 13 years since I last did
this, so I might be misremembering this detail.
Note that the PRINT technique does NOT work in ProDOS (under
BASIC.SYSTEM). There is another mechanism for issuing a limited subset
of the commands, by poking it into a buffer and JSRing to an entry point
provided in BASIC.SYSTEM's global page.
--
David Empson
dempson@actrix.gen.nz
Snail mail: P.O. Box 27-103, Wellington, New Zealand