Features
Controller CPU, Controller IN,Controller OUT,Controller RAM
HOWTO
WARNING, ALL INSTRUCTIONS ARE IN LOWER CASEFirst, assembly your controller
Notice, that controller can have much more units of components
It get connected by placing near
Then come near to cpu and press 'reset'
It will detect all peripherals connected
Then reopen gui and list of periphery will appear
Numbers written near peripheral name is address range (all inclusive)
Now we can write code
Notice, that controller can have much more units of components
It get connected by placing near
Then come near to cpu and press 'reset'
It will detect all peripherals connected
Then reopen gui and list of periphery will appear
Numbers written near peripheral name is address range (all inclusive)
Now we can write code
Syntax Help:
Accessors - it is address 123
- it is constant 123
- it is line 123
Code: Select all
123
Code: Select all
$123
Code: Select all
#123
Math - copy number stored at address A to B, A - address or constant(if constant just set B to A), B - address only
- add 1 to number stored at address A, A - address only
- sub 1 from number stored at address A, A - address only
- add B to A and store result at A, A - address only, B - address or constant
- subs B from A and store result at A, A - address only, B - address or constant
- multiply A by B and store result at A, A - address only, B - address or constant
- devide A by B and store result at A, A - address only, B - address or constant
- floor number at address A, and store it at address A, A - address only
- ceil number at address A, and store it at address A, A - address only
- power A by B, and store it at address A, A - address only, B - constant or address
- left shift of A by B, and store it at address A, A - address only, B - constant or address
- right shift of A by B, and store it at address A, A - address only, B - constant or address
Code: Select all
mov A B
Code: Select all
inc A
Code: Select all
dec A
Code: Select all
add A B
Code: Select all
sub A B
Code: Select all
mul A B
Code: Select all
div A B
Code: Select all
flo A
Code: Select all
cel A
Code: Select all
pow A B
Code: Select all
lsh A B
Code: Select all
rsh A B
Conditions - Sets program counter to pctr + A, like
- If number at A == 0 then jmp to B, A - address, B - address,constant,line number
- If number at A not 0 then jmp to B, A - address, B - address,constant,line number
- If number at A > 0 then jmp to B, A - address, B - address,constant,line number
- If number at A < 0 then jmp to B, A - address, B - address,constant,line number
- Full stop program with message( One word at A)
- Wait until next game tick
Try...Code: Select all
jmp A
Code: Select all
add 1 A
Code: Select all
jez A B
Code: Select all
jnz A B
Code: Select all
jgz A B
Code: Select all
jlz A B
Code: Select all
hlt A
Code: Select all
yld
I will write more detail tutorial if my idea will be intresing for you...
TODO
Also, code avalible at bitbucket https://bitbucket.org/xcodersteam/progr ... ontrollers.Write description for each block in mod
Write HOW TO
Make video
Add multiple input block
Test it all
Fix textures
Export/Import code
Write HOW TO
Make video
Add multiple input block
Test it all
Fix textures
Export/Import code