Aim
You are required to develop a shell and a clock for OSx311. Your work should meet
the specifications below:
Clock
After booting up, your OS should display clock on the screen. Below are the
requirements for the clock:
- After booting, the time will be 00:00:00 initially.
- Clock should stay on the top right corner of the screen no matter what
- Clock updates should be seamless, erratic increments are not acceptable
- Clock updates should be performed using the timer interrupt, using a dummy loop
for updating the clock is absolutely unacceptable
- Clock should be in 24-hour format
- Single digit hour, minute, second values should be zero padded
Command Shell
Your operating system should provide users a shell that can run commands. Shell
should meet the specifications below:
- At the very least, "help" and "settime" commands should be supported
- If an invalid command is entered, the user should be encouraged to use help
- help command should provide the user a list of available commands
- settime command should update the CMOS RTC with the value entered (clock should
continue from the new time)
- If any command is called with invalid parameters, the user should be presented
with the correct usage
- It is your responsibility to mind the number of spaces entered between
parameters
- reboot command should return the OS to its initial state
Colors
Welcome message: red over black
Clock face: black over white
Command prompt: green over black
Anything else: white over black
This is more or less how your OS should look like:
Welcome to OSx311 19:23:07
OSx311> testing
'testing' is an invalid command.
Type 'help' for a list of available commands.
OSx311> help
Available commands: help, settime
OSx311> settime
Usage: settime hh mm ss
OSx311> settime 19 22
Usage: settime hh mm ss
OSx311> settime 19 22 04
Time has been set to 19:22:04
Other Information
For color codes, RTC registers etc. you can refer to these sites:
Hint:
Incorporate kb.c into the existing OSx311 kernel and read the keyboard presses through keyboard interrupt.