2 replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/

# Labyrinth, 34 bytes

?:_2*}
@    _
)\?_1"
,    ;
!-}:{


Try it online!

Uses @Dennis@Dennis's (2a - a, 2a - b, 2a - c, 2a - d) approach.

The yellow tiles are for control flow. In this 2D programming language, the program starts at the top-left-most tile moving east to start. At junctions, the direction is determined by the sign of the top of the main stack. Blank tiles are walls.

## Green

This section saves 2a to the auxilary stack.

• ? Get the first number and push it to the top of the main stack
• : Duplicate the top of the stack
• _2 Push two to the top of the stack
• * Pop y, pop x, push x*y
• } Move the top of the main stack to the top of the auxilary stack.
• _ Push zero to the top of the stack

## Orange

This section subtracts 2a from the current number, negates the result, outputs the result, gets the next character (the delimeter), exits if EOF, outputs a newline, gets the next number.

• " Noop. If coming from the north, the top of the stack will be zero and the program will continue south. If coming from the west, the top of the stack will be one and the program will turn right (continuing south)
• ; Discard the top of the stack. As the zero or one is only used for control flow, we need to discard these
• { Move the top of the auxilary stack (2a) to the top of the main stack
• : Duplicate the top of the main stack
• } Move the top of the main stack to the top of the auxilary stack
• - Pop y, pop x, push x-y
• \ Negate the top of the stack. This and the previous three operations have the effect of-(x-2a) = 2a-x
• ! Pop the top of the stack and output it as a number
• , Push the next character (which will be the delimiter) or negative one if EOF
• ) Increment the top of the stack. If the last character is EOF, then the top of the stack will now be zero and the program will continue straight to the @ and exit. If the last character was a delimeter, then the top of the stack will be positive causing the program to turn right and continue east to the \
• \ Output a newline
• ? Get the next number
• _1 Push one to the top of the stack in order to turn right at the junction

# Labyrinth, 34 bytes

?:_2*}
@    _
)\?_1"
,    ;
!-}:{


Try it online!

Uses @Dennis's (2a - a, 2a - b, 2a - c, 2a - d) approach.

The yellow tiles are for control flow. In this 2D programming language, the program starts at the top-left-most tile moving east to start. At junctions, the direction is determined by the sign of the top of the main stack. Blank tiles are walls.

## Green

This section saves 2a to the auxilary stack.

• ? Get the first number and push it to the top of the main stack
• : Duplicate the top of the stack
• _2 Push two to the top of the stack
• * Pop y, pop x, push x*y
• } Move the top of the main stack to the top of the auxilary stack.
• _ Push zero to the top of the stack

## Orange

This section subtracts 2a from the current number, negates the result, outputs the result, gets the next character (the delimeter), exits if EOF, outputs a newline, gets the next number.

• " Noop. If coming from the north, the top of the stack will be zero and the program will continue south. If coming from the west, the top of the stack will be one and the program will turn right (continuing south)
• ; Discard the top of the stack. As the zero or one is only used for control flow, we need to discard these
• { Move the top of the auxilary stack (2a) to the top of the main stack
• : Duplicate the top of the main stack
• } Move the top of the main stack to the top of the auxilary stack
• - Pop y, pop x, push x-y
• \ Negate the top of the stack. This and the previous three operations have the effect of-(x-2a) = 2a-x
• ! Pop the top of the stack and output it as a number
• , Push the next character (which will be the delimiter) or negative one if EOF
• ) Increment the top of the stack. If the last character is EOF, then the top of the stack will now be zero and the program will continue straight to the @ and exit. If the last character was a delimeter, then the top of the stack will be positive causing the program to turn right and continue east to the \
• \ Output a newline
• ? Get the next number
• _1 Push one to the top of the stack in order to turn right at the junction

# Labyrinth, 34 bytes

?:_2*}
@    _
)\?_1"
,    ;
!-}:{


Try it online!

Uses @Dennis's (2a - a, 2a - b, 2a - c, 2a - d) approach.

The yellow tiles are for control flow. In this 2D programming language, the program starts at the top-left-most tile moving east to start. At junctions, the direction is determined by the sign of the top of the main stack. Blank tiles are walls.

## Green

This section saves 2a to the auxilary stack.

• ? Get the first number and push it to the top of the main stack
• : Duplicate the top of the stack
• _2 Push two to the top of the stack
• * Pop y, pop x, push x*y
• } Move the top of the main stack to the top of the auxilary stack.
• _ Push zero to the top of the stack

## Orange

This section subtracts 2a from the current number, negates the result, outputs the result, gets the next character (the delimeter), exits if EOF, outputs a newline, gets the next number.

• " Noop. If coming from the north, the top of the stack will be zero and the program will continue south. If coming from the west, the top of the stack will be one and the program will turn right (continuing south)
• ; Discard the top of the stack. As the zero or one is only used for control flow, we need to discard these
• { Move the top of the auxilary stack (2a) to the top of the main stack
• : Duplicate the top of the main stack
• } Move the top of the main stack to the top of the auxilary stack
• - Pop y, pop x, push x-y
• \ Negate the top of the stack. This and the previous three operations have the effect of-(x-2a) = 2a-x
• ! Pop the top of the stack and output it as a number
• , Push the next character (which will be the delimiter) or negative one if EOF
• ) Increment the top of the stack. If the last character is EOF, then the top of the stack will now be zero and the program will continue straight to the @ and exit. If the last character was a delimeter, then the top of the stack will be positive causing the program to turn right and continue east to the \
• \ Output a newline
• ? Get the next number
• _1 Push one to the top of the stack in order to turn right at the junction
1

# Labyrinth, 34 bytes

?:_2*}
@    _
)\?_1"
,    ;
!-}:{


Try it online!

Uses @Dennis's (2a - a, 2a - b, 2a - c, 2a - d) approach.

The yellow tiles are for control flow. In this 2D programming language, the program starts at the top-left-most tile moving east to start. At junctions, the direction is determined by the sign of the top of the main stack. Blank tiles are walls.

## Green

This section saves 2a to the auxilary stack.

• ? Get the first number and push it to the top of the main stack
• : Duplicate the top of the stack
• _2 Push two to the top of the stack
• * Pop y, pop x, push x*y
• } Move the top of the main stack to the top of the auxilary stack.
• _ Push zero to the top of the stack

## Orange

This section subtracts 2a from the current number, negates the result, outputs the result, gets the next character (the delimeter), exits if EOF, outputs a newline, gets the next number.

• " Noop. If coming from the north, the top of the stack will be zero and the program will continue south. If coming from the west, the top of the stack will be one and the program will turn right (continuing south)
• ; Discard the top of the stack. As the zero or one is only used for control flow, we need to discard these
• { Move the top of the auxilary stack (2a) to the top of the main stack
• : Duplicate the top of the main stack
• } Move the top of the main stack to the top of the auxilary stack
• - Pop y, pop x, push x-y
• \ Negate the top of the stack. This and the previous three operations have the effect of-(x-2a) = 2a-x
• ! Pop the top of the stack and output it as a number
• , Push the next character (which will be the delimiter) or negative one if EOF
• ) Increment the top of the stack. If the last character is EOF, then the top of the stack will now be zero and the program will continue straight to the @ and exit. If the last character was a delimeter, then the top of the stack will be positive causing the program to turn right and continue east to the \
• \ Output a newline
• ? Get the next number
• _1 Push one to the top of the stack in order to turn right at the junction