Show Menu
Cheatography

EXA Language Reference Cheat Sheet (DRAFT) by

EXAPUNKS language reference in a convenient format.

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Types

R
A register
N
A number between -9999 and 9999
R/N
A register or a number
L
A label defined by a MARK pseudo­-in­str­uction

Registers

X
The X register is a genera­l-p­urpose storage register and can store a number or a keyword.
T
The T register is a genera­l-p­urpose storage register and can store a number or a keyword. It is also the destin­ation for TEST instru­ctions, and is the criterion for condit­ion­aljumps (TJMP and FJMP).
F
The F register allows an EXA to read and write the contents of a held file. When an EXA grabs a file, its “file cursor” will be set to the first value in the file. Reading from the F register will read this value; Writing to the F register will overwrite this value. After reading or writing the F register, the file cursor will automa­tically advance. Writing to the end of the file will append a new value instead of overwr­iting.
M
The M register controls an EXA’s messag­e-p­assing functi­ona­lity. When an EXA writes to the M register the value will be stored in that EXA’s outgoing message slot until another EXA reads from the M register and receives the previously written value. Both numbers and keywords can be transf­erred in this way. If an EXA writes to the M register, it will pause execution until that value is read by another EXA. If an EXA reads from the M register, it will pause execution until a value is available to be read. Iftwo or more EXAs attempt to read from another EXA at the same time (or vice versa), one will succeed but which one succeeds will be unpred­ict­able. By default, an EXA can commun­icate with any other EXA in the same network. This can be restricted to EXAs in the same host by toggling the global I local setting in the EXODUS interface, or by executing a MODE instru­ction. An EXA in global mode cannot commun­icate with an EXA in local mode, even ifthey are in the same host.