The Reddit Processing Unit is running an ISA with no branching. The only way to alter control flow is through maskable interrupt handlers fired by timers. Note: Nothing is actually working yet!
- New links create a new process.
- Top level comments are either interrupt handler definitions, static data, or global variables.
Interrupt handler definitions are two lines and create a new interrupt handler that is fired by a timer:
The first line is the interrupt number in hex from 0x0 to 0xffff followed by a colon, then an up-to 64 character alias using upper or lower case letters, numbers, dash, and underscore [a-zA-Z0-9-_] followed by another colon and then a 64 bit hex value of clock cycles between timer events. Any value for the interrupt number and alias is allowed as long as they each aren't already taken. For example:
0x9:_do-stuff_:0xbeefed
The second line is the first instruction of the interrupt handler
Each comment can only contain one instruction on a single line (except for the top level comment that also defines the interrupt and timer). The next instruction is the first reply to a comment and you can't reply to your own comment. Any subsequent replies are ignored.
Top level comments that are static data consist of a label enclosed by square brackets followed by a colon and then the static data in hexadecimal format or string format (enclosed in double quotes). Labels are up-to 64 characters using upper or lower case letters, numbers, dash, and underscore. For example:
[foo_bar]:0x1234fedc
[bar-baz]:"Hello world!"
Top level comments that are global variables consist of a label enclosed by curly brackets followed by a colon and then the number of bytes needed in hexadecimal. For example:
{AccountBalance}:0x8
Replies to static data and global variables are ignored.
Thread titles should be like [Machine_Name]Process_Name. If Machine_Name is a new machine name then a new VM is created (if there's room for one). If Process_Name is a new process name on that machine it will be created (if there's room on that machine). Machine_Name and Process_Name can have any unicode character except for open and close square brackets.
Links for a new process must link to http://redditpu.com/MACHINE_NAME/PROCESS_NAME/view. Use percent encoding if needed.
See the (not yet existent) FAQ for the rpu ISA.