From 7c49618ca54c5178f7a3f5db21eaff3bf16e58b7 Mon Sep 17 00:00:00 2001 From: Mike Pavone Date: Mon, 29 Oct 2012 01:18:38 -0700 Subject: Initial work on M68K instruction decoding --- fib.s68 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 fib.s68 (limited to 'fib.s68') 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 -- cgit v1.2.3