D2LOOPBACK
The task
Transmit every received byte back, unchanged.
A loopback test sends bytes down the line and checks that they come back.
Transmit every byte the card receives, unchanged, as soon as it arrives.
IN waits until a byte has arrived and stores it in a register. OUT transmits the low byte of a register.
The board
Key idea
After the last line the card continues at the first, so this program needs no jump.
Hints
Each hint goes a step further than the one before. Open them one at a time.
Hint 1Show
IN A waits for the next received byte and puts it in register A.
Hint 2Show
Receive a byte, then transmit it. The card repeats the program by itself after the last line.
Hint 3Show
Two lines: IN A, then OUT A.
Solution
Reveal the Full SolutionThe complete program for LOOPBACK. Open it only when you want the answer.
The reference program
The game's own solution to this ticket. It passes every test and scores exactly par on every benchmark.
IN A
OUT A- TICKS
- 37
- at par
- LINES
- 2
- at par