Agilla has an extensible instruction set. The basic instructions are listed below. These are the most common instructions used.
Note that Agilla has an Extended Instruction Set.
Instruction |
Short Description | Opcode | |
halt | Halt execution | 0x00 | |
addr | Push host address | 0x01 | |
aid | Push agent ID | 0x02 | |
rand | Push random number | 0x03 | |
cpush | Pushes condition onto the stack | 0x04 | |
loc | Push host location | 0x05 | |
vicinity | Checks if dist <= 2 | 0x06 | |
clear | Clear the operand stack | 0x07 | |
numnbrs | number of neighbors | 0x08 | |
randnbr | get random neighbor | 0x09 | |
wait | wait | 0x0a | |
Instruction |
Short Description | Opcode | |
inc | Increment | 0x0b | |
clearvar | Clear heap variable | 0x0c | |
inv | Invert a value | 0x0d | |
not | Boolean not | 0x0e | |
lnot | logical not | 0x0f | |
copy | Copy top of operand stack | 0x10 | |
pop | Pop top of operand stack | 0x11 | |
cpull | Pulls value from stack onto condition | 0x12 | |
sleep | Sleep | 0x13 | |
jumpc | Absolute jump condition | 0x14 | |
jumps | Absolute jump stack | 0x15 | |
putled | Actuate LEDs | 0x16 | |
smove | Strong migration | 0x17 | |
wmove | Weak migration | 0x18 | |
sclone | Strong clone | 0x19 | |
wclone | Weak clone | 0x1a | |
getvars | get a heap var, address in stack | 0x1b | |
setvars | set heap var, address in stack | 0x1c | |
getnbr | get neighbor address | 0x1d | |
cisnbr | is neighbor | 0x1e | |
sense | take a sensor reading | 0x1f | |
dec | decrement | 0x20 | |
Instruction |
Short Description | Opcode | |
dist | distance | 0x21 | |
swap | Swap top two variables | 0x22 | |
land | logical bitwise AND | 0x23 | |
lor | logical bitwise OR | 0x24 | |
and | boolean AND | 0x25 | |
or | boolean OR | 0x26 | |
mul | Multiply | 0x27 | |
div | Divide | 0x28 | |
add | Add two values | 0x29 | |
mod | Modulo | 0x2a | |
ceq | Equal | 0x2b | |
cneq | Not Equal | 0x2c | |
clt | Less than | 0x2d | |
cgt | Greater than | 0x2e | |
clte | Less than or equal | 0x2f | |
cgte | Greater than or equal | 0x30 | |
ceqtype | Tests type equality | 0x31 | |
cistype | Checks type | 0x32 | |
out | out on host tuple space | 0x33 | |
inp | inp on host tuple space | 0x34 | |
rdp | rdp on host tuple space | 0x35 | |
in | in on host tuple space | 0x36 | |
rd | rd on host tuple space | 0x37 | |
endrxn | end of reaction | 0x38 | |
rout | remote OUT | 0x39 | |
rinp | remote INP | 0x3a | |
rrdp | remote RDP | 0x3b | |
remote group out | 0x3c | ||
remote RDPG | 0x3d | ||
regrxn | register reaction | 0x3e | |
deregrxn | deregister reaction | 0x3f |
Instruction |
Short Description | Opcode | |
pushrt | push reading type | 0x40-0x47 | |
pusht | Push type | 0x48-0x4d | |
0x4e-0xe4f |
Instruction |
Short Description | Opcode | |
pushn | Push a name onto the operand stack | 0x50 | |
pushcl | Push constant long | 0x51 | |
pushloc | Push a location onto the stack | 0x52 | |
reserved (N/A) |
Reserved for supporting extended ISA | 0x53-0x5f |
Instruction |
Short Description | Opcode | |
getvar | moves a variable from the heap to the stack | 0x60 - 0x6f | |
setvar | Moves a variable from the stack to the heap | 0x70 - 0x7f |
Instruction |
Description | Opcode | |
rjumpc | conditional relative jump | 0x80 - 0x9f | |
rjump | unconditional relative jump | 0xa0 - 0xbf |
Instruction |
Description | Opcode | |
pushc | Push a constant value between 0-63 onto the stack | 0xc0 - 0xff |