Syscall 2: Firmware, home

DriverChapter 5: Half duplex

D13DOUBLE BACK

The task

Transmit every received byte twice, back to back. A single echo is not enough.

Transmit every received byte twice, back to back. A single echo is not enough.

The board

The line card of DOUBLE BACKThe line card: registers A, 6 lines of ROM, no RAM, a 16 byte receive buffer, a stack 8 deep. It talks to the line.LINETHE FAR ENDRXTXCARDREGISTERSAROM6 LINESRAMNONERX BUFFER16 BYTESSTACK8 DEEPUNITSNONE
The line card this ticket gives you, with its registers, memory, buffers, and units. On a narrow screen, scroll the board sideways to see all of it.

Key idea

The second OUT repeats the register. It does not wait for another byte.

Hints

Each hint goes a step further than the one before. Open them one at a time.

Hint 1Show

IN A waits for a byte and stores it in A. OUT A sends the low byte of A.

Hint 2Show

Two OUT lines send the same byte twice. The card then wraps to the top and waits for the next.

Hint 3Show

IN A, OUT A, OUT A. Nothing else belongs on the card.

Solution

Reveal the Full SolutionThe complete program for DOUBLE BACK. 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
        OUT A
TICKS
23
at par
LINES
3
at par