31 lines
579 B
Plaintext
31 lines
579 B
Plaintext
fib:
|
|
ADDI64 r254, r254, -40d
|
|
ST r31, r254, 0a, 40h
|
|
LI64 r1, 1d
|
|
LI64 r32, 2d
|
|
JGTU r2, r32, :0
|
|
JMP :1
|
|
0: CP r33, r2
|
|
ADDI64 r2, r33, -1d
|
|
CP r34, r33
|
|
JAL r31, r0, :fib
|
|
CP r2, r34
|
|
CP r35, r1
|
|
ADDI64 r2, r2, -2d
|
|
JAL r31, r0, :fib
|
|
ADD64 r1, r1, r35
|
|
1: LD r31, r254, 0a, 40h
|
|
ADDI64 r254, r254, 40d
|
|
JALA r0, r31, 0a
|
|
main:
|
|
ADDI64 r254, r254, -8d
|
|
ST r31, r254, 0a, 8h
|
|
LI64 r2, 10d
|
|
JAL r31, r0, :fib
|
|
LD r31, r254, 0a, 8h
|
|
ADDI64 r254, r254, 8d
|
|
JALA r0, r31, 0a
|
|
code size: 225
|
|
ret: 55
|
|
status: Ok(())
|