Skip to content

Terminal

Masl edited this page Jul 7, 2023 · 9 revisions

Terminals are normal windows. The cool thing is that ya can interact with em and enter commands. Also the commands are split into Tasks so ya could execute for example two sleep commands at different terminals and it should work no problemo.

There are a few commands already which do a lot of things.

You can also scroll in the terminal by pressing SHIFT + an arrow key. (on real hardware you sometimes need to toggle numlock or use the right shift)

You can also force quit running tasks by pressing ALT + F1. (This will not close the window)

Terminal commands

commands usually look like this (command) (argument 1) (argument 2) ...

if a command or an argument has spaces, you can use quotes. (Of course. escape sequences work in quotes too!)

Here is a list of the commands:

cls

Clears the terminal screen.

echo (message)

Echoes a message.

connect four

Opens a game of connect four.

bf (code)

Starts a BF Interpreter with said code.

sleep (time in milliseconds)

Sleeps for the given time.

task manager

runs the task manager. (Can be quit by pressing Q)

shutdown

Tries to shut down the OS per ACPI.

exit

Closes the Terminal window. (Same as ALT+F4)

music clear

Clears the music buffer.

music test

Plays some test midi notes.

music mario

Plays part of a hardcoded mario midi.

tetris

Starts tetris. (Still WIP and bad)

doom

Launches Doom. (WIP and has no audio) You can exit the window by holding ESC and CTRL. (Then you can also drag the window around)

notepad

Opens the Notepad.

explorer

Opens the Explorer.

dbg

Launches the Debug Ram Viewer.

img

Opens the Image Viewer with no Images.

img (drive name):(path)

Opens an MBIF image in the Image Viewer

run (drive name):(path)

Tries to run/open/whatever a file. (Only works with MBIF (Image) Files rn.

maab (drive name):(path)

Runs a MAAB file.

testo (drive name):(path)

Tries to run an object file. (Currently still very experimental)

login (username)

Logs into some account. (Might require you to enter a password)

set (parameter name) (value)

Sets a parameter to a value. Here is a list of parameters for the set command

get (parameter name)

Displays a paramater. Here is a list of parameters for the get command

substr (string) (starting index)

Displays a string starting from that index. (for testing)

malloc

Mallocs like 20480 bytes of memory. (used for testing)

crash

Crashes the OS. (very important, I know)

crash 2

Crashes the OS in a fatal way, activating the Fatal GPF handler.

beep (on duration in Microseconds) (off duration in Microseconds) (total duration in Milliseconds)

Attempts to play a beep using the PC-Speaker. (it plays something but it always sounds the same to me)

disk

This is the disk command. You can use it to read/write/get data about disks. (use get "disk count" to get the amount of disks)

there are a few subcommands within disk

disk (ID) read (amount of bytes)

This will read an arbitrary amount of bytes starting from sector 0 and will print it as ascii characters.

disk (ID) write (character) (amount of times)

This will write the character an arbitrary amount of times into the disk starting from sector 0.

disk create "ram disk" (sector count)

This will create a ram disk with an arbitrary amount of sectors. (1 Sector is 512 bytes)

disk create "file disk" (disk number) (partition number) (filepath)

This will create a file disk linked to the given file. The disk will have the size of the file.

disk (ID) get (property)

This will get some data from the disk. Properties:

  • max sector count - Maximum amount of sectors the disk has

disk (ID) partition

This is the partition command/tool. With this command you can manage MRAPS Partitions. You can use partitions on any existing disk Interface.

disk (ID) partition create

This will create an MRAPS Partition Interface (Instance) for your Disk Interface.

disk (ID) partition init

This will initialize a default Partition Table and save it to the disk.

disk (ID) partition save

This will save the current Partition Table to the disk.

disk (ID) partition load

This will load the Partition Table from the disk.

disk (ID) partition create (PARTITION ID) (SIZE IN BYTES) (NAME)

This will create a Partition with a size and a name from an undefined (not in use) partition.

disk (ID) partition delete (PARTITION ID)

This will set the selected Partition to undefined. (It might get combined with neighbouring undefined Partitions)

disk (ID) partition wipe (PARTITION ID)

This will wipe the contents of the selected Partition.

disk (ID) partition resize (PARTITION ID) (SIZE IN BYTES)

This will resize the selected Partition. The Partition size can (almost) always be decreased, but it can only be increased if the partition after it is undefined.

disk (ID) partition read (PARTITION ID) (ADDRESS) (AMOUNT IN BYTES)

This will read an arbitrary amount of data from a partition and display it as ASCII Text.

disk (ID) partition write (PARTITION ID) (STRING) (ADDRESS)

This will write an ASCII string into an arbitrary address in the selected Partition.

disk (ID) partition edit (PARTITION ID) (PARAMETER) (VALUE)

This will edit a parameter of a Partition. Parameters:

  • name - Partition Name
  • description - Partition Description
  • drive name - Drive Name
  • hidden - If the Partition is hidden

disk (ID) partition (PARTITION ID) fs

This is the filesystem command/tool. With this command you can directly manage a filesystem. You can use filesystems on any implemented partition (which is big enough) MRAFS needs a partition which is bigger than 5MB to store the partition table and have data for files.

disk (ID) partition (PARTITION ID) fs create

This will create an MRAFS Filesystem Interface (Instance) for your Partition Interface.

disk (ID) partition (PARTITION ID) fs init

This will initialise an empty MRAFS Filesystem and save the File table.

disk (ID) partition (PARTITION ID) fs save

This will save the File table to the disk (most processes do this automatically).

disk (ID) partition (PARTITION ID) fs load

This will load the File table from the disk.

disk (ID) partition (PARTITION ID) fs list

This will list all file partitions, files and folders in the entire filesystem.

disk (ID) partition (PARTITION ID) fs create file/folder (FILE/FOLDER PATH)

This will create an empty file/folder.

disk (ID) partition (PARTITION ID) fs create file (FILE PATH) (FILE SIZE)

This will create an empty file with a given reserved size.

disk (ID) partition (PARTITION ID) fs delete file/folder (FILE/FOLDER PATH)

This will delete a file/folder. (Note: folder deletions will be recursive!)

disk (ID) partition (PARTITION ID) fs read (FILE PATH)

This will read the entire file and print it.

disk (ID) partition (PARTITION ID) fs read (FILE PATH) (SIZE IN BYTES)

This will read an arbitrary amount of bytes from a file.

disk (ID) partition (PARTITION ID) fs write (FILE PATH) (STRING)

This will write a string into a file. (Note: This will overwrite the file contents!)

disk (ID) partition (PARTITION ID) fs exists file/folder (FILE/FOLDER PATH)

This will check if a file/folder exists.

disk (ID) partition (PARTITION ID) fs get files/folders (FOLDER PATH (/ for root directory))

This will get all files/folders inside of a folder.

disk (ID) partition (PARTITION ID) fs copy file/folder (OLD FILE/FOLDER PATH) (NEW FILE/FOLDER PATH)

This will copy a file/folder with a new path.

disk (ID) partition (PARTITION ID) fs rename file/folder (OLD FILE/FOLDER PATH) (NEW FILE/FOLDER PATH)

This will rename (change the path of it) a file/folder to the new path.

Clone this wiki locally