Projects


osakaOS v1.0 - Commands II

This page will go over each command in osakaOS, its syntax, functionality, and stability. Scripting will not be covered yet.
The first thing I'll go over is how the command line works under the hood.

When the OS boots up it initializes a hash table. A command's hash value will be the index in this table that points to the code of that command.
If you send "say hello world", as a command, the hash of "say" will be computed and the OS will exectue the code found in the hash table at "say"'s index.

As stated in the previous section, commands take 3 types of arguments, strings, integers, and files.
Variables and other scripting concepts will not be covered in this section, but will be explained fully in its own section.
Each argument in a command is seperated by a space character. Most commands that take strings as arguments have them last in case they contain a space.
For commands that take integers as arguments, values are in range of unsigned 32-bits, meaning no negative numbers, and the largest number is 2^32-1.
If no argument is given for an integer, or an invalid integer is detected, the integer will default to a value of 0.
Many commands in osakaOS will not feature error messages. The command will simply try to execute to the best of its ability given what data it was fed.
The full command string, (the command + any other arguments) has a maximum length of 256 characters.

Here are some basic commands and their syntax.


say (string) ex. say hello world output: hello world

This command serves as a generic echo command that prints out whatever argument was passed to it.


help output: pictured below

Prints out basic commands, syntax, mode shortcuts, and welcome message.





files

output:
file 2883
file1 2452
file2 1850
3 files have been allocated.

Lists each file currently allocated on the system, how many files allocated, and sector location.


clear output: clear screen

Clears the screen of any text.



Other commands will be used for direct access to specific system resources and devices.


delay (int) ex. delay 1000 output: delays the system for ~1 second.

This command uses the PIT timer to delay the system in (int) number of milliseconds.


beep (int) ex. beep 600 output: beeps at a frequency of 600 Hz.

Uses the PC speaker to produce a beep at the given frequency.


rmem (int) ex. rmem 435 output: Reading from 435: 10480.

Reads value from the given 32 bit memory address.


wmem (int1) (int2) ex. wmem 435 50789 output: Wrote 50789 to memory address 435.

Writes value of (int2) to the given (int1) 32 bit memory address.


rdisk (int1) (int2) ex. rdisk 1200 512 output: Reading from sector 1200: Junk data

Reads (int2) number of bytes from disk sector (int1).


wdisk (int) (string) ex. wdisk 1200 Example data output: Wrote: Example data to disk sector 1200.

Writes given string of bytes to the beginning of the disk sector.



Other commands either deal with the filesystem or scripting so they will be covered in their respective pages.
The rest of them serve some miscellaneous purpose or are essentially just there as jokes.


osaka (int) ex. osaka 0 output: pictured below

Prints out ascii art of Osaka Azumanga.





dad output: pictured below

Oh my gah in ascii form.





random (int/string/file) ex. random 23 output: depends

Executes random command with given arguments (including no arguments).


sata (int) (string) ex. sata 4 say hello world

output:
say hello
say hello
say hello
say hello

Executes (string) as a command for (int) number of times.

This command is broken and doesn't work as intended in v1.0


andagi output: sata andagi

Prints out sata andagi.


version output: osakaOS v1.0

Displays what version of osakaOS you're using.


PANIC output: pictured below

Displays help message on screen and imitates a car alarm.





explode output: picture not available

Flashes colors with VGA and makes loud beeps as the system crashes.

This command is broken and doesn't work as intended in v1.0


explode and PANIC will crash the system and you will be forced to reboot.
explode and sata are broken and don't work properly as of version 1.0.

The next page will go over files and the OsakaFileSystem.

Previous Page                    Next Page