Chapter 4 - Topics Microprocessor Engineering Chapter 4...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Hong Kong Institute of Vocational Education Microprocessor Engineering Page 1 Chapter 4 8051 Microcontroller Software Programming Model Microprocessor Engineering Hong Kong Institute of Vocational Education Microprocessor Engineering Page 2 Topics 1. Introduction to Assembly Language 2. 8051 Addressing Modes 3. 8051 Instruction Set 4. Introduction to Assembler Directives 6. Writing Assembly Language Programs Hong Kong Institute of Vocational Education Microprocessor Engineering Page 3 Introduction to Assembly Language Hong Kong Institute of Vocational Education Microprocessor Engineering Page 4 Format of Assembly Language Statement Machine language is very difficult for human to use and memorise. => use Symbols A symbol used to represent an instruction is called a mnemonic Programming language using mnemonics is called Assembly Language . Assembler Machine Language Assembly Language Hong Kong Institute of Vocational Education Microprocessor Engineering Page 5 Format of Assembly Instruction An instruction is a command executed by the processor. A program is a sequence of instructions. The collection of all instructions that a computer / microprocessor recognises is known as its Instruction Set . A program will consist of a set of instructions, all of which belong to the instruction set. Machine code (or machine language) Instructions expressed in terms of binary numbers are machine language or machine code. For better readability, machine code and other data are usually written in hexadecimal instead of a long sequences of 1s and 0s. Hong Kong Institute of Vocational Education Microprocessor Engineering Page 6 General Instruction Format Format of Machine Instruction / Machine Code Operation Code (Opcode) indicate the operation of the computer has to perform. The opcode for 8051 consist of 8-bit long, thus allowing up to 256 instructions. OP CODE OPERAND . . . . OPERAND General Instruction Format
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Hong Kong Institute of Vocational Education Microprocessor Engineering Page 7 General Instruction Format Operands Indicate the data needed by the computer in order to carry out the operation specified by the opcode. Operands may reside in memory or within the processor itself (in one of the internal registers). Example 24 09 (Assembly Instruction: ADD A, #9H) 24H : Opcode --- add a number to the content of the accumulator 09H: Datum to add The content of A is overwritten after the instruction is executed. 09H is source operand and A (the operand that holds the result of operation) is called the destination operand . Hong Kong Institute of Vocational Education
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/21/2011 for the course ELEC 101 taught by Professor Ck during the Spring '11 term at American InterContinental University Houston.

Page1 / 24

Chapter 4 - Topics Microprocessor Engineering Chapter 4...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online