# Baklava in Unicat

Published on 28 August 2023 (Updated: 28 August 2023)

Welcome to the Baklava in Unicat page! Here, you'll find the source code for this program as well as a description of how the program works.

## Current Solution

``````# Set up characters
0o00 π»πΉπΈπππΌπΈππ Memory 0 = 0o40 (32 = ' ')
0o01 π»πΉπΉπππ½πΊππ Memory 1 = 0o52 (42 = '*')
0o02 π»πΉπΊπππΉπΊππ Memory 2 = 0o12 (10 = '\n')

# Set up constants
0o03 π»πΉπ»πππΉππ Memory 3 = 1
0o04 π»πΉπΌπππΉππΏ Memory 4 = -1

# Set up varibles
0o05 π»πΉπ½πππΉπΊππΏ Memory 5 = -0o12 (-10) (loop_counter)

# Loop start: num_spaces = absolute value of loop_counter
0o06 π»πΉπΎπππΈππ Memory 6 = 0
0o07 πΏππΈπΎπππ½ππ Memory 6 += Memory 5 (num_spaces = loop_count)
0o10 π½πΏπΎπππΉπΉππ If Memory 6 > 0, jump to 0x12 (0o11 + 1) (if num_spaces > 0)
0o11 πΏπππΎπππΌππ Memory 6 *= Memory 4 (negate num_spaces)

# num_stars = 21 - 2*num_spaces
0o12 π»πΉπΏπππΊπ½ππ Memory 7 = 0o25 (21)
0o13 πΏππΊπΏπππΎππ Memory 7 -= Memory 6 (21 - num_spaces)
0o14 πΏππΊπΏπππΎππ Memory 7 -= Memory 6 (num_stars = 21 - 2*num_spaces)

# Display spaces
0o15 π»πΉπΉππΏπΉπΏππ Jump to 0o20 (0o17 + 1) (jump to check for num_spaces > 0)
0o16 π½πΌπΈππ Output Memory 0 (' ')
0o17 πΏππΊπΎπππ»ππ Memory 6 -= Memory 3 (decrement num_spaces)
0o20 π½πΏπΎπππΉπ½ππ If Memory 6 > 0, jump to 0o16 (0o15 + 1) (if num_spaces > 0)

# Display stars
0o21 π½πΌπΉππ Output Memory 1 ('*')
0o22 πΏππΊπΏπππ»ππ Memory 7 -= Memory 3 (decrement num_stars)
0o23 π½πΏπΏπππΊπΈππ If Memory 7 > 0, jump to 0o21 (0o20 + 1)

# Output newline
0o24 π½πΌπΊππ Output Memory 2 ('\n')

# If loop_counter > 10, jump to Loop start
0o25 π»πΉπΉπΈπππΉπΊππ Memory 8 (0o10) = 10 (0o12)
0o26 πΏππΊπΉπΈπππ½ππ Memory 8 (0o10) -= Memory 5 (10 - loop_counter)
0o27 πΏππΈπ½πππ»ππ Memory 5 += Memory 3 (increment loop_counter)
0o30 π½πΏπΉπΈπππ½ππ If Memory 8 (0o10) > 0, jump to 0o06 (0o05 + 1) (if loop_counter > 10, jump to Loop start)

0o31 ππ Exit

``````

Baklava in Unicat was written by:

• rzuckerm

If you see anything you'd like to change or update, please consider contributing.

## How to Implement the Solution

No 'How to Implement the Solution' section available. Please consider contributing.

## How to Run the Solution

No 'How to Run the Solution' section available. Please consider contributing.