C shell
Re:C shell
for the greatists stability of the kernel, i'd make a shell system call then an application started from the kernel at boot calls the shell system call baised on the user input.
Re:C shell
due to handling many different things that C++ has to offer, you need to recreate the wheel in some cases. Here is a good linke to help you out.
http://www.invalidsoftware.net/os/
http://www.invalidsoftware.net/os/
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:C shell
- have an "input reader"
- once the user entered a line, check the syntax
- grab the first word : that's the command name
- locate the code for that command (it might be internal command like "help", "ls", "cd", "set" ... or some external program)
- if external program, look up for the program in every directory in $PATH
- if program found, load it in memory, set up arguments array and call main(argc, argv[])
- when program returns, restart
- once the user entered a line, check the syntax
- grab the first word : that's the command name
- locate the code for that command (it might be internal command like "help", "ls", "cd", "set" ... or some external program)
- if external program, look up for the program in every directory in $PATH
- if program found, load it in memory, set up arguments array and call main(argc, argv[])
- when program returns, restart