Free Hero Mesh

Update of "Program instructions"
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.
Overview

Artifact ID: f08c71cd078592373cf34339db6ad00daac347b3
Page Name:Program instructions
Date: 2018-04-07 20:10:27
Original User: zzo38
Next 518554159fe770dca69116a0ddbdfae73c6f86dd
Content

(Note: This may change as the program is being written and it is currently a draft.)

In some places in a .class file, program instructions can be used. This includes in any global message block, class message block, SUBS block, Goal block, or global function definition.

The heading includes the instruction name (if in parentheses, it takes other stuff inside of the same block with parentheses; there may be brackets afterward if some other name or number is a part of it), followed by the stack effect (given in a notation like Forth).

Some headings include , and/or = after the stack diagram if it supports those prefixes optionally. In this case, , means a variable of another object (taken on the stack below the value, if writing), while = means to write instead of read (the value to write is taken below another argument if any, but above the object if any).

You can also use numbers as instructions (that push their value to the stack), either in decimal or in hexadecimal (with 0x at first), and an optional minus sign is allowed at first for negative decimal numbers.

%[] ( -- value ) =

Read a user variable of this object. All user variables are initialized to zero and can store any value. You do not need to declare them first.

bit[] ( -- n )

A constant with exactly one bit set; replace [] with a number 0 to 31.

(bit) ( -- n)