Sequence Reverser
Solution
Solution
@0
@1
MOV UP,DOWN
@2
@3
@4
@5
MOV UP,RIGHT
@6
MOV 0,UP
FORWARD:
MOV LEFT,ACC
MOV ACC,UP
JGZ FORWARD
MOV UP,NIL
REVERSE:
MOV UP,ACC
MOV ACC,DOWN
JGZ REVERSE
@7
@8
@9
@10
MOV UP,DOWN
@11
November 12, 2022
@0
@1
MOV UP,DOWN
@2
@3
@4
@5
MOV UP,RIGHT
@6
MOV 0,UP
FORWARD:
MOV LEFT,ACC
MOV ACC,UP
JGZ FORWARD
MOV UP,NIL
REVERSE:
MOV UP,ACC
MOV ACC,DOWN
JGZ REVERSE
@7
@8
@9
@10
MOV UP,DOWN
@11
← Previous: TIS-100 Segment : 41427
November 12, 2022