Professional Documents
Culture Documents
8051 Registers
8051 Registers
If youve worked with any other assembly languages you will be familiar with the concept of an Accumulator register. The Accumulator, as its name suggests, is used as a general register to accumulate the results of a large number of instructions. It can hold an 8-bit ( -byte! value and is the most versatile register the 8"# has due to the shear number of instructions that make use of the accumulator. $ore than half of the 8"# s %## instructions manipulate or use the accumulator in some way. &or e'ample, if you want to add the number " and %", the resulting (" will be stored in the Accumulator. )nce you have a value in the Accumulator you may continue processing the value or you may store it in another register or in memory.
This order of operation is important. ;hen the 8"# is initiali=ed 19 will be initiali=ed to ",h. If you immediately push a value onto the stack, the value will be stored in Internal +A$ address "8h. This makes sense taking into account what was mentioned two paragraphs above. &irst the 8"# will increment the value of 19 (from ",h to "8h! and then will store the pushed value at that memory address ("8h!. 19 is modified directly by the 8"# by si' instructions. 941@, 9)9, A<A55, 5<A55, +AT, and +ATI. It is also used intrinsically whenever an interrupt is triggered (more on interrupts later. 6ont worry about them for nowB!.