Skip to content

Control Flow

Control flow commands are used to control the flow of the program. All control flow commands use the prefix.

Label

Labels are used to mark locations which can be jumped to from elsewhere in the program. In Nospace, labels are defined by an identifier which consists of a sequence of and terminated by a .

Syntax

CommandUnobsfucated
Nospace‍​​ZWJ, ZWSP, ZWSP
Whitespace Newline, Space, Space
NossemblyLabel-

Parameters

The Label command requires a unique identifier consisting of a sequence of and terminated by a .

Stack parameters

The Label command takes no stack parameters.

Example

‍​​​​‍

Call

The Call command calls a subroutine. Control is given to the provided label and is returned when the Return command is executed from within the invoked subroutine.

Syntax

CommandUnobsfucated
Nospace‍​‌ZWJ, ZWSP, ZWNJ
Whitespace Newline, Space, Tab
NossemblyCall-

Parameters

The Call command must be passed the label to invoke.

Stack parameters

The Call command takes no stack parameters.

Example

‍​‌​​‍

Jump

The Jump command unconditionally jumps to a label.

Syntax

CommandUnobsfucated
Nospace‍​‍ZWJ, ZWSP, ZWJ
Whitespace Newline, Space, Newline
NossemblyJump-

Parameters

The Jump command must be passed the label to jump to.

Stack parameters

The Jump command takes no stack parameters.

Example

‍​‍​​‍

JumpZero

The JumpZero conditionally jumps to the specified label if the top item of the stack is 0. The top item of the stack is discarded as part of the command.

Syntax

CommandUnobsfucated
Nospace‍‌​ZWJ, ZWNJ, ZWSP
Whitespace Newline, Tab, Space
NossemblyJumpZero-

Parameters

The JumpZero command must be passed the label to conditionally jump to.

Stack parameters

  • Int - the value to evaluate

Example

‍‌​​​‍

JumpNegative

The JumpNegative conditionally jumps to the specified label if the top item of the stack is less than 0. The top item of the stack is discarded as part of the command.

Syntax

CommandUnobsfucated
Nospace‍‌‌ZWJ, ZWNJ, ZWNJ
Whitespace Newline, Tab, Tab
NossemblyJumpNegative-

Parameters

The JumpNegative command must be passed the label to conditionally jump to.

Stack parameters

  • Int - the value to evaluate

Example

‍‌‌​​‍

Return

The Return command transfers control from a subroutine back to the caller. If the Return command is invoked outside of a subroutine, it ends the execution of the program.

Syntax

CommandUnobsfucated
Nospace‍‌‍ZWJ, ZWNJ, ZWJ
Whitespace Newline, Tab, Newline
NossemblyReturn-

Parameters

The Return command takes no parameters.

Stack parameters

The Return command takes no stack parameters.

Example

‍‌‍

End

The End command ends the execution of the program.

Syntax

CommandUnobsfucated
Nospace‍‍‍ZWJ, ZWJ, ZWJ
Whitespace Newline, Newline, Newline
NossemblyEnd-

Parameters

The End command takes no parameters.

Stack parameters

The End command takes no stack parameters.

Example

‍‍‍