bAdkOde

Unary-operator statements

There are five unary operators: ) or push, ( or pull, or print value, or print character representation of value, and ? or input.

) or push

Usage:
) [src]

The push operator takes the value supplied and pushes it onto the stack. The source parameter can be a number, register, or memory location.

Examples:
# push 0 onto the stack
)0

# push the value in register a onto the stack
)a

# push the value in the memory location that a 
# points to, onto the stack
)[a

( or pull

Usage:
( [src]

The pull operator pulls a value off the stack and stores it in the source parameter. The source parameter can either be a register or a memory location.

Examples:
# pull a value off the top of the stack and store it in register a
(a

# pull a value off the top of the stack and store it in the 
# location pointed to by register b
([b

or print value

Usage:
' [src]

The print value operator prints out the value supplied to it. The operand can be a number, register or memory location.

Examples:
# print the number 10
'10

# print the value in register a
'a

# print the value pointed to, by register b
'[b

or print character representation of value

The print character representation of value operator takes the source parameter and prints the character representation of the value in the source parameter.

Examples:
# print a space
"32

# print character representation of value in register a
"a

# print character representation of value pointed to by register b
"[b

? or input

Usage:
? [dest]

The input operator accepts a character of input from the user and stores it in the location specified by the destination parameter. For example, if the user entered a space, the number “32” would be stored.

Examples:
# accept a character of input and store the ASCII value of that character 
# in register a
?a

# accept a character of input and store the ASCII value of that character 
# in the memory location that register b points to
?[b