               FDShell - A free command interpreter for FreeDOS
               

1. What is it?

FDShell is a free command  line interpreter for any DOS clone system. It needs
a  3.3  DOS  for  running  (I think, I really don't know), and can be compiled
using  DJGPP  (http://wwww.delorie.com/djgpp),  Trubo C (the free version from
the museum www.borland.com or using HI-TECH-C (http.//www.htsoft.com).
Finally,  it  will support also GCC (http://gcc.gnu.org) under Unix, and Win32
platform.  This  is  a  program is distributed under the GNU license, for more
information read the file COPYING.

Note:  This file describes how the FINAL FDShell should look like.
       Most of thease features are not implemented yet. Read TODO.TXT.

2. Why doing that?

The  reason  I  wanted to do this command interpreter, is that FreeDOS command
interpreter  has  some  flaws. I had some ideas how to fix them, but I need to
use  some  other  tools and libraries. All of cause are in the GNU license (or
other  similar),  but  I  think  that FreeDOS command interpreter guys want to
write  all  the code themselves. The big "BUG" this command interpreter has is
it's  big use of memory.
Another   reason,   is   that   currently   on   my   computer   I   use  4dos
(http://www.jpsoft.com)  as  my  shell. And this is a shareware program, so it
says these annoying messages after a while. A GNU program could be cool.
But  if  you  really want to konw why I am doing it, it is really simple: I am
really  a  PASCAL  programmer,  and  I wanted to start coding in C, since this
platform is not really supported anymore, and all major OS basicly depend on C
and  programming  in  other  lenguages is like a hack. This seems like a small
little project to begin with.

3. How does it save more memory?

Ralph  Brown  wrote  a  library  called  SAPWNO. It contains some functions to
execute  external  programs  (like  the standard C functions). These functions
make more memory for the child process by swapping all the memory to disk, XMS
or EMS. It can be found in . This function leaves the memory with a program as
big as 200-400 bytes!!! Ralf brown SAWNO lib can be found at:
  http://www.cs.cmu.edu/~ralf/files.html.

Another good way to reduce the memory needed, is to reduce the program size. I
did some things to the structure of the program:

1) Most of the internal commands known under DOS (copy, md, dir etc.) are
   now external programs. This way the command interpreter takes less
   memory and is separated into small "modules" which are the commands.
   Under the root directory of the program there should be a directory
   called "bin", in which are all the "internal" commands of the normal
   shell. That means that when you type a string into FDShell, first it
   looks in it's small internal commands (ver, echo, goto, exit) and then
   it should look in the directory "%FDSHELL%\bin" (or just add this to
   the path at the beginning of the existing PATH when loading, and then try
   to find the command in the system PATH. The big problem with this is
   that it will work very slow on floppies (and may be some old HD without
   a good cache program). That is the reason why it will never be the
   official one. Just a secondary player. (unless FreeCOM will start using
   this "secret" library, and then I will be lost...)
2) All string errors and user messages are swapped to disk when executing a
   program. When returning from the run program, the program loads them
   back to memory.
3) All FDShell start-up environments and switches are save in a file called
   FDSHELL.INI. A functions that reads this file and reads it to C
   variables is called once and then not needed any more. Instead I used a
   program which translates this INI file into a binary CFG file. From this
   file the program just needs to read the binary values of any variable
   needed. The program is located in the root directory if the project and
   called FDINIT.EXE(COM). The program should be run only by the command
   interpreter when it started running with he argument --startup. If the
   program recognizes that it has been run on the starting of the shell, it
   will read the file called FDSHELL.INI, and write a file FDSHELL.CFG
   which the shell will read from it the needed switches/variables.
4) All help system is completely external. When executing (for example)
   "dir /?" or any similar, the shell will then type the file called
   dir.txt in the directory called "HELP". In this directory you will find
   all the same files as in the "BIN" directory, but with the extension
   ".TXT". The external command TYPE will also have keyboard scroll for
   making the reading more easy.

4. What other features does FDShell support?

That's not all the features of the shell. There are more:

1) Full TAB competition. You can press the start of a command/file in the
   current directory, and the command interpreter will complete it when
   pressing TAB. I want it to work similar to 4dos TAB competition rather
   then the unix one. I like it better, and I am writing the program so...
2) The final distribution will have also ODI LFN tools. These are some
   programs that do the same as the DIR/COPY/MD commands, but they use LFN
   even under pure DOS, by using direct disk accsess, So you can really use
   LFN even under pure DOS. (Note that this is not really a feature but an
   extenuation of the distribution). ODI LFN tools can be found at
     http://odi.webjump.com.
3) Support for command aliases. You can alias the "DIR" command to point to
   "LDIR" for ODI LFN tools. All aliases are swapped to disk before
   executing a program for saving memory.
4) Mouse enabled. You can press a word on the screen to copy it into the
   command line, and then executing it. Great when you typed "dir" and want
   to execute a command with weird name. Just press it and press enter.
   I don't know how to implement it yet: internally from the program or
   with a TSR. Help me!!!
5) You can modify the FDSHELL.INI to implement different languages support.
   You can have errors in ENGLISH/SPANISH/FRENCH just by defining the
   errors on FDSHELL.INI!!!
6) Support for 4dos BTM files. BTM are batch files with more commands. Will
   support for them too.

5. Distribution

This  is  the first release of this software. It is just an idea. for now most
of  it's  features do not work. I need to implement them. The version 1.0 will
have  all  the  features I wrote about them above. The final distribution will
look something like this:

[BASE DISTRIBUTION DIRECTORY]
  fdshell.exe
  fdinit.exe (or com, I need to know how which compiler to use)
  fdshell.ini
  fdshell.cfg (fdini.exe does it on run-time)
  readme.txt (will point to DOC/readme.txt)
  BIN/
    cd.exe
    chdir.bat -> cd.exe
    cls.exe(com) (I can write this in pure assemble, maybe)
    copy.exe
    date.exe
    del.exe
    dir.exe
    md.exe
    mkdir.bat -> md.exe
    move.exe
    pause.exe
    rd.exe
    ren.exe
    time.exe
    tree.exe
    type.exe
    vol.exe
    (all ODI LFN TOOLS)
  HELP/
    cd.txt
    chdir.txt
    cls.txt
    copy.txt
    date.txt
    del.txt
    dir.txt
    md.txt
    mkdir.txt
    move.txt
    pause.txt
    rd.txt
    ren.txt
    time.txt
    tree.txt
    type.txt
    vol.txt
  DOC/
    copying. (GNU license)
    readme.txt
    fdshell.txt
    history.txt

Developers  distrivution  is  very similar, there is one more directory called
ETC. In this directory you can find all the supported configuration files.
For example:
   for DJGPP   - you have a .GDT and GPR files (load them from RHIDE).
                 load the GPE file (PROJECT|LOAD)
                 no makefile yet, but will be in the future
   for TurboC  - you have a .PRJ and .DSK file to load from the IDE
                 load the PRJ file (PROJECT|LOAD) and then edit the
                 OPTIONS|DIRECTORIES. Will also have a makefile.
   for PACIFIC - you have a PRJ file to load
                 use PROJECT|LOAD.
                 will have a batch file or something

more compilers will probably will come if you help me!!!

In the future I will have a www page for this project (could be something like
http://members.xoom.com/dgi_il/c/fdshell.html).  For  now  you  can  find this
project on http://members.xoom.com/c/index.html (in the bottom of the page).

6. Contribution

This  software  is copyrighted by dgi, but may be freely distributed under the
GNU  license  (for  more  information  read the file COPYING). If you have any
thing  to  add  to this project you may mail this to the author, and this will
probably be patched and added to the next release.

You  have  on  this release only a project for DJGPP TRUBO C and for HI-TECH-C
compiler.  In the future I will have makefile for DJGPP, GCC (I really want to
compile it under LINUX) and a makefile for TurboC.

7. Help

I  need a lot of help with this project. Fell free to help me anyway you want,
from   source   code   patches,   and  documentation,  help,  more  ideas  and
configuration  files.  What  I will really need in the future is help with the
languages  support:  you  can  help me translate all the error codes and error
messages  to  other  languages:  I  can do english and spanish (will need some
help),  and  may  be  I  will add hebrew also (I don't think this will look so
good).

visit me at (dgi or diego)
  members.xoom.com/dgi_il
  dgi_il@hotmail.com, dgi_il@surfree.net.il
  icq 28481600