Syscall 2: Firmware, home

DriverChapter 4: Stars and hubs

D1CARRIER CHECK

The task

Transmit 55 AA 55 AA, then halt.

Equipment listens for the probe pattern before it trusts a line: alternating ones and zeros let a receiver lock onto the bit timing.

Transmit the four bytes $55 $AA $55 $AA, then halt the card.

The board

The line card of CARRIER CHECKThe line card: registers A, 6 lines of ROM, no RAM, a 16 byte receive buffer, a stack 8 deep. It talks to the line.LINENO PEERRXTXCARDREGISTERSAROM6 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

OUT sends one byte. End with HALT: without it, the card wraps to the first line and sends the pattern a second time.

Hints

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

Hint 1Show

A program runs one line per tick, from the top. OUT $55 transmits the byte $55. A number that starts with $ is hexadecimal.

Hint 2Show

Four OUT lines send the pattern. After its last line the card would start again at the first, so end with HALT.

Hint 3Show

OUT $55, then OUT $AA, then OUT $55, then OUT $AA, then HALT: one instruction per line.

Solution

Reveal the Full SolutionThe complete program for CARRIER CHECK. 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.

        OUT $55
        OUT $AA
        OUT $55
        OUT $AA
        HALT
TICKS
5
at par
LINES
5
at par