1 TTL C:\pocket\asmstuff\asmstuff.cpp
3 AREA |.drectve|, DRECTVE
4 DCB "-defaultlib:coredll.lib "
5 DCB "-defaultlib:corelibc.lib "
7 EXPORT |?read_mmu@@YAHXZ| ; read_mmu
9 |$T231| DCD |?read_mmu@@YAHXZ|
12 |?read_mmu@@YAHXZ| PROC ; read_mmu
15 mrc p15, 0, r0, c2, c0, 0
19 ENDP ; |?read_mmu@@YAHXZ|, read_mmu
21 EXPORT |?IntOff@@YAXXZ| ; IntOff
23 |$T235| DCD |?IntOff@@YAXXZ|
26 |?IntOff@@YAXXZ| PROC ; IntOff
35 ENDP ; |?IntOff@@YAXXZ|, IntOff
38 EXPORT |?DRAMloader@@YAXII@Z| ; DRAMloader
40 |$T239| DCD |?DRAMloader@@YAXII@Z|
43 |?DRAMloader@@YAXII@Z| PROC ; DRAMloader
46 stmdb sp!, {r0, r1} ; stmfd
47 stmdb sp!, {r12, lr} ; stmfd
52 ldr r3, [sp, #0x10] ; 0x10 = 16
54 ldr r2, [sp, #0x14] ; 0x14 = 20
57 ldr r1, [sp] ; jump address
58 ldr r2, [sp, #4] ; machine number
61 mcr p15, 0, r0, c7, c10, 4 ;Enable access
62 mrc p15, 0, r0, c2, c0, 0
65 mrc p15, 0, r3, c1, c0, 0 ;/* disable the MMU */
66 and r3, r3, #0xfffffffe ; xscale says p needs to be 0 ???
68 mcr p15, 0, r3, c1, c0, 0 ;/* disable the MMU */
69 mrc p15, 0, r0, c2, c0, 0
72 ; Jump into do_it and the kernel
73 mov pc,r1 ; machine number is in register r2
76 ENDP ; |?DRAMloader@@YAXII@Z|, DRAMloader