initial
[fpgammix.git] / workloads / myfib-interrupted.mms
bloba72ea201c10f4809fa5d8503a1d06d740830a378
1 * Fibonacci subroutines (exercise 1.4.1--13)
3         LOC     #1000
4 Main    PUT     rI,5
5         PUSHJ   $0,Fib
6         TRAP    0,0,0
8 Fib     CMP     $1,$0,2
9         PBN     $1,1F
10         GET     $1,rJ
11         SUB     $3,$0,1
12         PUSHJ   $2,Fib  $2=F_{n-1}
13         SUB     $4,$0,2
14         PUSHJ   $3,Fib  $3=F_{n-2}
15         ADDU    $0,$2,$3
16         PUT     rJ,$1
17 1H      POP     1,0
19         LOC     #8000000000000000
20         SET     $1,7