Shader ASM

Have fun making crazy images with a simple assembly-like language.



def <number> Create a number and store it in the register.
loa <memory location> Load a memory location into the register.
set <memory location> Set a memory location to the value of the register.
jmp <#label> Jump to the label.
jeq <memory location> <#label> If the register matches the value at this memory location, jump to the label.
jlt <memory location> <#label> If the register is less than the value at this memory location, jump to the label.
add <memory location> Add the value at the memory location to the register.
sub <memory location> Subtract the value at the memory location to the register.
mul <memory location> Multiply the value at the memory location to the register.
div <memory location> Divide the value at the memory location to the register.
dis <memory location> Find the distance (absolute value of sub) of the value at the memory location and the register and store it in the register.
mod <memory location> Find the remainder of the register divided by the value at the memory location and store it in the register.
rnd Make random number between 0 and 255 and store it in the register.
out Send the pixel to the canvas.

You can use %<integer> to represent a constant memory value. Example: This represents 13: %13
The first 7 memory locations are: the register (0), red (r) (1), green (g) (2), blue (b) (3), x (x) (4), y (y) (5), time (t) (6)
Memory locations 7-15 are free. Double slashes (//) represent a comment till the next end line.
Press F6 as a shortcut to compile and run.



Num Frames:
Frame Delay: (in seconds. Try to use at least 0.02)
Quality: (lower quality is better.)

You can save the image below if you save a gif.