### My solutions to nand2tetris Chapter 8 - Part 1

here they are..

FibonacciSeries:
```@1
D = A
@ARG
D = D + M

A = D
D = M
@R0
A = M
M = D
@R0
D = M
D = D + 1
@R0
M = D
@0
D = A

@R0
M = M - 1
A = M
D = M

@THAT
M = D

// Push Constant
@0
D = A
@R0
A = M
M = D
@R0
D = M
D = D + 1
@R0
M = D
@0
D = A
// End Push Constant

@THAT
D = M
@0
D = D + A
@THAT
M = D

@R0
M = M - 1
A = M
D = M

@THAT
A = M
M = D
@THAT
D = M
@0
D = D - A
@THAT
M = D

// Push Constant
@1
D = A
@R0
A = M
M = D
@R0
D = M
D = D + 1
@R0
M = D
@0
D = A
// End Push Constant

@THAT
D = M
@1
D = D + A
@THAT
M = D

@R0
M = M - 1
A = M
D = M

@THAT
A = M
M = D
@THAT
D = M
@1
D = D - A
@THAT
M = D

@0
D = A
@ARG
D = D + M

A = D
D = M
@R0
A = M
M = D
@R0
D = M
D = D + 1
@R0
M = D
@0
D = A

// Push Constant
@2
D = A
@R0
A = M
M = D
@R0
D = M
D = D + 1
@R0
M = D
@0
D = A
// End Push Constant

// sub
@R0
M = M - 1
@R0
A = M
D = M
@R0
M = M - 1
@R0
A = M
D = M - D
@R0
A = M
M = D
@R0
D = M
D = D + 1
@R0
M = D
@0
D = A
// End sub

@ARG
D = M
@0
D = D + A
@ARG
M = D

@R0
M = M - 1
A = M
D = M

@ARG
A = M
M = D
@ARG
D = M
@0
D = D - A
@ARG
M = D

(koray.fibo.MAIN_LOOP_START)

@0
D = A
@ARG
D = D + M

A = D
D = M
@R0
A = M
M = D
@R0
D = M
D = D + 1
@R0
M = D
@0
D = A

@R0
M = M - 1
A = M
D = M
@koray.fibo.COMPUTE_ELEMENT
D;JNE

@koray.fibo.END_PROGRAM
0;JMP

(koray.fibo.COMPUTE_ELEMENT)

@0
D = A
@THAT
D = D + M

A = D
D = M
@R0
A = M
M = D
@R0
D = M
D = D + 1
@R0
M = D
@0
D = A

@1
D = A
@THAT
D = D + M

A = D
D = M
@R0
A = M
M = D
@R0
D = M
D = D + 1
@R0
M = D
@0
D = A

@R0
M = M - 1
@R0
A = M
D = M
@R0
M = M - 1
@R0
A = M
D = D + M
@R0
A = M
M = D
@R0
D = M
D = D + 1
@R0
M = D
@0
D = A

@THAT
D = M
@2
D = D + A
@THAT
M = D

@R0
M = M - 1
A = M
D = M

@THAT
A = M
M = D
@THAT
D = M
@2
D = D - A
@THAT
M = D

@THAT
D = M
@R0
A = M
M = D
@R0
M = M + 1

// Push Constant
@1
D = A
@R0
A = M
M = D
@R0
D = M
D = D + 1
@R0
M = D
@0
D = A
// End Push Constant

@R0
M = M - 1
@R0
A = M
D = M
@R0
M = M - 1
@R0
A = M
D = D + M
@R0
A = M
M = D
@R0
D = M
D = D + 1
@R0
M = D
@0
D = A

@R0
M = M - 1
A = M
D = M

@THAT
M = D

@0
D = A
@ARG
D = D + M

A = D
D = M
@R0
A = M
M = D
@R0
D = M
D = D + 1
@R0
M = D
@0
D = A

// Push Constant
@1
D = A
@R0
A = M
M = D
@R0
D = M
D = D + 1
@R0
M = D
@0
D = A
// End Push Constant

// sub
@R0
M = M - 1
@R0
A = M
D = M
@R0
M = M - 1
@R0
A = M
D = M - D
@R0
A = M
M = D
@R0
D = M
D = D + 1
@R0
M = D
@0
D = A
// End sub

@ARG
D = M
@0
D = D + A
@ARG
M = D

@R0
M = M - 1
A = M
D = M

@ARG
A = M
M = D
@ARG
D = M
@0
D = D - A
@ARG
M = D
@koray.fibo.MAIN_LOOP_START
0;JMP
(koray.fibo.END_PROGRAM)```

BasicLoop:
```// Push Constant
@0
D = A
@R0
A = M
M = D
@R0
D = M
D = D + 1
@R0
M = D
@0
D = A
// End Push Constant

@LCL
D = M
@0
D = D + A
@LCL
M = D

@R0
M = M - 1
A = M
D = M

@LCL
A = M
M = D
@LCL
D = M
@0
D = D - A
@LCL
M = D

(koray.NULL.LOOP_START)

@0
D = A
@ARG
D = D + M

A = D
D = M
@R0
A = M
M = D
@R0
D = M
D = D + 1
@R0
M = D
@0
D = A

@0
D = A
@LCL
D = D + M
A = D
D = M

@R0
A = M
M = D
@R0
D = M
D = D + 1
@R0
M = D
@0
D = A

@R0
M = M - 1
@R0
A = M
D = M
@R0
M = M - 1
@R0
A = M
D = D + M
@R0
A = M
M = D
@R0
D = M
D = D + 1
@R0
M = D
@0
D = A

@LCL
D = M
@0
D = D + A
@LCL
M = D

@R0
M = M - 1
A = M
D = M

@LCL
A = M
M = D
@LCL
D = M
@0
D = D - A
@LCL
M = D

@0
D = A
@ARG
D = D + M

A = D
D = M
@R0
A = M
M = D
@R0
D = M
D = D + 1
@R0
M = D
@0
D = A

// Push Constant
@1
D = A
@R0
A = M
M = D
@R0
D = M
D = D + 1
@R0
M = D
@0
D = A
// End Push Constant

// sub
@R0
M = M - 1
@R0
A = M
D = M
@R0
M = M - 1
@R0
A = M
D = M - D
@R0
A = M
M = D
@R0
D = M
D = D + 1
@R0
M = D
@0
D = A
// End sub

@ARG
D = M
@0
D = D + A
@ARG
M = D

@R0
M = M - 1
A = M
D = M

@ARG
A = M
M = D
@ARG
D = M
@0
D = D - A
@ARG
M = D

@0
D = A
@ARG
D = D + M

A = D
D = M
@R0
A = M
M = D
@R0
D = M
D = D + 1
@R0
M = D
@0
D = A

@R0
M = M - 1
A = M
D = M
@koray.NULL.LOOP_START
D;JNE

@0
D = A
@LCL
D = D + M
A = D
D = M

@R0
A = M
M = D
@R0
D = M
D = D + 1
@R0
M = D
@0
D = A```