1 ; http://www.retroprogramming.com/2013/08/zx-spectrum-koch-levy-c-curve.html
13 ld de,49023 ; d = position on x axis
14 ; e = position on y axis
15 ld bc,3840 ; b = number of iterations
16 ; c = initial direction
20 ld a,6 ; check direction
28 add a,e ; adjust y position +/-1
30 ld e,a ; calculate high byte of screen pos
43 add a,d ; adjust x position +/-1
45 ld d,a ; calculate low byte of screen pos
56 ld a,7 ; calculate bit position of pixel
70 inc c ; turn 45 clockwise
73 dec c ; turn 90 anti-clockwise
77 inc c ; turn 45 clockwise