SECIAEQBNJMPDIFZR

From Esolang
Jump to navigation Jump to search

SECIAEQBNJMPDIFZR (SEt C to a If A is EQuals to B aNd JuMP to D if b is ZeRo) is a OISC by User:Esdraslov.

How to code

Printing

We need the usage of some variables like IOI (Input Output Index) to make our code better and more complete, so firstly, if SECIAEQBNJMPDIFZR just sets C to A if A is equals to B and jumps to D if B is zero, how can we even print something??? Simple, just use IOI, look at a example (SECIAEQBNJMPDIFZR cutted from it):

IOI 65 65 IOI+1

This code basically prints "A" since IOI as C is acting as output and 65 is equals to 65, and since B is not 0, IOI+1 is just ignored, but if it wasn't, it would basically continue running as normal because IOI as D is instruction index.

Memory management

Now memory addresses is very important to this OISC, you see that without memory addresses, variables is much harder to create, or even impossible!, ok, how do memory addresses works in SECIAEQBNJMPDIFZR? You can specify one by writting ?<location>, SECIAEQBNJMPDIFZR uses a 1D memory layout, ok, but how much can I store on it? Well, SECIAEQBNJMPDIFZR uses a u32 value on EVERYTHING! And so there are 4294967295 memory addresses. Now let's try it!

?5 64 64 IOI+1
IOI ?5 ?5 IOI+1

If we run this, we would get this as result:

@

Ok, now, I want to add one to this value, how do you do this? Simple, SECIAEQBNJMPDIFZR supports additions and subtractions, so we can do this:

?5 64 64 IOI+1
IOI ?5+1 65 IOI+1
END 0 0 FINISH

You see that there are two new variables: END and FINISH, well these are for exiting the program, END is basically the exit value, so we can print it default value, which is 0, FINISH is the line where the program knows it ended, this is the equivalent to -1.

Examples

This is a minsky machine:

?0 0 ?10 FINISH
?10 ?10+1 ?10+1 IOI+1
?0 0 0 IOI+1
?0 0 0 IOI-2

This is a "Hello" program:

IOI 72 72 IOI+1
IOI 101 101 IOI+1
IOI 108 108 IOI+1
IOI 108 108 IOI+1
IOI 111 111 IOI+1