Forums - Open Redstone Engineers
BiteSized, The best Instruction set ever! - Printable Version

+- Forums - Open Redstone Engineers (https://forum.openredstone.org)
+-- Forum: ORE General (https://forum.openredstone.org/forum-39.html)
+--- Forum: Projects & Inventions (https://forum.openredstone.org/forum-19.html)
+---- Forum: Completed Projects (https://forum.openredstone.org/forum-21.html)
+---- Thread: BiteSized, The best Instruction set ever! (/thread-3220.html)



BiteSized, The best Instruction set ever! - VoltzLive - 04-22-2014

BiteSized is an IS for a stack machine. The command pops the amount of inputs and pushes the result back onto the stack.

Here are the ops :
00 - unary NAND ~
01 - Interweave #
10 - Select &
11 - Stack copy/if(a=<b) jump 3 commands forward $

NAND :
pops 1, unary nand, pushes the result
ex 1:
~00100111 = 11111001
ex 2:
~01110101 = 10011111
Interweave :
pops 2, interweave, pushes the result
ex 1:
0000 # 1111 = 01010101
ex 2:
1010 # 0110 = 10011100
Select :
pops 2, select, pushes the result
ex :
01010101
&10011100 <- zeros don't drop the digits
---------
0xx101xx or 0101

Stack copy :
pops 3, stack copy, pushes the result(s)
ex :
stack -> {1, 2, 3, 5, 6, 7}
pop 3, [1(a),2(b),3©] stack -> {5,6,7}
if (a=<b) jump 3 commands forward; else copy C to top of the stack
is 1=<2? No, Copy C to top and push back onto stack
stack -> {3,1,2,3,4,5,6,7}

I got as far as making NAND in it after like 5 minutes
which is this
init stack : A,B,10101010
#~& or 10101010 & ~(A#B)


RE: BiteSized, The best Instruction set ever! - David - 04-22-2014

wut..