NetBytes

NetBytes is a language created by User:iconmaster in 2016.

It severely limits the available memory and program length of programs, instead requiring networking to get more complex tasks done. Only through inter-process communication could it truly be a Turing-complete language.

Model
Programs in NetBytes are composed of up to 128 commands, each command on one line. Programs execute from the top down, looping back to the beginning if necessary. Commands take the form:

[label:] cmd [arg1 arg2 ... argn]

Labels may be on their own line. Line comments start with #.

Programs are given 12 1-byte, unsigned registers. Only 5 of them are for general use; the other 7 are for special use with some commands.

The registers are:

Internally, there are two condition flags, called Z and N. This is used for conditional jumps. They are both initially cleared.

There is an internal IP mode, used to switch between IP protocols. It can be either in IPv4 mode or IPv6 mode. It is initially set to IPv4 mode.

There is an internal structure called the connection stack. It is a stack, maximally 2 items large. When a connection is made, the details are pushed onto the stack. When a connection is ended, it pops a value off. This way, you can have multiple connections, but only the most recent connection is used for sending an receiving data.

Cat
INP T0   OUT T0

Fork Cat
Creates a process that takes input. Output is displayed on the other instance.

MVI T0 1 CMP F0 T0   JPZ SERVER WFC CLIENT: INP T1   SND T1    JMP CLIENT SERVER: FRK T0   CON SERVLOOP: RCV T1   OUT T1    JMP SERVLOOP