This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Why cannot the cross-assembler work on this asm code?

Hi,

I am working on assembler code with arm-linux-gnueabihf-as with a third part code project. I find that the assembler has errors:

> arm-linux-gnueabihf-as test_sp0.s

test_sp0.s: Assembler messages:

test_sp0.s:1: Error: junk at end of line, first unrecognized character is `='

test_sp0.s:3: Error: bad instruction `arm'

test_sp0.s:5: Error: bad instruction `area ||.text||,CODE,READONLY,ALIGN=2'

test_sp0.s:7: Error: bad instruction `export fl_array_m_ic32'

test_sp0.s:9: Error: bad instruction `input'

test_sp0.s:10: Error: bad instruction `r0 -p_i0_left'

test_sp0.s:11: Error: bad instruction `r1 -p_i0_right'

test_sp0.s:12: Error: bad instruction `r2 -p_i1_left'

test_sp0.s:13: Error: bad instruction `r3 -p_i1_right'

test_sp0.s:14: Error: bad instruction `sp -p_ot_left'

test_sp0.s:15: Error: bad instruction `sp +4-p_ot_right'

test_sp0.s:16: Error: bad instruction `sp +8-count'

test_sp0.s:17: Error: bad instruction `sp +12-shift'

test_sp0.s:19: Error: bad instruction `return'

test_sp0.s:20: Error: bad instruction `n/A'

test_sp0.s:22: Error: bad instruction `global Variables Accessed'

test_sp0.s:23: Error: bad instruction `none'

test_sp0.s:24: Error: bad instruction `cortex_a8'

for the code:

                    ARM
                    AREA ||.text||, CODE, READONLY, ALIGN=2
                    EXPORT  fl_array_m_ic32

;   Input

;   r0 - p_i0_left
;   r1 - p_i0_right
;   r2 - p_i1_left
;   r3 - p_i1_right
;   sp - p_ot_left
;   sp + 4  - p_ot_right
;   sp + 8  - count
;   sp + 12 - shift

;

;   Return

;   N/A

;

;   Global Variables Accessed

;   None
;;;;;;;;;;;;;;;;;;;;;;;;;;;;                    IF  :DEF:CORTEX_A8

;................................................................................

fl_array_m_ic32     PROC

It is obvious that the assembler treats the comment char ';' as asm instruction. I used other compiler before, but not arm-linux-gnueabihf-as. From the asm code format, do you think what assembler can work on it? or are there some switches with arm-linux-gnueabihf-as to work on this asm code?

Thanks,

Parents Reply Children
No data