summaryrefslogtreecommitdiff
path: root/fib.s68
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2012-10-29 01:18:38 -0700
committerMike Pavone <pavone@retrodev.com>2012-10-29 01:18:38 -0700
commit7c49618ca54c5178f7a3f5db21eaff3bf16e58b7 (patch)
tree2e66736eebeb6ed359296c159e6ecf23a079cd4a /fib.s68
Initial work on M68K instruction decoding
Diffstat (limited to 'fib.s68')
-rw-r--r--fib.s6821
1 files changed, 21 insertions, 0 deletions
diff --git a/fib.s68 b/fib.s68
new file mode 100644
index 0000000..1fa08d4
--- /dev/null
+++ b/fib.s68
@@ -0,0 +1,21 @@
+ lea 0, a7
+ moveq #10, d0
+ bsr fib
+ illegal
+fib:
+ cmp #2, d0
+ blt base
+ subq #1, d0
+ move.l d0, -(a7)
+ bsr fib
+ move.l (a7), d1
+ exg d0, d1
+ move.l d1, (a7)
+ subq #1, d0
+ bsr fib
+ move.l (a7)+, d1
+ add.l d1, d0
+ rts
+base:
+ moveq #1, d0
+ rts