This is a JavaScript emulation of the
Minecraft Redstone Automatic Computer.
Documentation about the architecture, instruction set, assembly language and other topics:
Download (pdf, 42k).
Github Repository. Made by Roland Rytz.
Address | Mode |
---|---|
020 | Display single byte |
// write octal 123 to display
PDAI
020
// set device address
PDWI
123
// write immediate byte
// write byte from memory address
PDAI
020
// set device address
PDWM
100
// write bite at memory location 100
// write byte from accumulator
// we're going to use the result of an addition
LDAI
20.
// load decimal 20
OPRA
// write accumulator to operand register
LDAI
42.
// load decimal 42
ADDC
// perform addition
PDAI
020
// set device address
PDWA
// write addition result to display
Address | Mode |
---|---|
030 | Flip pixel at coordinates YYYY XXXX |
031 | Turn on pixel at coordinates YYYY XXXX |
032 | Turn off pixel at coordinates YYYY XXXX |
033 | Push byte to dot matrix, each byte controlling a pixel. |
034 | Fill matrix with pattern in pdout |
// Flip a pixel somewhere in the middle
PDAI
030
PDWI
#01011001
// y = 5, x = 9
// Turn on and then off the bottom left pixel
pdai
031
pdwi
#11110000
// y = 15, x = 0
pdai
032
pdwi
#11110000
// Fill in some pixels, starting from the top
pdai
033
pdwi
#10001000
pdwi
#10001000
pdwi
#11001100
pdwi
#11001100
pdwi
#10101010
pdwi
#10101010
pdwi
#11111111
pdwi
#11111111
// Mode 033 is useful for displaying entire images
// Blank screen
pdai
034
pdwi
#00000000
Address | Mode |
---|---|
040 | Set or replace character right of caret |
041 | Set or replace character at caret |
042 | Clear and reset |
// Write "Foo" at cursor
pdai
040
pdwi
'F'
pdwi
'o'
pdwi
'p'
pdwi
127.
//127 is backspace
pdwi
'o'
// Clear and reset
pdai
042
pdwi
000
// Could be any value
// Blinking cursor animation
pdai
041
$loop:
pdwi
' '
nope
// for timing, because jmpi takes one tick
pdwi
'_'
jmpi
$loop