summaryrefslogtreecommitdiff
path: root/main.asm
diff options
context:
space:
mode:
authorDuncan Smith2010-06-26 21:28:22 -0700
committerDuncan Smith2010-06-26 21:28:22 -0700
commit0248da5e2c262d6934fd48c23212d866e250b9ed (patch)
tree2d97fb322ecc063e2804ed8d7914083ec3ee60ab /main.asm
parente9b9990833bfd1de7e8ed726a686076b2fb0e512 (diff)
Rewrote loader routine in C
Diffstat (limited to 'main.asm')
-rw-r--r--main.asm35
1 files changed, 10 insertions, 25 deletions
diff --git a/main.asm b/main.asm
index d2727ea..05235f5 100644
--- a/main.asm
+++ b/main.asm
@@ -51,6 +51,7 @@
__main:
movem.l d0-d7/a0-a6,-(sp)
+ bsr init_load
bsr emu_setup
lea emu_plain_op,a5
bsr emu_run
@@ -63,27 +64,6 @@ __main:
include "alu.asm"
emu_setup:
- ;; Allocate memory pages; for now I assume this succeeds
- move.l #$4000,-(a7)
- ROM_CALL malloc
- addq #4,a7
- move.l a0,ref_0
-
- move.l #$4000,-(a7)
- ROM_CALL malloc
- addq #4,a7
- move.l a0,ref_1
-
- move.l #$4000,-(a7)
- ROM_CALL malloc
- addq #4,a7
- move.l a0,ref_2
-
- move.l #$4000,-(a7)
- ROM_CALL malloc
- addq #4,a7
- move.l a0,ref_3
-
movea emu_plain_op,a5
lea emu_run,a2
@@ -111,10 +91,15 @@ deref:
rts
deref_table:
-ref_0: dc.l 0 ; bank 0
-ref_1: dc.l 0 ; bank 1
-ref_2: dc.l 0 ; bank 2
-ref_3: dc.l 0 ; bank 3
+mem_page_0: dc.l 0 ; bank 0
+mem_page_1: dc.l 0 ; bank 1
+mem_page_2: dc.l 0 ; bank 2
+mem_page_3: dc.l 0 ; bank 3
+
+mem_page_loc_0: dc.b 0
+mem_page_loc_1: dc.b 0
+mem_page_loc_2: dc.b 0
+mem_page_loc_3: dc.b 0
;; Take a physical address in a0 and turn it into a virtual
;; address in d0