Re: CLIL source code from book "Firmware demystified"



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
.



Relevant Pages

  • Re: Computer
    ... All the Unix commands are there. ... I like the Mac interface better than the Windows interface. ... I do use the command line on Windows and Unix, Linux and BSD but am not tied to it. ... I rather suspect that some would still be using the old DOS and command lines, ...
    (rec.photo.digital)
  • Re: Its happening all over again.
    ... skills at those since DOS vanished away. ... DOS used a command-line interface. ... He's saying that the only common skill all CLIs require is the skill of typing. ... The commands are different depending of the system the command line is an interface _to_. ...
    (rec.arts.sf.fandom)
  • Re: DOS / XP bat file programming question
    ... How do I feed a "y" response to a DOS command that wants to prompt me ... Note that DOS is an operating system, same as Windows XP. ... There is no DOS under Windows, only a Command Prompt. ...
    (microsoft.public.windowsxp.general)
  • Re: Master Boot Record
    ... Is the DOS program relating to the commands which you mentioned in your ... > If you don't know why you'd want to restore or backup a boot sector then don't do it. ... It also contains the partition table. ... The LOCK command enables direct disk access by programs ...
    (microsoft.public.windowsxp.general)
  • Re: newbie: I/O with nasm
    ... A program that starts with "main" and is linked with gcc has the "_start" label in the C startup code, and the stack is slightly different when we get control at "main". ... Dos is *very* different, as you point out. ... Working on up the (Linux) stack, the list of command line argument pointers is terminated with a zero. ...
    (alt.lang.asm)