why the instruction "MOV r9,#0" is understood by Keil as "MOV Rw,#data4",that is, its machine language is transfered as "E0 #n",which is only 2 bytes;yet I get the machine language "E6 RR ####" anciently,which is 4 bytes,that is,it was thought be "MOV reg,#data16" ,why? thank you! wangwei
EXPLAIN ABOVE QUESTION BUT NOT ANSWER In the "MOV" instruction serial, there 2 instructions as follow: Mnemonic Format Bytes MOV Rwn, #data4 E0 #n 2 MOV reg, #data16 E6 RR ## ## 4 In detail, Rw means Word GPR (R0, R1, …, R15); reg means SFR/ESFR or GPR. Now, I have a instruction line as follow: mov r0, #0Bh I hope the "#0Bh" is "#data16" type, but not the "#data4" type. The problem is that how I can make the KEIL understand my purpose; so, after building, KEIL give me the machine code "E6 F9 0B 00", NOT the "E0 B9". THANKS FOR ANY HELP