Created
November 5, 2015 20:56
-
-
Save gigaherz/a242455f913f4044cf78 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The Minecraft Redstone-inspired Pseudo-language | |
Registers and ports | |
-------------------- | |
R0.. R15 Redstone lines, each a 16 bit SIGNED register, but the value is shifted every instruction | |
If the top bit is 0, it shifts down, | |
If thetop bit is 1, it shifts up | |
C0..15 Cauldrons, respectively pre-filled with "(1<<n)-1" | |
Instructions | |
------------- | |
INV Rd, Rs Negates the bits from source into destination | |
SUB Rd, Rs Writes the difference between the destination and the source (Rd=Rd-Rs) | |
REP Rd[, Rs], d Writes the value from source into destination, (1<<d) instructions later (d = 1..4) | |
CMP Rd, Cs Reads the input from the "cauldron" bus and writes it into the destination | |
... need something for flow control. "pistons" to change the active instruction? maybe? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment