29-11-2012, 04:20 PM
8051 ASSEMBLY LANGUAGE PROGRAMMING
8051 ASSEMBLY LANGUAGE PROGRAMMING.ppt (Size: 1.85 MB / Downloads: 66)
Structure of Assembly Language
Assembly language instruction includes:
a mnemonic (abbreviation easy to remember)
the commands to the CPU, telling it what those to do with those items
optionally followed by one or two operands
the data items being manipulated
A given Assembly language program is a series of statements, or lines
Assembly language instructions
Tell the CPU what to do
Directives (or pseudo-instructions)
Give directions to the assembler
List file
The lst (list) file, which is optional, is very useful to the programmer
It lists all the opcodes and addresses as well as errors that the assembler detected
The programmer uses the lst file to find the syntax errors or debug
Program counter
The program counter points to the address of the next instruction to be executed
As the CPU fetches the opcode from the program ROM, the program counter is increasing to point to the next instruction
The program counter is 16 bits wide
This means that it can access program addresses 0000 to FFH, a total of 64K bytes of code
Power up
All 8051 members start at memory address 0000 when they’re powered up
Program Counter has the value of 0000
The first opcode is burned into ROM address 0000H, since this is where the 8051 looks for the first instruction when it is booted
We achieve this by the ORG statement in the source program