Re: CLIL source code from book "Firmware demystified"
- From: Jonathan Kirwan <jkirwan@xxxxxxxxxxxxxx>
- Date: Thu, 30 Jun 2005 20:41:27 GMT
On Wed, 29 Jun 2005 16:16:58 +0900, "Roman Mashak" <mrv@xxxxxxxx>
wrote:
>Recently this book has fallen into my hands and I was reviewing the chapter
>dedicated to development of Command Line Interface for generic embedded
>system.
>
>I was confused, the author offers unusual method: there is main function
>getting command line from user and parsing it, than calls appropriate
>function (for example, which shows env. variables: show_env()) and pass
>'argc' and 'argv[]' to that function (assuming that in CLI prompt you enter
>some arguments, like 'show env current').
>
>How is it possible to work?
I haven't read the book, but I think I know what your question is
about. I think all of your other replies come from their confusion
(and yours, as well.)
When DOS attempts to parse a command line, the Microsoft designers
included an INT 2Fh, Function AEh undocumented feature to permit the
replacement of both internal DOS commands as well as to allow special
processing of the command line before COMMAND.COM did its default
processing for it. In fact, the command APPEND uses this feature.
Two sets of calls are provided: one to determine if a command is
supported by any of the functions that are hooked into this interface
and the other to, obviously, then execute or implement it. In the
first case, DOS calls with AL=00h. DOS expects to see a response of
FFh in AL if the command is supported by one of the installable
command functions hooked in. If one does send back the AL=FFh, then
DOS calls it back with AL=01h so that the command gets executed by the
installed code and NOT by DOS's COMMAND.COM program. The command line
text is passed in DS:SI, in both cases.
I suspect that this is what you are on about.
Jon
.
- References:
- CLIL source code from book "Firmware demystified"
- From: Roman Mashak
- CLIL source code from book "Firmware demystified"
- Prev by Date: Re: Arm gnu directive assembler problem
- Next by Date: Re: Looking for a p-channel enhanced-type power MOSFET with Gate Threshold Voltage less than -1.0 volts
- Previous by thread: Re: CLIL source code from book "Firmware demystified"
- Next by thread: Startup code
- Index(es):
Relevant Pages
|