Keil Logo

A51: INCORRECT MOV INSTRUCTIONS GENERATED


Information in this article applies to:

  • C51 Version 5.50

QUESTION

I have written the following assembly code:

TEST1 EQU 80H
TEST2 EQU 0xC0

mov a,#test2
mov a,#test1
mov a,#0x20
mov a,#040h
mov a,test1
mov a,test2

But the assembled output is:

LOC  OBJ            LINE     SOURCE

  0080                 1     TEST1 EQU 80H
  0080                 2     TEST2 EQU 0xC0
                       3
0000 7480              4     mov a,#test2
0002 7480              5     mov a,#test1
0004 7480              6     mov a,#0x20
0006 7440              7     mov a,#040h
0008 E580              8     mov a,test1
000A E580              9     mov a,test2

Test2 has been located at 80H rather than C0H. The MOV A,#test2 and MOV A,#0x20 instructions have turned into MOV A,#test1 instructions.

ANSWER

This is a confirmed bug that has been corrected in Version 5.54 of the A51 Assembler. See below to obtain the updated files.

ATTACHED FILES

Request the files attached to this knowledgebase article.

Last Reviewed: Wednesday, September 21, 2016


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.