Wiki 9Minecraft Wiki 9Minecraft

Minecoprocessors Example: Pulse Extender

Guides 3FAQ 7Blocks 2Recipes 2Related mods 48
DownloadMinecoprocessors

Get the files on 9Minecraft

This program waits for a signal on the back port and then powers the front port for approximately 80 redstone ticks.

mov ports, 0010b; Configure ports
start:
cmp pb, 1; Check if Back Port is powered
jnz start; If not, loop back to start
mov pf, 1; Turn on Front Port
mov c, 40; Set counter to 40
loop:
dec c; Decrease counter
jnz loop; Loop until counter is 0
mov pf, 0; Turn off Front Port
jmp start; Return to waiting state

Explanation: The delay is longer than 40 ticks because the dec and jnz instructions each take 1 tick per iteration, totaling 2 ticks per loop cycle.