At some point flipping every pump by hand gets old. That is when the IC10 comes in: a small programmable chip that reads sensors, does math and switches devices – twice per second, while you are out mining ore.
The hardware
- The chip (Integrated Circuit IC10) is an item. On its own it does nothing.
- It sits in an IC housing. The housing needs power and is connected to the network with a data cable.
- The housing has six pins
d0tod5. With a screwdriver you choose which device is attached to which pin. dbis the housing itself. It has its own valueSetting, for example.
In game you write the code at a computer fitted with an IC Editor Motherboard – or comfortably here in the browser and copy it over.
What a program looks like
An IC10 program is a list of lines. Each line holds one instruction and its operands, separated by spaces. Everything after # is a comment and gets ignored.
# my first program
move r0 42 # put 42 into register r0
move is the instruction, r0 the target, 42 the value. The chip works through the lines from top to bottom – line 0 first, just like the game counts.
Case matters: move works, Move is an unknown instruction to the chip.
Hard limits
| Limit | Value |
|---|---|
| Lines per program | 128 |
| Characters in total | 4096 |
| Characters per line | 90 |
Comments and blank lines count as well. The IC10 coder here always shows those three numbers at the top.
Diagram
Exercise
Task
Write your first program: put the number 42 into register r0. One instruction is enough.
Hints
Hint 1
The instruction that copies a value is called move.
Hint 2
Target first, then the value: move target value.