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

Some beginner questions about assembler in Mdk-arm.

1. How to write several instructions on one line? For example, 3 NOP instructions?

2. Why is the instruction not blue? uVison in .s file automatic automatically istrukcion shows blue in the following statement is blue MOV and STRT, but ANDS is black. Why?

MOV   r0, r12
STRT  r2, [r1,#16]        
ANDS  r0, #0x80

Parents Reply Children
  • even your link says AND  syntax

    AND{S}{cond} Rd, Rn, Operand2

    where: S is an optional suffix. If S is specified, the condition flags are updated on the result of the operation. If S is specified, the AND instruction Updates the N and Z flags according to the result.

    In my code I use

        ANDS  r0, #0x80
        BNE   send1   

    In other words In R0 is byte and if MSB in this byte is 1 goto send1 if 0 continue the program with the next instruction for Branch.
    The compiler translates it and does what I suppose, so it's right.
    In my humble estimate, there is a mistake in file aarm.prop.def in uVison folder . This file include definition for uVison Ediotor ARM assembler Keyword. And in section 2 simply missing ands keywords. if is added uVision displays the ANDS instruction in blue.
    the only thing that confuses me, the file is version 1.0 of 2016, nobody noticed this error in 4 years?
    Can someone more experienced check my assumptions?
    Does ARM (keil) have any error reporting channel in MDK-ARM?