1
votes

I am using yagarto's arm-none-eabi to compile the assembly code, but it gives the message

Error: bad instruction `a DCD 1,2,3'

When I am using the DCD instruction

Is it not legal to use? If not, how could I reserve memory spaces for data in ARM?

Thanks

2

2 Answers

5
votes

The DCD directive is for RealView's assembler. If you're using the GNU assembler, try this instead:

a: .word 1,2,3

Note that you might have to take care of alignment yourself (DCD automatically aligns the data on a word-boundary - I'm not sure that .word does that).

-4
votes

You try this way a DCD 123 In here DCD take only Integer 32 bit wise