Hello,
I am trying to implement this assembler routine, but I get several errors. Please help
ARM Macro Assembler, Version 12.20.9409
Copyright (C) Microsoft Corporation 1984-2001
c:\vce\bin\test.asm(26) : error A0051: unknown opcode: jmp
jmp r12 ; jump to the function pointer in r12
c:\vce\bin\test.asm(23) warning : A0005: improper line syntax: +
ldr r0, [r12]+ ; load argument 0 from the argument pointer and increment the arg pointer by 4
c:\vce\bin\test.asm(25) : error A0008: ARM register expected: {
ldmia {r12}, sp! ; load the function pointer from the stack, into r12
I am trying to implement this assembler routine, but I get several errors. Please help
- Code:
mov r0, r12 ; preserve r0, the argument pointer, into scratch register r12
stmdb sp!, {r1} ; preserve r1, the function pointer, onto the stack
ldr r0, [r12]+ ; load argument 0 from the argument pointer and increment the arg pointer by 4
ldr r1, [r12] ; load argument 1 from the argument pointer
ldmia {r12}, sp! ; load the function pointer from the stack, into r12
jmp r12 ; jump to the function pointer in r12
ARM Macro Assembler, Version 12.20.9409
Copyright (C) Microsoft Corporation 1984-2001
c:\vce\bin\test.asm(26) : error A0051: unknown opcode: jmp
jmp r12 ; jump to the function pointer in r12
c:\vce\bin\test.asm(23) warning : A0005: improper line syntax: +
ldr r0, [r12]+ ; load argument 0 from the argument pointer and increment the arg pointer by 4
c:\vce\bin\test.asm(25) : error A0008: ARM register expected: {
ldmia {r12}, sp! ; load the function pointer from the stack, into r12