- .DATA
+
/****************************************************************
****************************************************************/
- .align 4
-
- @ notaz
- .equiv ASM_SPC700, 1 ;@ 1 = use notaz's ASM_SPC700 core
+@ notaz
+.equiv ASM_SPC700, 1 ;@ 1 = use notaz's ASM_SPC700 core
/****************************************************************
DEFINES
reg_cpu_var .req R14
-
@ not used
@ R13 @ Pointer 32 bit on a struct.
@ R15 = pc (sic!)
-
-/*
-.equ Carry 1
-.equ Zero 2
-.equ IRQ 4
-.equ Decimal 8
-.equ IndexFlag 16
-.equ MemoryFlag 32
-.equ Overflow 64
-.equ Negative 128
-.equ Emulation 256*/
-
.equ STATUS_SHIFTER, 24
.equ MASK_EMUL, (1<<(STATUS_SHIFTER-1))
.equ MASK_SHIFTER_CARRY, (STATUS_SHIFTER+1)
/*****************************************************************/
-.macro trace_asm val
- push {r0-r5, r12, lr}
- mov r0, #\val
- bl print_asm_i
- pop {r0-r5, r12, lr}
-.endm
-
/* prepare */
.macro PREPARE_C_CALL
STMFD R13!,{R12,R14}
MOVS rscratch,rscratch
.endm
+@ START OF PROGRAM CODE
+
+.text
+
+.align 4
+
.globl asmS9xGetByte
.globl asmS9xGetWord
.globl asmS9xSetByte
/****************************************************************
GLOBAL
****************************************************************/
- .globl test_opcode
- .globl asmMainLoop
-
+.global asmMainLoop
+.type asmMainLoop, function
@ void asmMainLoop(asm_cpu_var_t *asmcpuPtr);
asmMainLoop:
LDMFD R13!,{R4-R11, LR}
BX LR
.pool
+.size asmMainLoop, asmMainLoop-.
@ void test_opcode(struct asm_cpu_var *asm_var);
test_opcode: