Dalton Project
University of California
Dept. of Computer Science
Riverside, CA 92521
dalton@cs.ucr.edu

Frequency of Execution of the 8051 instructions

negcnt gcd int2bin cast divmul fib sort sqrt TOTAL
ACALL addr11








ADD A, Rn




8
59 67
ADD A, direct



3 35 255
293
ADD A, @ Ri








ADD A, #data




16 2 14 32
ADDC A, Rn



1

6 7
ADDC A, direct








ADDC A, @Ri








ADDC A, #data




16
1 17
AJMP addr11








ANL A, Rn

8



11 19
ANL A, direct








ANL A, @Ri








ANL A, #data






1 1
ANL direct, A








ANL direct, #data








ANL C, bit








ANL C, /bit








CJNE A, direct, rel








CJNE A, #data, rel





2 1 3
CJNE RN, #data, rel 18
8
28 36 255 7 352
CJNE @Ri, #data, rel








CLR A 1 1 10 1 2 2 14 11 42
CLR C
9 28 48
19 86 160 350
CLR bit






7 7
CPL A






2 2
CPL C








CPL bit








DA A








DEC A








DEC Rn






2 2
DEC direct








DEC @ Ri








DIV AB



2


2
DNJZ Rn, rel 127 127 163 175 127 127 137 180 1163
DNJZ direct, rel






2 2
INC A






139 139
INC Rn 9
16
24
76 3 128
INC direct




17 9
26
INC @ Ri








INC DPtr





10
10
JB rel






2 2
JBC bit, rel








JC rel
9



55 74 138
JMP @A+DTPR





1
1
JNB rel






104 104
JNC rel




55 343 23 421
JNZ rel



12

135 147
JZ rel
10 8 3

2 28 51
LCALL addr16


7 3 38 258 19 325
LJMP addr16 2 2 2 2 2 2 2 10 24
MOV A, Rn
28 16 195 17 131 367 493 1247
MOV A, direct



2 8 46 3 59
MOV A, @Ri




26 165
191
MOV A, #data

8

20 10
38
MOV Rn, A
9 17 192 9 121 388 377 1113
MOV Rn, direct 10
8 16 14 94 226 36 404
MOV Rn, #data 3 3 18 4 3 9 17 11 68
MOV direct, A
9


46 24 2 81
MOV direct, Rn 10 1 8 20 9 42 311 25 426
MOV direct, direct



2

3 5
MOV direct, @Ri








MOV direct, #data 1 1 1 5 3 3 246 15 275
MOV @Ri, A 127 127 127 127 127 137 227 127 1126
MOV @Ri, direct








MOV @Ri, #data








MOV C, bit






10 10
MOV bit, C






23 23
MOV DPtr, #data 16








MOVC A, @A+DPtr





1
1
MOVC A, @A+PC





10
10
MOVX A, @Ri








MOVX A, @DPtr








MOVX A, @Ri, A








MOVX @DPtr, A








MUL AB



3

3 6
NOP addr11








ORL A, Rn



12
1 13 26
ORL A, direct





1
1
ORL A, @Ri








ORL A, #data








ORL direct, A






25 25
ORL direct, #data








ORL C, bit








ORL C, /bit








POP direct






20 20
PUSH direct






20 20
RET



7 3 37 257 19 323
RETI









RL A





3
3
RLC A

56

45 20 154 275
RR A






50 50
RRC A


192


470 662
SETB C
9



55 4 68
SETB bit






19 19
SJMP rel 1 1 1 1 1 1 76 13 95
SUBB A, Rn
18


19 65 134 236
SUBB A, direct




64 106 3 173
SUBB A, @Ri








SUBB A, #data






3 3
SWAP A








XCH A, Rn

56
1 9 90 937 1093
XCH A, direct



1


1
XCH A, @Ri








XCHD









XRL A, Rn
10


19 10
39
XRL A, direct








XRL A, @Ri








XRL A, #data



12

2 14
XRL direct, A








XRL direct, #data









Number of Different Kinds of Instructions Executed per Program 11 17 19 16 26 30 40 54 67

Last Updated 11/23/1999

Published by NewIT Labs
NEW IT Labs