You are on page 1of 4

Guideline Read first three chapters of A.K.Ray or first 6 chapters of D.V.

HALL Topics- Number System,Codes, Microprocessor Evolution and Types, 8086 Microprocessor Family overview is in D.V.HALL. Chapter 1-A.K.RAY have to read topics from 1.1 to 1.9,Chapter2 complete,Chapter-3 complete. From D.V.HALL chapters to read chapter 1 - complete, Chapter 2 -2.9,2.11,2.12,2.16, chapter 3,4,5,6, complete LDS/LES load data segment or load extra segment
Examples: 1) LDS SI.[BX] DS(higher byte) DS(lower byte) SI(Higher byte) SI(Lower 8 bit) 2000 BX=2000 This instructions loads the SI and DS register with the data stored at memory locations 2000,2001,2002,2003 sequentialy. 2) LES DI,[BX] ES(higher 2003

2002

2001

byte) ES(lower byte) DI(Higher byte)

2003

2002

2001 DI(Lower 8 bit) BX=2000 This instructions loads the DI and ES register with the data stored at memory locations 2000,2001,2002,2003 sequentialy. 3) LDS BX,[2000] DS(higher byte) DS(lower byte) BH(Higher byte) BL(Lower 8 bit) 4) LES BX,[2000] ES(higher byte) ES(lower byte) BH(Higher byte) BL(Lower 8 bit) 2003 2002

2001

2000

2002

2001 2000

XLAT-traslate the byte stored in AL with the help of lookup table whose base address is stored in BX register.
Example: MOV BX,2000 MOV AL,20 XLAT Effective address of 20 code in lookup table is 10*DS+BX+AL

AAA-ASCII Adjust after addition.


Rule-if lower nibble of AL>9 or AF=1 then AL=AL+6 AH=AH+1 AF=1 ` ELSE AF=0 CF=0 In both cases clear the hogh nibble of AL. CF=1

AAS- ASCII Adjust after subtraction


Rule-if lower nibble of AL>9 or AF=1 then AL=AL-6 AH=AH-1 AF=1 ` ELSE AF=0 CF=1

CF=0 In both cases clear the hogh nibble of AL.

AAM-ASCII adjust after mutification


Rule : AL=AL MOD 10 AH=AL/10

AAD ASCII Adjust before division


Rule: AL=(AH*10)+AL AH=0

DAA Decimal Adjust Accumulator


Rule: if lower nibble of AL >9 after addition or AF=1 AL=AL+06 IF upper nibble of AL (AFTER adding 06 to AL) >9 or CL=1 Then AL=AL+60

DAS Decimal Adjust after Subtraction


Rule: if lower nibble of AL >9 after addition or AF=1 AL=AL-06 IF upper nibble of AL (AFTER subtracting 06 to AL) >9 or CL=1 Then AL=AL-60

You might also like