8086 MICROPROCESSOR
Oct 22, 2014
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
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
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
ALP DEVELOPMENT TOOLS
Tools required
1. Editor
2. Assembler
3. Linker
4. Locator
5. Debugger
6. Emulator
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
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
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
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
ALP DEVELOPMENT TOOLSEMULATOR Used t o run program Mixture of hardware and software
PROGRAM DEVELOPMENT ALGORITHM
ALP DEVELOPMENT TOOLS