Skip to content

commands reference

Rechie Kho edited this page Oct 6, 2024 · 16 revisions

Before using this reference, it is important to know how to read the command's notation. Here is an example:

> say [options] {message}

Below is the table for deciphering the command's notation,

word description
> or xxxxx (at the start of the notation) > indicates that it should be executed on prompt or in buffer while xxxxx only can be executed in buffer. It shouldn't be typed together with the command when calling.
text A literal text. Just type it exactly. In the example, say is a literal text.
[text] An optional text. You can either substitude or omit it when calling. Suffixing with ... ([text...]) means it accepts multiple words. In the example, [options] is an optional text.
{text} A mandatory text. You need to substitude it with the value you want and cannot be omitted. Suffixing with ...({text...}) means it accepts multiple words. In the example, {message} is a mandatory text.

say command

> say [options] {message}

Prints {message} to the screen.

Arguments:

[options] - A group of single-character options for defining the representation of {message}.

single-character option meaning
d Dark or black.
b Dark blue.
v Dark verdant (green).
c Dark cyan.
r Dark red.
m Dark magenta.
y Dark yellow.
g Dark grey.
B Bright blue.
V Bright verdant (green).
C Bright cyan.
R Bright red.
M Bright magenta.
Y Bright yellow.
G Bright grey.
w white.
n New line after {message}. Number of new lines will be number of ns given.

{message} - Text to be printed.


bye command

> bye [ignored...]

Shutdown the computer. Might not work on real hardware.

Arguments:

[ignored...] - Ignored arguments.


set command

> set {variable} {value}

Set {variable} with {value}.

Arguments:

{variable} - Nth variable.

{value} - A string value.


push command

> push {variables...}

Push {variables...} onto stack from left to right.

Arguments:

{variables...} - Numbers for nth variables to be pushed onto stack.


pop command

> pop {variables...}

Pop the stack and store the value onto {variables...} from left to right.

Arguments:

{variables...} - Numbers for nth variables to be popped from stack.


rst command

> rst [ignored...]

Reset stack, discard all the value on stack.

Arguments:

[ignored...] - Ignored arguments.


lsb command

> lsb [start] [count]

List rows in buffer.

Arguments:

[start] - Nth starting row.

[count] - Number of row to be displayed.


stb command

> stb {buffer}

Set {buffer} as active buffer.

Arguments:

{buffer} - Nth buffer.


= command

> = {row} {value}

Set {row} in the active buffer with {value}.

Arguments:

{row} - Nth row.

{value} - New string for the {row}.


clb command

> clb [ignored...]

Clear current active buffer.

Arguments:

[ignored...] - Ignored arguments.


run command

> run [ignored...]

Run buffer 0.

Arguments:

[ignored...] - Ignored arguments.


jump command

xxxxx jump [direction] {row}

Jump to {row} in buffer if [direction] is not set. Else, jump by {row} relative to current executing row in [direction] direction.

Arguments:

[direction] - Either + (downward) or - (upward).

{row} - Nth row if [direction] not given, else row displaced.


cmp command

> cmp {value_a} {value_b}

Compare {value_a} with {value_b} (for conditional jump commands).

Arguments:

{value_a} - a string.

{value_b} - a string.


jse command

xxxxx jse [direction] {row}

Compare values from cmp as string. Call jump if it is equal.

Arguments:

[direction] - Either + (downward) or - (upward).

{row} - Nth row if [direction] not given, else row displaced.


jsne command

xxxxx jsne [direction] {row}

Compare values from cmp as string. Call jump if it is not equal.

Arguments:

[direction] - Either + (downward) or - (upward).

{row} - Nth row if [direction] not given, else row displaced.


jue command

xxxxx jue [direction] {row}

Compare values from cmp as unsigned interger (uint). Call jump if it is equal.

Arguments:

[direction] - Either + (downward) or - (upward).

{row} - Nth row if [direction] not given, else row displaced.


june command

xxxxx june [direction] {row}

Compare values from cmp as unsigned interger (uint). Call jump if it is not equal.

Arguments:

[direction] - Either + (downward) or - (upward).

{row} - Nth row if [direction] not given, else row displaced.


jug command

xxxxx jug [direction] {row}

Compare values from cmp as unsigned interger (uint). Call jump if value_a is greater than value_b.

Arguments:

[direction] - Either + (downward) or - (upward).

{row} - Nth row if [direction] not given, else row displaced.


juge command

xxxxx juge [direction] {row}

Compare values from cmp as unsigned interger (uint). Call jump if value_a is greater or equal to value_b.

Arguments:

[direction] - Either + (downward) or - (upward).

{row} - Nth row if [direction] not given, else row displaced.


jul command

xxxxx jul [direction] {row}

Compare values from cmp as unsigned interger (uint). Call jump if value_a is less than value_b.

Arguments:

[direction] - Either + (downward) or - (upward).

{row} - Nth row if [direction] not given, else row displaced.


jule command

xxxxx jule [direction] {row}

Compare values from cmp as unsigned interger (uint). Call jump if value_a is less or equal to value_b.

Arguments:

[direction] - Either + (downward) or - (upward).

{row} - Nth row if [direction] not given, else row displaced.


add command

> add {variable} {uint_a} {uint_b}

Store the result of {uint_a} + {uint_b} to {variable}.

Arguments:

{variable} - Nth variable.

{uint_a} - First unsigned interger.

{uint_b} - Second unsigned interger.


sub command

> sub {variable} {uint_a} {uint_b}

Store the result of {uint_a} - {uint_b} to {variable}.

Arguments:

{variable} - Nth variable.

{uint_a} - First unsigned interger.

{uint_b} - Second unsigned interger.


mul command

> mul {variable} {uint_a} {uint_b}

Store the result of {uint_a} * {uint_b} to {variable}.

Arguments:

{variable} - Nth variable.

{uint_a} - First unsigned interger.

{uint_b} - Second unsigned interger.


div command

> div {quotient} {remainder} {uint_a} {uint_b}

Divide {uint_a} with {uint_b}. Store the quotient to {quotient} variable and remainder to {remainder} variable.

Arguments:

{quotient} - Nth variable for resulting quotient.

{remainder} - Nth variable for resulting remainder.

{uint_a} - First unsigned interger.

{uint_b} - Second unsigned interger.


load command

> load {file}

Load data from {file} to current buffer.

Arguments:

{file} - Nth file.


load command

> save {file}

save data from current buffer to {file}.

Arguments:

{file} - Nth file.


read command

> read {variable}

Read user input and save it to {variable}.

Arguments:

{variable} - Nth variable.


cls command

> cls [ignored...]

Clear the screen.

Arguments:

[ignored...] - Ignored arguments.