31 lines
693 B
ArmAsm
31 lines
693 B
ArmAsm
|
|
/*
|
|
int julia(int32_t cr, int32_t ci, uint32_t t_squared, int steps, int32_t zr, int32_t zi);
|
|
(Pour moi : t_squared = (2 * 2) << 16, steps = 50)
|
|
Si renvoie 0 -> dans la fractale
|
|
Sinon renvoie un nombre entre 1...steps indiquant la "distance" (pour le dégradé)
|
|
*/
|
|
|
|
.global _julia
|
|
.text
|
|
|
|
/* Iteration of z = z²+c with threshold checks
|
|
@r4 Real part of c, cr
|
|
@r5 Imaginary part of c, ci
|
|
@r6 Squared threshold t²
|
|
@r7 Number of steps
|
|
If c is in the set, returns 0. Otherwise, returns the remaining number of
|
|
iterations to be checked before the process finised. */
|
|
|
|
_julia:
|
|
mov.l r8, @-r15
|
|
mov.l r9, @-r15
|
|
mov.l r10, @-r15
|
|
mov.l r11, @-r15
|
|
|
|
.loop:
|
|
|
|
.end:
|
|
|
|
rts
|
|
nop |