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.
There are also some commands that will only work in text-mode or VGA mode. Most commands listed here work in both unless stated otherwise.
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 belowPrints out basic commands, syntax, mode shortcuts, and welcome message.
reboot
output: restarts OSRestarts the operating system, can be useful when my lack of skill starts leaking through :/.
tasks
output: PID: 0 osakaOS GUI PRI: 0
Displays the current tasks running on the OS, their name, process ID, and their priority level.
files
1024 file
1029 file1
1034 file2
3 files have been allocated.
Lists each file currently allocated on the system, how many files allocated, sector location, and tags.
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) [text-mode only]
ex. osaka 0
output: pictured belowPrints out ascii art of Osaka Azumanga.
dad [text-mode only]
output: pictured belowOh my gah in ascii form.
random (int/string/file)
ex. random 23
output: dependsExecutes random command with given arguments (including no arguments).
version
output: osakaOS v2.1 CopyLeft, Leechplus Software
Displays what version of osakaOS you're using.
PANIC [text-mode only]
output: pictured belowDisplays help message on screen and imitates a car alarm.
PANIC
will crash the system and you will be forced to reboot.