Home > EXAPUNKS > EXAPUNKS – Quick reference for the language used to control EXAs

EXAPUNKS – Quick reference for the language used to control EXAs

A quick reference for the language used to control EXAs.

Introduction

Here’s a quick-reference guide to the language used in EXAPUNKS to control EXAs.

Basic Commands

Command / Syntax / Usage

  • COPY  R/N R Copy the specified value to the specified register
  • ADDI R/N R/N R Adds the first two values and stores the result in the specified register
  • SUBI R/N R/N R Subtracts the second value from the first and store the result in the specified register
  • MULI R/N R/N R Multiplies the first two values and stores the result in the specified register
  • DIVI R/N R/N R Return how many times the second value fits completely into the first value, and stores it in the specified register
  • MODI R/N R/N R Returns the modulus of a division operation and stores it in the specified register
  • SWIZ R/N R/N R Modifies the given number according to a mask (Please see the section labelled “Swizzle”)
  • MARK L Create a label with the specified name
  • JUMP L Jumps to the specified label
  • TJMP L Jumps to the specified label if the T register is greater than 0
  • FJMP L Jumps to the specified label if the T register is 0
  • TEST R/N =/</> R/N | EOF | MRD Tests the specified condition, writing the result to T. Please see the “Testing” section
  • REPL L Creates a new EXA running from the specified label
  • HALT Kills the current EXA, dropping any held file
  • KILL Kills a random EXA in this host (Prefers EXAs owned by the player)
  • LINK R/N Traverses the specified link
  • HOST R Writes the current host name to the specified register
  • MODE Toggles the M register’s access mode between Local and Global
  • VOID M/F Removes the current value from the currently held file / M register
  • MAKE Create a new file, held by this EXA
  • GRAB R/N Grab the specified file
  • FILE R Write the current file name to the specified register
  • SEEK R/N Move X values in the held file, where X can be between -9999 and 9999
  • DROP Drops the currently held file
  • WIPE Deletes the currently held file
  • NOTE Note instructions do not count towards the line-count
  • NOOP Do nothing for 1 cycle

Testing

The TEST command has many uses.

All uses of TEST overwrite the T register with 1 (true) or 0 (false).

This can be used to trigger jumps to labels, with TJMP and FJMP.

You can use TEST EOF to check if the file-pointer is at the end of the current file.

You can use TEST MRD to check if there is anything available to read on the M register.

Swizzle

SWIZ allows you to modify a number.

You pass the original number (or location/register) as the first argument, a mask to apply (or the location/register containing it) to the second argument, and the register to store the result in as the third.

The mask should be a four digit number consisting of digits 0-4.

Unusual Commands

Command / Syntax / Usage

  • RAND – R/N R/N R – Only available in some challenges
  • DATA – N N N ? – Only available in REDSHIFT, this specifies a file for an EXA to begin holding
  • WAIT – Only available in REDSHIFT, this waits for the next frame render

 

Written by Jeeva

Related posts you may be interested in:

Leave a Comment