summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--alu.asm4
-rw-r--r--main.asm15
2 files changed, 15 insertions, 4 deletions
diff --git a/alu.asm b/alu.asm
new file mode 100644
index 0000000..cce4011
--- /dev/null
+++ b/alu.asm
@@ -0,0 +1,4 @@
+ ;; Parting out the big math/logic routines from the
+ ;; instruction dispatch table.
+
+
diff --git a/main.asm b/main.asm
index 120378d..b3f9402 100644
--- a/main.asm
+++ b/main.asm
@@ -219,6 +219,13 @@ emu_setup:
rts
+;; ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+;; _ __ ___ ___ _ __ ___ ___ _ __ _ _ |||||||||||||||||||||||||||
+;; | '_ ` _ \ / _ \ '_ ` _ \ / _ \| '__| | | | \\\\\\\\\\\\\\\\\\\\\\\\\\\
+;; | | | | | | __/ | | | | | (_) | | | |_| | |||||||||||||||||||||||||||
+;; |_| |_| |_|\___|_| |_| |_|\___/|_| \__, | ///////////////////////////
+;; of the virtual type |___/ |||||||||||||||||||||||||||
+;; =============================================JJJJJJJJJJJJJJJJJJJJJJJJJJJ
;; Take a virtual address in d1 and dereference it. Returns the
;; host address in a0. Destroys a0, d0.
@@ -240,24 +247,24 @@ ref_3: dc.l 0 ; bank 3
;; Take a physical address in a0 and turn it into a virtual
;; address in d0
- ;; Destroys
+ ;; Destroys d0
underef:
move.l a0,d0
sub.l ref_0(pc,d0),d0
bmi underef_not0
- cmpi.l #$10000,d0
+ cmpi.l #$4000,d0
bmi underef_thatsit
underef_not0:
move.l a0,d0
sub.l ref_1(pc,d0),d0
bmi underef_not1
- cmpi.l #$10000,d0
+ cmpi.l #$4000,d0
bmi underef_thatsit
underef_not1:
move.l a0,d0
sub.l ref_2(pc,d0),d0
bmi underef_not2
- cmpi.l #$10000,d0
+ cmpi.l #$4000,d0
bmi underef_thatsit
underef_not2:
move.l a0,d0