Home > other >  Single-chip computer problems
Single-chip computer problems

Time:09-24

MCU assembly language instructions problem solving
MOV. A, # 28 h
MOV R0, # 20 h
MOV @ R0, A
ANL A, # 0 fh
ORL. A, # 80 h
XRL A, @ R0
Why is 28 h. finally A content?

CodePudding user response:

The
refer to the original poster weixin_44714425 response:
MCU assembly language instructions problem solving
MOV. A, # 28 h
MOV R0, # 20 h
MOV @ R0, A
ANL A, # 0 fh
ORL. A, # 80 h
XRL A, @ R0
Why is 28 h. finally A content?

I calculate A final content is A0H, 28 h how come out,

CodePudding user response:

MCU assembly language instructions problem solving
MOV A, # 28 h//A register inside A value of 0 x28
MOV R0, # 20 h//R0 registers inside a value of 0 x20
MOV @ R0, A//to assign A value R0 to address RAM unit, the former R0=0 x20 in A statement, the statement execution, RAM address 0 x28 for 20 h,
ANL A, # 0 in fh//A value and 0 x0f and calculation, keep low four, so A new value is 0 x08
ORL. A, # 80 h//A value and 0 x80 do or calculated, so A new value of 0 x88
XRL A, @ R0//A value and the value 0 x20 unit exclusive or, 0 x88 ^ 0 x28=0 xa0.

CodePudding user response:

reference 1st floor yishumei response:
Quote: refer to the original poster weixin_44714425 response:

MCU assembly language instructions problem solving
MOV. A, # 28 h
MOV R0, # 20 h
MOV @ R0, A
ANL A, # 0 fh
ORL. A, # 80 h
XRL A, @ R0
Why is 28 h. finally A content?

I calculate A final content is A0H, 28 h how come out,

I calculate is A0... And look at the answer is 28 h
Eighty percent that this is the answer wrong

CodePudding user response:

reference weixin_44714425 reply: 3/f
Quote: refer to 1st floor yishumei response:
Quote: refer to the original poster weixin_44714425 response:

MCU assembly language instructions problem solving
MOV. A, # 28 h
MOV R0, # 20 h
MOV @ R0, A
ANL A, # 0 fh
ORL. A, # 80 h
XRL A, @ R0
Why is 28 h. finally A content?

I calculate A final content is A0H, 28 h how come out,

I calculate is A0... And look at the answer is 28 h
That this eighty percent is the answer wrong



0 x88 ^ 0 x28=0 xa0.
1000=0101, 0000=0 10001000 ^ 0010 xa0
Is the answer wrong, really want to mislead people answer wrong sometimes!

CodePudding user response:

I'm sorry ah, just mistyped!
0 x88 ^ 0 x28=0 xa0.
1000=1010, 0000=0 10001000 ^ 0010 xa0
Is the answer wrong, really want to mislead people answer wrong sometimes!

CodePudding user response:

Not, has been in a data processing, and then the data stored in the first 28 h r, and finally finished processing a useless r data back, or 28, of course

CodePudding user response:

Running results is A=0 xa0, see the answer is 28 h
That is the answer wrong,

CodePudding user response:

refer to 6th floor Java6c_c6 response:
no, has been in a data processing, and then the data stored in the first 28 h r, and finally finished processing a useless r data back, of course, or 28

Pay attention to the last sentence is: the XRL A, @ R0
XRL is exclusive or, not simple chuansong
  • Related