8086 Microprocessor

12
8086 MICROPROCESSOR

Transcript of 8086 Microprocessor

Page 1: 8086 Microprocessor

8086 MICROPROCESSOR

Page 2: 8086 Microprocessor

WRITING PROGRAMS FOR USE

WITH AN ASSEMBLERDATA_HERE SEGMENT

MULTIPLICAND DW 204AH

MULTIPLIER DW 382AHPRODUCT DW 2 DUP (0)

DATA_HERE ENDS

CODE_HERE SEGMENT

ASSUME CS:CODE_HERE, DS:DATA_HERE

START MOV AX, DATA_HERE

MOV DS, AX

MOV AX, MULTIPICAND

MUL MULTIPLIER

MOV PRODUCT, AX

MOV PRODUCT+2, DX

INT 3

CODE_HERE ENDS

END START

Page 3: 8086 Microprocessor

WRITING PROGRAMS FOR USE WITH AN ASSEMBLER

SEGMENT and ENDS Directives Naming data and addresses-Equ, DB, DW, DD

DirectivesConstants VariablesAddress

Types of numbers used in data statementBinaryDecimalHexadecimalBCDASCII

Page 4: 8086 Microprocessor

WRITING PROGRAMS FOR USE WITH AN ASSEMBLER

Accessing named data in program instructionEX: MOV AX,MULTIPLICAND

Naming addresses – Labels ASSUME Directive Initializing Segment registers End Directive

Page 5: 8086 Microprocessor

ALP DEVELOPMENT TOOLS

Tools required

1. Editor

2. Assembler

3. Linker

4. Locator

5. Debugger

6. Emulator

Page 6: 8086 Microprocessor

ALP DEVELOPMENT TOOLSEDITOR Allows to create a file containing assembly

programEx: PC Write, WordStar

It will save program in RAM as it is typed It backups the file before correcting errors The file can be save on any drive

(floppy/CD/hard drive) Program should be well formatted Assembly program should be saved as .ASM file

Page 7: 8086 Microprocessor

ALP DEVELOPMENT TOOLSASSEMBLER Translates the assembly language mnemonics to

binary codes Displacements of named data items offset of labels

are determined in 1st run On 2nd run it produce the binary code Produce object file (.OBJ) & assembler list file(.LST) Errors are put in list file It generates only offset address and not physical

address Linker or Locator will determine physical address

Page 8: 8086 Microprocessor

ALP DEVELOPMENT TOOLSLINKER Used to combine several .obj files into one large

object file Programs are split into modules Link file contains the binary code of all combined

modules Also produce the link map file which contains the

address information Assign only relative address(address starting with

zero) TASM & MASM produce the linker file with .exe

extension

Page 9: 8086 Microprocessor

ALP DEVELOPMENT TOOLSLOCATOR Is used to assign absolute address

DEBUGGER Can be used to run the program if external

hardware are not used Will load the object file to memory for debugging It allow you to see the content of registers and

memory location Allows to change the content of register and

memory location Will allow to set a breakpoint

Page 10: 8086 Microprocessor

ALP DEVELOPMENT TOOLSEMULATOR Used t o run program Mixture of hardware and software

PROGRAM DEVELOPMENT ALGORITHM

Page 11: 8086 Microprocessor

ALP DEVELOPMENT TOOLS

Page 12: 8086 Microprocessor