Questions tagged [armasm]

armasm is the assembler for ARM processors

Details: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0473m/dom1361289850039.html

23 questions
2
votes
1 answer

How to compile ARM assembly in ARM syntax with Clang?

It seems that by default Clang assumes GNU assembler syntax. How to compile with Clang an assembly file using ARM syntax as this (directives) and this (instructions)?
Serge Rogatch
  • 13,865
  • 7
  • 86
  • 158
2
votes
1 answer

Error: A1163E Unknown Opcode R0, expecting opcode or Macro with instruction in the left column

Today I've been getting this error in my code stating: RTE\Device\STM32F407VGTx\startup_stm32f407xx.s(191): A1163E: Unknown opcode R0, expecting opcode or macro Here is the area of code where it stops at: I have not performed any assembly in the…
Andrew T
  • 783
  • 4
  • 11
  • 20
1
vote
0 answers

What exactly does this dot mean in ARM assembly?

This is my ARM assembly code: AREA MyData, DATA V SPACE 4 N EQU . I've noticed the next memory address, after the block reserved by SPACE, is stored in N thanks to EQU and the dot. However, I haven't found any information about what exactly that…
Andres
  • 23
  • 3
1
vote
0 answers

Correcting the Linker Flags for CMake

I am trying to convert an embedded gcc arm- project to use ARMClang instead of GCC. My focus was to use CMake to automate the task of generating the make files, but I could not figure out why I can not enforce the linker flags and I always get…
Sina S.
  • 31
  • 3
1
vote
0 answers

assemblercode generated by gcc results in fatal error when assembled by ARM-assembler

I found out that the ARM-compiler armcc V5.05 does not compile uint64_t correctly into assembly code. It uses only one register instead of two so the result is truncated to 32 bits (though the compiler is not complaining). As a workaround I used…
1
vote
1 answer

How to use TBB instruction (Cortex-M3) with gnu assembler?

Section 3.10.4 of the Arm generic user guide (page 172) gives an example for using TBB, but the example uses Arm assembler. I would like to learn how to use TBB with gas, but can't seem to figure out how. How should I revise the example from the…
user50420
  • 39
  • 1
  • 6
1
vote
1 answer

NEON SSUBL instruction has wrong result? 127-220 = 0x00a3(should be 0xffa3)

I have a problem when using ssubl instruction in A64 instruction set. I just want to subtract a constant value from an 8-byte SIMD vector. As the result might include a negative number, I use ssubl to extend the data range and do the signed…
drinking
  • 53
  • 6
1
vote
3 answers

How to reach indexed values in an array on a Cortex-M3 with assembly?

On the Cortex-M3 I wanted to set the first two values of the array to 0 and 1, so I did the following: main MOV R4, #0 array DCD 4,7,6,8 LDR R1, =array ; R1 = base address of array STR R4, [R1, R4, LSL #2] ADD R4, R4,…
JohnnyFromBF
  • 9,873
  • 10
  • 45
  • 59
0
votes
0 answers

32-bit ARM ASM code supposed to print the sum of three integers, instead will print a very low negative number

Disclaimer: I am very new to 32-bit ARM ASM code and this is my first program. When I try to run this program, the sum of the three integer values will be output wrong, however, the display of the three inputs is correctly printed, so I believe I am…
BeefCake
  • 3
  • 2
0
votes
1 answer

Loading values to array in data segment with assembly

I have a function that receives a number from 0 to 10 as an input in R0. Then I need to place the multiplication table from 1 to 10 into an array in the data segment and place the address of the result array in R1. I have a loop to make the…
0
votes
0 answers

ARM assembly: What is the difference between DCD and .word?

Here is an explanation of DCD: https://developer.arm.com/documentation/dui0473/m/directives-reference/dcd-and-dcdu To me the usage seems very similar with .word. What is the difference between these two?
user394334
  • 243
  • 1
  • 10
0
votes
1 answer

Debug the special purpose CONTROL register in STM32H7

I am using STM32H7, I find in assembly a special-purpose register called "CONTROL", which I assume it is 3 bits long according to this doc. MSR CONTROL, r4 After debugging and the ARMv7m documentation, I think "CONTROL" register is just a…
Hamdim
  • 19
  • 6
0
votes
1 answer

Is there armasm on mac?

I just started to learn ARM assembly and I know that there are mainly two toolchains to assemble ARM assembly, armasm and gnu. I am not able to use KEIL/IAR since I am using mac. Is there anyway I can add the armasm assembler to some IDEs on mac? I…
0
votes
0 answers

ARM Assembly Syntax Highlighting in Github Gists

I am trying to create a Gist with appropriate highlighting for ARM (Arm7TDMI thumb) assembly code, but all of the assembly file extensions I have tried either lead to incorrect syntax highlighting or no highlighting at all. What is the proper…
0
votes
0 answers

Unalias command in ARMv7?

I am programming the Stellaris LM3S9B92 Evalbot in assembly language (from what I gather, ARMv7 or a variety of it). I use aliases a lot, as I find they make my code more readable. Typically, to signal that my register r2 contains a waiting value,…
kotchwane
  • 2,082
  • 1
  • 19
  • 24
1
2