Syscall 2: Firmware, home

DriverChapter 6: Trees

D16GAP

The task

Transmit $A5, wait six ticks, transmit $5A, then halt.

Transmit $A5, wait six ticks, transmit $5A, then halt.

The board

The line card of GAPThe 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

WAIT counts ticks, not bytes. Six is the whole gap.

Hints

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

Hint 1Show

WAIT 6 sleeps the card for six ticks. The transmitter stays quiet while it sleeps.

Hint 2Show

OUT $A5 sends one byte. A number that starts with $ is hexadecimal.

Hint 3Show

OUT $A5, WAIT 6, OUT $5A, HALT. Without HALT the card would send the pair again.

Solution

Reveal the Full SolutionThe complete program for GAP. 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 $A5
        WAIT 6
        OUT $5A
        HALT
TICKS
9
at par
LINES
4
at par