Sunteți pe pagina 1din 68

GITAM UINVERSITY HYD.

CAMPUS

ESA 86/88E Monitor commands


THEORY:

The Monitor commands in both Serial and Stand alone mode are

similar and the following discussion holds good for trainer operation in either mode.
Theses commands are summarized in the following .
In individual command descriptions , the following notation is used
[V]

Indicates that V is optional

[V]*

Indicates one or more optional occurrences of V

<V>

Indicates that V is a parameter to be entered by the user.

,/-

Indicates that either of the two characters is to be entered.

Note:- These are used to clarify the command formats and they are neither to be
entered by the user nor output by the system
1. A 2. C 3. D 4. F 5. G 6. I 7. L 8. M 9. N 10. O 11. P 12. R 13. S 14. T 15. W 16. X 17. Z -

Assembler Command
Compare Memory Command
Display Memory Command
Fill Memory Command
Go Command
Input Port Command
Labels Display Command
Move Memory Command
Single step Command
Output Port Command
Programmer Command
Read Hex File Command
Substitute Memory Command
Tape Write Command
Write Hex File Command
Register Command
Disassembler Command

1. Assembler
Command

: Assembler Command (A)

Syntax

: A [address]<CR>

1
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

Summary

: Invokes resident symbolic one line Assembler which will supports

all standard mnemonics addressing modes of Intel 8086/8088

Processors.

2. Compare Memory Command


Command

: Compare Memory Command (C)

Syntax

: C <Start address1> <End address1 >,<Start address 2> <End

address 2> <CR>


Summary

: Compares a block of memory with another block.

Argument

: Specifies the source range of memory to be compared.


Starting address of destination block used in comparison.

3. Display Memory Command


Command

: Display Memory (D)

Syntax

: D/DW <Start address> [, <End address >] <CR>

Summary

: Displays the memory contents in range as bytes or words.

Argument

: Specifies the range of memory to be displayed as bytes/words.

4. Fill Memory Command


Command

: Fill memory (F)

Syntax

: F/FW<Start address> , <End address >,<Byte Value> <CR>

Summary

: Fills a block of memory with byte or word data.

Argument

: <address >Specifies the range of memory to be filled.


<Byte Value> Value to be filled in memory.

5. Go Command
Command

: Go Command (G)

Syntax

: G <CR> [<Start address>[ , <Break Point address >]] <CR>

Summary

: Transfer the control to user program with optional breakpoints.

Argument

: <address> Begins execute from the address. If address is not given


execution starts from current CS:IP.
<break point> An address at which the execution breaks.

6. Help Command
Command

: Help (H)
2

ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

Syntax

: H [<command mnemonic>] <CR>

Summary

: Displays a brief Syntax of all the commands.

7.Input Port Command


Command

: Input Port Command (I)

Syntax

: I/IW<port addr> <CR> [,]*<CR>

Summary

: Input a byte or word from a specified port.

Argument

: <port add> Reads a byte/word from specified port addr and displays

8. Label Command
Command

: Label command (L)

Syntax

: LL<CR> / LC <CR>

Summary

: LL - Lists all labels defined in the Symbol table.


LC - Clears all previously defined labels from the Symbol table.

9. Move Memory Command


Command

: Move Memory Command (M)

Syntax

: M <Start address> , <End address >,<Destination address> <CR>

Summary

: Copies all the values in one block of memory directly to another

block of
memory of the same size.
Argument

: <addr>

Specifies the range of memory to be moved.

<dst addr> Starting address of destination block.


10. Single step Command
Command

: Single step Command (N)

Syntax

: N <CR> [<Start address> , ],[,/<new address> *<CR>

Summary

: Execute Single instruction of the program from current CS:IP or

address,
Tracing into CALL instructions.
Argument

: <address> Specifies the address of the instruction to be executed.


3

ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

11. Outport Command


Command

: Outport Command (O)

Syntax

: O <port addr> <CR> [<data>/,] *<CR>

Summary

: Outputs the data byte/word to specified port.

Argument

: <port addr> Specifies the address of port to which data is to be

written.
<data> Hex data value to be written to the specified port.
12. R - Read Hex File Command
This command is used to read content of EPROM when EPROM programmer
interface to 8086 Trainer Board
13. Programmer Command
Command

: Programmer Command (P)

Syntax

: P<CR>

Summary

: Invokes the EPROM programmer sub-menu which contains

EPROM
Reading, Programming, Blank checking, Verifying commands.
14. Substitute Memory Command
Command

: Substitute Memory Command (S)

Syntax

: S/ SW[< address>]<CR> [ ,/][<new data>] ,]*< CR>

Summary

: Examine/Modify the contents of memory location as a byte/word.

Argument

: <address> Address of the memory location to be

examined/modified.
<data> New data (byte/word)
15.T - Tape Write Command

4
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

This command is used to write into EPROM when EPROM programmer interface to
8086 Trainer Board

16.Disassembler Command
Command

Disassembler Command (Z)

Syntax

Z [<Start address> [ , <End address >]] <CR>

Summary

Shows unassembled instructions.

Argument

<add res> Shows unassembled instruction starting from address.


<range> Shows unassembled instructions with in the range.

17. Register Command


Command

: Register Command (X)

Syntax

: X [<register> <CR> [new data>,]]<CR>

Summary

: Shows or changes the contents of CPU registers

Argument

: <register> Changes the contents of the given register. If omitted,


displays the values of all registers and flags.

5
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

MONITOR ROUTINES(8086 P)
I
1

MONITOR ROUTINES DEPENDENT ON OPERATING MODE


Name of the routine:
OUT_CHAR
Function:
Outputs an ASCII stored in AL register
character to the

console in Serial mode or

to LCD in stand alone mode


Calling address:
FE00:0000
2

Name of the routine:


Function:

OUT_STRING
Outputs a string of ASCII characters stored in

memory. The

string is indexed by ES:AX where ES is

the segment value

and AX is the offset

address of the starting location of the

string
Calling address:

FE00:0013

Name of the routine:


Function:

OUT_CRLF
Output a carriage return and line feed (ASCII

code =0AH ,
Calling address:

0DH)
FE00:0031

Name of the routine:


Function:

OUT_BLANK
Output a blank character (ASCII code = 20H)

to the LCD
Calling address:

or console
FE00:0049

Name of the routine:


Function:

OUT_BYTE
Outputs a byte in AL register to the LCD or to

console
Calling address:
Name of the routine:
Function:

FE00:0052
OUT_WORD
Outputs a word value in store in AX register to

the LCD or

to the console
6

ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

Calling address:
Name of the routine:
Function:
format to the

FE00:006A
OUT_ADDR
Outputs an address value in Segment: Offset
LCD or to the console. The

segment value to be displayed

is stored in

ES register and the offset in BX register


Calling address:
FE00:0082
Name of the routine:
GET_CHAR
Function:
Reads an ASCII character from the keyboard
and sores its
Calling address:
Name of the routine:
Function:

Hex equivalent in AL register


FE00:00A9
GET_CHAR_E
Reads an ASCII character from the keyboard

and display

the character on the LCD or

console depending on the

operating

mode.

The Hex equivalent is stored in AL


register
Calling address:
FE00:00B8
10 Name of the routine:
GET_BYTE
Function:
Read a byte value from the keyboard and stores
it in AL
Calling address:

register
FE00:00C7

11 Name of the routine:


Function:

GET_WORD
Reads a word value entered form the keyboard

and stores it
Calling address:

in AX
FE00:00E0

12 Name of the routine:


Function:

GET_ADDR
Reads an address value form the keyboard in
Segment: Offset format. The

segment value entered is

stored

in

ES

register while the offset is stored in BX


register. If no segment value is entered, the current CS
Calling address:
13 Name of the routine:
Function:

register value will be stored in ES register.


FE00:00F3
GET_STRINGS
Reads a string of ASCII character from the
keyboard and
7

ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

stores their HEX equivalent in memory indexed


by DS:SI. The current content of DS register is
the segment value and that of Si register is the
offset value of the starting location of the string
being stored. The string is terminated by <CR>
FE00:010E
VALID_HEX
This routine checks if the value stored in AH

Calling address:
14 Name of the routine:
Function:
register is a

valid ASCII Hex value (30-

39/41-46). Stores FFH in AL

register if found

valid , and 00if found in valid.


Calling address:
FE00:0123
15 Name of the routine:
HEX_ASCII
Function:
This routine converts a valid ASCII Hex
value( 30-39/41-

46) stored in AH register

to its equivalent character (0-9/A-

F) and

stores the result in AL register . Note that the routine


will not convert any other values and that the previous
Example:
will be
Calling address:
16 Name of the routine:
Function:

contents of AL register are destroyed.


41H will be converted to 0AH : Similarly 33H
converted to 03H
FE00:0131
ASCII_SEX
This routine converts a valid Hex Character (0-

9/A-F)

stored in AH register to its equivalent

ASCII Hex value (

30-39/41-46) and stores

the result in AL register. Note that

the routine

will not convert any other values and that the


previous contents of AL register are destroyed
Example:
0AH will be converted to 41H; similarly 03H
will be
Calling address:
17 Name of the routine:
Function:

converted to 33H
FE00:0152
BCD_BIN
This routine converts a valid BCD value (up to

99) stored

in AH register to its equivalent


8

ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

binary value in AL register .

Note that the previous

contents of AL register are destroyed


Calling address:
FE00:016B
18 Name of the routine:
Function:

BIN_BCD
This routine unpacks a 8- bit binary number to

three

unpacked BCD digits and stores them in

3 consecutive

locations indexed by DS:SI after

the conversion, DS:SI will


significant byte (digit)
Example:

point

to

the

least

FFH Stored in AL register will be unpacked into

unpacked BCD digits 2,5 and 5

and will be stored at

location 0:3000H,3001H

and 3002H respectively

(assuming

DS=0 and SI=3000H) . If the number is less


than 100(64H) , then the most significant digit is taken to
be 0 for e.g. 63H(decimal= 99) will be unpacked as 0,9 and 9

Calling address:
FE00:018B
II
MONITOR ROUTINES INDEPENDENT ON OPERATING MODE
1 Name of the routine:
SER_SEND_STRING
Function:
Outputs a string of ASCII characters stored in
memory to

the console. The string is indexed

by ES:SI where is the

segment value and SI is

the offset address of the starting

location of

the string. The string is terminated by 00H


Calling address:
FE00:01AF
Name of the routine:
LCD_SEND_STRING
Function:
Outputs a string of ASCII characters stored in
memory to

the LCD . The String is indexed

by ES:SI where ES is the

segment value and

SI is the offset address of the starting


location of the string. The string is terminated by 00H
Calling address:
FE00:01CE
3

Name of the routine:


Function:

CLR_LCD
Clears the LCD interfaced with the trainer in

either mode of

operation
9

ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

Calling address:

FE00:01ED

Name of the routine:


Function:

PRINT_STRING
Prints a string of ASCII characters in memory

when a

parallel printer is interfaced with

the trainer. The string is

indexed by DS:SI

where DS is the segment value and SI is

the

offset address of the starting location of the string. The


string is terminated by 00H . Note that this routine is used
for direct output to the printer regardless of
whether the
switch.
Calling address:

printer driver is enabled by DIP


FE00:01F3

PROCEDURE FOR EXECUTE PROGRAMS IN 8086 TRAINER BOARD


A) PROCEDURE FOR NON INTERFACING PROGRAM:10
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

1. Enable assembler by using assembler command (A )as listed in Monitor


Commands
2. Type the program to be executed
3. Reset the 8086 trainer board
4. Execute the program by using go command (G )as listed in Monitor
Commands
5. See the result by using monitor commands as listed in Monitor Commands
6. Reset the 8086 trainer to enter another program
B) PROCEDURE FOR INTERFACING PROGRAM:1. Enter the program
2. Set the jumper of interfacing kit as given in circuit description
3. Connect the interfacing board to 8086 trainer board by suing flat ribbon cable
( J7 of 8086 to J1 of interfacing kit,J8& J10 of 8086 to J3 &J4 of Study card
kit )
4. Execute the program
5. Verify the Result
6. Reset the 8086 trainer board

TRANSFER A BLOCK OF DATA


AIM:-Write a assembly language program in 8086 to transfer a Block of data
(i)

With overlapping

(ii) Without
11

ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

overlapping

GITAM UINVERSITY HYD.CAMPUS

APPARATUS:-

1. 8086 Trainer kit


2. Personal computer

FLOW CHART:- ( with overlapping)


Start

Initialize pointer 1 to Source

Initialize pointer 2 to Destination

Initialize Count

Transfer data from source to destination update count

NO
If Count = 0

Yes
Stop

PROGRAM:- ( with overlapping)


Address
2000
2003

Opcode
BE 06 30
BB OC 30

Label

Mnemonic
MOV
MOV
12

ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

Operand
SI,3006
BX,300C

Comments
Initialize a pointer 1 to source
Initialize a pointer 2 to destination

GITAM UINVERSITY HYD.CAMPUS

2006

B9 04 00

MOV

CX,0004

2009

8B 04

MOV

AX,[SI]

200B
200D
2011
2015
2016

89 07
81 EE 02 00
81 EB 02 00
49
75 F1

MOV
SUB
SUB
DEC
JNZ

[BX],AX
SI,0002
BX,0002
CX
L1

2018

CC

INT

03

L1

Initialize count
Transfer a word from source to
destination with overlapping
Update source and destination
pointers
Continue above process till count
=0
Transfer control to monitor
programs

RESULT:-

INPUT:-

3000 1111

OUTPUT:- 3000 1111

3002 2222

3002 2222
3004 3333

3004 - 3333

Start

3006-4444

3006- 1111
3008 - 2222
Initialize pointer 1 to Source

300A 3333
300C - 4444

Initialize pointer 2 to Destination

Initialize Count

Transfer data from source to destination update count

FLOW CHART:- ( without overlapping)


If Count = 0
13
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL
Stop

GITAM UINVERSITY HYD.CAMPUS

NO

Yes

`
PROGRAM:- ( without overlapping)
Address
2000
2003

Opcode
BE 00 30
BB 00 40

Label

Mnemonic
MOV
MOV
14

ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

Operand
SI,3000
BX,4000

Comments
Initialize a pointer 1 to source
Initialize a pointer 2 to

GITAM UINVERSITY HYD.CAMPUS

2006
2009
200B

B9 04 00
8B 04
89 07

MOV
MOV
MOV

CX,0004
AX,[SI]
[BX],AX

200D
2011

81 C6 02 00
81 C3 02 00

ADD
ADD

SI,0002
BX,0002

2015
2016

49
75 F1

DEC
JNZ

CX
L1

2018

CC

INT

03

L1

destination
Initialize count
Transfer a word from source
to destination
Update source and destination
pointers
Continue above process till
count = 0
Transfer control to monitor
programs

RESULT:INPUT:-

3000 1111

OUTPUT:- 4000 1111

3002 2222

4002 2222
3004 3333

4004 - 3333
3006-4444

4006 - 4444

HIGHEST COMMON FACTOR


AIM:- To write a program to find Highest Common Factor (HCF) using 8086 P
APPARATUS:1) 8086 P Kit
15
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

2) Personal Computer
FLOW CHART:START
Get the two numbers and compare them

Is first no. > second no.

Exchange the two numbers

Is result =0

Display HCF
Is carry = 1
STOP

Again exchange the two numbers

PROGRAM:-

16
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

ORG

3000

N1 DW 0010
N2 DW 0005

G1 DW 0000
Address Hex code Label
2000
8B 06 00 30
2004
8B 1E 02 30
2008
3B C3
L1
200A
74 13
200C
200E
2011

Mnemonic

Operand

MOV
MOV

AX,@N1
BX,@N2

CMP
JE

AX,BX
L3

JC
MOV
DIV

L2
DX,0000
BX

72 0E
L4
F7 F3

2013
2017
2019
201B

81 FA 00 00
74 09
8B C3
8B DA

201D
201F
2020
2022
2026

EB F5
93
EB F1
89 1E 04 30
CC

L2
L3

CMP
JE
MOV
MOV

DX,0000
L3
AX,BX
BX,DX

JMP
XCHG
JMP
MOV
INT

L1
BX,AX
L4
@G1,BX
03

Comments
Get number 1
Get number 2
If number 1 = number 2 jump to
L3
If number1<number 2 jump to L2
Divide big number by small
number
If remainder = 0 jump to L3
Else remainder = divisor and
divisor = dividend
Jump to L1
Swap the numbers
Unconditional jump to label L4
Save the result
Transfer control to monitor
programs

RESULT:
INPUT:

OUTPUT:

.D3000,3003

.D3004,3005

3000:10 00 05 00

3004: 01 00

LOWEST COMMON MULTIPLIER

AIM:- To write a program to find Least Common Multiplier (LCM) using 8086 P
APPARATUS:1) 8086 P Kit
2) Personal Computer
17
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

FLOW CHART:START

Get the two number1, NUMBER 2 ,


NUMBER 1= DIVISOR Number2 = dividend, N=1

N * dividend
divisor

YES

If reminder

N0

=0

LCM = N* dividend
N= N + 1
STOP

Program:-

18
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

ORG

3000

N1 DW 0010
N2 DW 0005

L1 DW 0000
Address
2000
2004
2008
200A
200D
200F
2013

Hex code
8B 06 00 30
8B 1E 02 30
8B C8
BA 00 00
F7 F3
81 FA 00 00
74 0A

2015
2019
201B
201D

8B 06 00 30
03 C1
8B C8
EB EB

Label

Mnemonic

Operand

MOV
MOV

AX,@N1
BX,@N2

MOV
MOV
DIV
CMP
JE

CX,AX
DX,0000
BX
DX,0000
L2

LN

MOV
ADD
MOV
JMP

Comments
Get number1
Get number2
Save Number 1
Divide number1 by number2

If remainder = 0 jump to L2
AX,@N1
AX,CX
Else multiply number 1 with
CX,AX
iteration count and save
L1
Repeat above division process

201F
2023

89 0E 04 30
CC

L2

MOV
INT

@LN,CX
03

unconditionally
Save the result
Transfer control to monitor
programs

RESULT:
INPUT:

OUTPUT:

.D3000,3003

.D3004,3005

3000:09 00 03 00

3004: 09 00

FIBONACCI SERIES
AIM:- To write a program to find FIBONACCI using 8086 P
APPARATUS:1) 8086 P Kit
19
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

2) Personal Computer
FLOW CHART:-

START

Initialize memory pointer initialize count

Get first word = 0001


Get second word = ---1

Result= first + second

Update memory pointer first = second second = first

NO
Update count

YES
If count = 0 carry = 1

STOP

PROGRAM:ORG

7000

N1 DW 0010
20
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

Address
6000
6003

Hex code
BD 00 50
8B 0E 00

6007
600A
600D
6010

70
B8 01 00
89 46 00
BB 01 00
81 C5 02

6014
6017
6019

00
89 5E 00
03 C3
81 C5 02

601D
6020
6022
6024
6026
6027

Label Mnemonic

Comments
Initialize a pointer
Get the count

MOV

BP,5000
CX,@N1

MOV

AX,0001

MOV
MOV
ADD

[BP],AX
BX,0001
BP,02

Get first number of the series


Save the first number of series
Get the second number of series
Update pointer

MOV
ADD
ADD

[BP],BX
AX,BX
BP,02

Save the second number of series


Next = first+second
Update pointer

00
89 46 00
8B D0
8B C3
8B DA
49
75 EE

MOV
MOV
MOV
MOV
DEC
JNZ

[BP],AX
DX,AX
AX,BX
BX,DX
CX
L1

CC

INT

03

6029

MOV

Operand

L1

Second = first and next = second


Repeat the above process until
count = 0
Transfer control to monitor
programs

RESULT:
INPUT:
7000:10 00

OUTPUT: .D5000,5010
5000:0001 0001 0002 0003 0005 0008 000D

0015 0022

MULTIPLICATION OF TWO 16 BITS


AIM:-Write a assembly language program in 8086 to find multiplication of two 16
bit numbers
APPARATUS:-

1. 8086 Trainer kit


2. Personal computer
21

ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

FLOW CHART:Start

Initialize pointer

Get Operand 1 & Operand 2

Multiply Operand 1 & Operand 2

Update pointer Save the result

Stop

PROGRAM:Address
2000
2003
2005

Opcode
BB 0040
8B 0F
81 C3 02

2009
200B

00
8B 07
F7 E1

Label

Mnemonic
MOV
MOV
ADD

Operand
BX,4000
CX,[BX]

MOV
MUL

AX,[BX]
CX
22

ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

BX,0002

Comments
Initialize pointer
Get a operand 1 from memory
Update pointer
Get a operand 2 from memory
Multiply the operands

GITAM UINVERSITY HYD.CAMPUS

200D

81 C3 02

ADD

2011
2013

00
89 07
81 C3 02

MOV
ADD

[BX],AX

2017
2019

00
89 17
CC

MOV
INT

[BX],DX

BX,0002
Save the result in memory

BX,0002

INT 03

Transfer control to monitor


programs

RESULT:INPUT:-

4000 1124

OUTPUT:- AX/4004 CD10

4002 1124

DX/4006 0125

Start

Initialize counter = 00

8- BIT UP AND DOWN HEXADECIMAL COUNTER


Call Display Count

AIM:-Write a assembly language program in 8086 to 8- bit up and down hexadecimal


counter
APPARATUS:-

Call Delay rountine

1. 8086 Trainer kit


2. Personal computer
Up data count

FLOW CHART:- (up counter)


Is count = FF
23
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

Stop

GITAM UINVERSITY HYD.CAMPUS

No

Yes

PROGRAM:- (up counter)


Address
2000
2002
2007
200A
200F
2011
2016
2019

Opcode
B0 00
9A 52 00 00 FE
E8 19 00
9A 49 00 00 FE
FE C0
9A 52 00 00 FE
E8 0A 00
9A 49 00 00 FE

201E
2020

3C FF
75 ED

Label

L1

Mnemonic
MOV
CALLS
CALL
CALLS
INC
CALLS
CALL
CALLS

Operand
AL,00
OUT_BYTE
DELAY
OUT_BLANK
AL
OUT_BYTE
DELAY
OUT_BLANK

CMP
JNZ

AL,0FF
L1

24
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

Comments
Initialize counter = 0
Display the count
Delay to see the count
To provide a blank character
Increment count
Display the count
Delay to see the count
To provide a blank character
`
Repeat the above process till
the count = FF

GITAM UINVERSITY HYD.CAMPUS

2022

CC

2023
2026
2028
202A
202C
202D

B9 FF 0F
8B C0
8B DB
8B CO
49
75 F7

202F

DELAY
L2

C3

INT

03

MOV
MOV
MOV
MOV
DEC
JNZ

CX,00FFF
AX,AX
BX,BX
AX,AX
CX
L2

RET

RESULT:INPUT:-

COUNT 00 - FF

OUT PUT :- 01 02 03 04 05 06 07 0A 0B ..FF

start
FLOW CHART:- (Down counter)
Initialize counter = FF

Call Display Count

Call Delay rountine

Up data count

Is count = 00
25
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

Stop

Transfer control to monitor


programs
Initialize count
6T delay where T = 1/F
F= 6.144 MHz
2T delay/ decrement count
Repeat above delay till cx=
0000
End of subroutine

GITAM UINVERSITY HYD.CAMPUS

NO
YES

PROGRAM:- (down counter)


Address
2000
2002
2007
200A
200F
2011
2016
2019

Opcode
B0 00
9A 52 00 00 FE
E8 19 00
9A 49 00 00 FE
FE C0
9A 52 00 00 FE
E8 0A 00
9A 49 00 00 FE

201E
2020
2022
2023
2026

Mnemonic
MOV
CALLS
CALL
CALLS
DEC
CALLS
CALL
CALLS

Operand
AL,FF
OUT_BYTE
DELAY
OUT_BLANK
AL
OUT_BYTE
DELAY
OUT_BLANK

3C FF
75 ED

CMP
JNZ

AL,00
L1

CC

INT

INT 03

B9 FF 0F
8B C0

Label

L1

DELAY
L2

MOV
MOV
26

ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

CX,00FFF
AX,AX

Comments
Initialize counter = FF
Display the count
Delay to see the count
To provide a blank character
Decrement count
Display the count
Delay to see the count
To provide a blank character
`
Repeat the above process
till the count = 00
Transfer control to monitor
programs
Initialize count
6T delay where T = 1/F

GITAM UINVERSITY HYD.CAMPUS

2028
202A
202C
202D
202F

8B DB
8B CO
49
75 F7

MOV
MOV
DEC
JNZ

C3

BX,BX
AX,AX
CX
L2

F= 6.144 MHz
2T delay/ decrement count
Repeat above delay till cx=
0000
End of subroutine

RET

RESULT:INPUT:-

COUNT FF- 00

OUT PUT :- FF FD FC FB FA F9 00

16- BIT UP AND DOWN HEXADECIMAL COUNTER


AIM:-Write a assembly language program in 8086 to 16- bit up and down
hexadecimal counter
APPARATUS:-

1. 8086 Trainer kit

2. Personal computer
start
FLOW CHART:- (up counter)
Initialize counter = 0000

Call Display Count

Call Delay rountine

Up data count

Is count = FFFF

NO
27
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

Stop

GITAM UINVERSITY HYD.CAMPUS

YES

PROGRAM:- (up counter)


Address
2000
2003
2008
200B

Opcode
B8 00 00
9A 6A 00 00 FE
E8 19 00
9A 49 00 00 FE

Label

Operand
AX,0000
OUT_WORD
DELAY
OUT_BLAN

Comments
Initialize counter = 0000
Display the count
Delay to see the count
To provide a blank character

INC
CALLS
CALL
CALLS

K
INC AX
OUT_WORD
DELAY
OUT_BLAN

Increment count
Display the count
Delay to see the count
To provide a blank character

2010
2011
2016
2019

40
9A 6A 00 00 FE
E8 0B 00
9A 49 00 00 FE

201E
2021

3D FF FF
75 ED

CMP
JNZ

K
AX,0FFFF
L1

2023

CC

INT

03

2024
2027
2029
202B
202D
202E

B9 FF 0F
8B C0
8B DB
8B CO
49
75 F7

2030

C3

L1

Mnemonic
MOV
CALLS
CALL
CALLS

DELAY
L2

MOV
MOV
MOV
MOV
DEC
JNZ
RET
28

ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

CX,00FFF
AX,AX
BX,BX
AX,AX
CX
L2

`
Repeat the above process
till the count = FFFF
Transfer control to monitor
programs
Initialize count
6T delay where T = 1/F
F= 6.144 MHz
2T delay/ decrement count
Repeat above delay till CX=
0000
End of subroutine

GITAM UINVERSITY HYD.CAMPUS

RESULT:INPUT:-

COUNT 0000-FFFF

OUT PUT :- 0001 0002 0003 0004 0005 0006 0007 000A 000B ..FFFF

FLOW CHART:- (Down counter)

start

Initialize counter = FFFF

Call Display Count

Call Delay rountine

Up data count

YES
Is count = 0000

Stop

29
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

NO

GITAM UINVERSITY HYD.CAMPUS

PROGRAM:- (down counter)


Address
2000
2003
2008
200B
2010
2011
2016

Opcode
B8 FF FF
9A 6A 00 00 FE
E8 19 00
9A 49 00 00 FE
48
9A 6A 00 00 FE
E8 0B 00

2019

Label

L1

9A 49 00 00 FE

Mnemonic
MOV
CALLS
CALL
CALLS

Operand
AX,FFFF
OUT_WORD
DELAY
OUT_BLAN

Comments
Initialize counter = FFFF
Display the count
Delay to see the count
To provide a blank character

DEC
CALLS
CALL

K
AX
OUT_WORD
CALL

Decrement count
Display the count
Delay to see the count

CALLS

DELAY
OUT_BLAN

To provide a blank character

201E
2021

3D 00 00
75 ED

CMP
JNZ

K
AX,0000
L1

2023

CC

INT

03

2024
2027
2029
202B
202D
202E
2030

B9 FF 0F
8B C0
8B DB
8B CO
49
75 F7

DELAY
L2

C3

MOV
MOV
MOV
MOV
DEC
JNZ
RET

RESULT:INPUT:-

COUNT FFFF- 0000


30

ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

CX,00FFF
AX,AX
BX,BX
AX,AX
CX
L2
RET

Repeat the above process


till the count = 0000
Transfer control to monitor
programs
Initialize count
6T delay where T = 1/F
F= 6.144 MHz
2T delay/ decrement count
Repeat above delay till cx=
0000
End of subroutine

GITAM UINVERSITY HYD.CAMPUS

OUT PUT :- FFFF FFFE FFFD FFFC FFFB FFFA FFF9 0000
8- BIT UP AND DOWN DECIMAL COUNTER
AIM:-Write a assembly language program in 8086 to 8- Bit Up And Down Decimal
Counter
APPARATUS:-

1. 8086 Trainer kit


2. Personal computer

FLOW CHART:- (Up counter)

start

Initialize counter =00

Call Display Count

Call Delay rountine

Up data count

Is count = 99

Stop

31
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

PROGRAM:- (up counter)


Address
2000
2002
2007
200A

Opcode
B0 00
9A 52 00 00 FE
E8 1A 00
9A 49 00 00 FE

Label

Mnemonic
MOV
CALLS
CALL
CALLS

200F
2011

04 01
27

L1

2012
2017
201A

9A 52 00 00 FE
E8 0A 00
9A 49 00 00 FE

201F
2021

3C 99
75 EC

CMP
JNE

AL,99
L1

2023

CC

INT

03

till count = 99
Transfer control to monitor

2024

B9 FF 0F

MOV

CX,00FFF

programs
Initialize count

2027
2029
202B
202D
202E

8B C0
8B DB
8B C0
49
75 F7

MOV
MOV
MOV
DEC
JNZ

AX,AX
BX,BX
AX,AX
CX
L2

2030

C3

ADD
DAA
CALLS
CALL
CALLS

DELA
Y
L2

Operand
AL,00
OUT_BYTE
DELAY
OUT_BLANK
AL,01
OUT_BYTE
DELAY
OUT_BLANK

RET

RESULT:INPUT:-

COUNT 00- 99

OUT PUT :- 01 02 03 04 05 06 07 08 09 10 11 12 13 99

32
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

Comments
Initialize count = 00
Display count
Delay to see count
With blank
Increment the count and
decimal adjust the count
Display count
Delay to see count
With blank
Repeat the above process

6T delay where T = 1/F


F= 6.144 MHz
2T delay/ decrement count
Repeat above delay till cx=
0000
End of subroutine

GITAM UINVERSITY HYD.CAMPUS

FLOW CHART:- (Up counter)

start

Initialize counter = 99

Call Display Count

Call Delay rountine

Up data count

Is count = 00

Stop

PROGRAM:- (down counter)


33
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

Address
2000
2002
2007
200A

Opcode
B0 00
9A 52 00 00 FE
E8 1A 00
9A 49 00 00 FE

Label

200F
2011

04 01
27

L1

2012
2017
201A

9A 52 00 00 FE
E8 0A 00
9A 49 00 00 FE

201F
2021

3C 99
75 EC

CMP
JNE

AL,00
L1

2023

CC

INT

03

2024
2027
2029
202B
202D
202E

B9 FF 0F
8B C0
8B DB
8B C0
49
75 F7

2030

C3

Mnemonic
MOV
CALLS
CALL
CALLS
SUB
DAS
CALLS
CALL
CALLS

DELAY
L2

MOV
MOV
MOV
MOV
DEC
JNZ

Operand
AL,99
OUT_BYTE
DELAY
OUT_BLANK
AL,01
OUT_BYTE
DELAY
OUT_BLANK

CX,00FFF
AX,AX
BX,BX
AX,AX
CX
L2

RET

Comments
Initialize count = 00
Display count
Delay to see count
With blank
De crement the count and
decimal adjust the count
Display count
Delay to see count
With blank
Repeat the above process till
count = 99
Transfer control to monitor
programs
Initialize count
6T delay where T = 1/F
F= 6.144 MHz
2T delay/ decrement count
Repeat above delay till CX=
0000
End of subroutine

RESULT:INPUT:-

COUNT 99

OUT PUT :- 99 98 97 96 95 94 93 .01

COUNTER HEXADECIMAL CLOCK


AIM:-Write a assembly language program in 8086 to Counter Hexadecimal Clock
Counter
APPARATUS:-

1. 8086 Trainer kit


34

ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

2. Personal computer

PROGRAM:Address

Opcode

Label

Mnemonic

Operand

Comments

RESULT:INPUT:OUTPUT:-

8255 STUDY CARD

CIRCUIT DESCRIPTION :-

The interface has 4 Dip switches mentioned as

SW1, SW2, SW3 and SW4.The 8255A port A and Port B can be configured in
software as output by using the control word and keeping the switches SW1 and
SW3 in output position and switches SW2 and SW4 will have no effect. Configure
8255A port A as input in software while keeping SW1 in I/P position. After executing
35
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

the program it reads the status of SW2 position. Similarly for port B , configure 8255
A port B as input in software while keeping SW3 in I/P position. After executing the
program it reads the status of SW4 position. 8 RED LEDs are provided to read the
status of PortA and 8 GREEN LEDs are provided to read the status of port B and
YELLOW LEDs are provided to read the signal status mentioned on the interface.
Switches S1 , S2 and S3 are provided to simulate STB* or ACK* signals
in Mode1 and in Mode 2. Provision is made for connecting buffered external
interrupt (RST 7.5 etc.) to J5 and keeping the jumper JP2 at PC0 or PC3 depending on
the type of Mode. The interface has got 4 connectors named as J2 , J3,J4 and P1 . J3
and J4 are reserved for MPS 85-2 trainer and P1 is reserved for ESA 85 -2 trainer. All
the 24 I/) lines are brought out to the J2 connector. But port C lines are used as
handshake signals so user cannot use those lines. ( Only port A and port B lines are
available to user)

8255 A Programes
1. AIM:- To Configure 8255 A Port A and Port B as a output and verify its function
using 8255 interfacing kit
APPARATUS:-

1. 8086 Trainer kit


36

ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

2. 8255 study card interfacings kit


3. Personal computer
PROGRAM:Address

Opcode

2000
2003
2005
2006
2008
200B
200C
200F
2011
2014
2015
2018

BA C6 FF
B0 80
EE
B0 55
BA C0 FF
EE
E8 0B 00
F6 D0
BA C2 FF
EE
E8 02 00
EB EE

Label

Mnemonic
MOV
MOV
OUT
MOV
MOV
OUT
CALL
NOT
MOV
OUT
CALL
JMP

Operand
DX,0FFC6
AL,80
DX,AL
AL,55
DX,0FFC0
DX,AL
DELAY
AL
DX,0FFC2
DX,AL
DELAY
2008

Comments
Initialize 8255 ports as output
Out put data at Port A
Delay to see Port A content
Invert the data and output this value
at Port B
Introduce Delay and repeat above
process

DELAY

201A
B9 FF FF
MOV
CX,0FFFF
201D
8B C0
L2
MOV
AX,AX
201F
8B DB
MOV
BX,BX
2021
8B C0
MOV
AX,AX
2023
49
DEC
CX
2024
75 F7
JNZ
L2
2026
RET
RESULT:- Port A- 55 , after delay Port B AA

Delay Program

After delay Port A - AA , after delay Port B - 55 continuous for ever


2. AIM:- To Configure 8255 A Port A as a output, Port B as a input and verify its
function reading port B and complement send it to port A using 8255 Study card
APPARATUS:-

1. 8086 Trainer kit


2. 8255 study card interfacings kit
3. Personal computer

PROGRAM:Address

Opcode

2000

BA C6 FF

Label

Mnemonic

Operand

MOV

DX,0FFC6
37

ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

Comments

GITAM UINVERSITY HYD.CAMPUS

2003
2005
2006
2009

B0 82
EE
BA C2 FF
EC

200A
200C
200F
2010

F6 D0
BA C0 FF
EE
EB F4

L1

MOV
OUT
MOV
IN

AL,82
DX,AL
DX,0FFC2
AL,DX

NOT
MOV
OUT
JMP

AL
DX,0FFC0
DX,AL
L1

Initialize 8255 Port A as Output

Port B as input
Invert the data
Invert data as output at Port A
Repeat the above process

RESULT:- :- Reads data from Port B and displays complement of it at Port


A( LEDS)

3. AIM:- To Configure 8255A Port A as a input, Port B as a output and verify its
function by
reading port A and complement send it to port B using 8255 Study card
APPARATUS:-

1. 8086 Trainer kit


2. 8255 study card interfacings kit
3. Personal computer

PROGRAM:-

38
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

Address

Opcode

2000
2003
2005

BA C6 FF
B0 90
EE

2006
2009
200A
200C
200F
2010

BA C0 FF
EC
F6 D0
BA C2 FF
EE
EB F4

Label

L1

Mnemonic

Operand

MOV
MOV
OUT

DX,0FFC6
AL,90
DX,AL

MOV
IN
NOT
MOV
OUT
JMP

DX,0FFC0
AL,DX
AL
DX,0FFC2
DX,AL
L1

Comments
Initialize 8255 Port B as output,
Port A as input
Read value from Port A
Invert the data
Invert data as Output at Port B
Repeat the above Process

RESULT:- :- Reads data from Port A and displays complement of it at Port B


( LEDS)

4. AIM:- To Configure 8255A Port A as input in mode -1 , Port B as a out put in


Mode 0 and
verify its function by reading port A and send it to port B using 8255 Study card
APPARATUS:-

1. 8086 Trainer kit


2. 8255 study card interfacings kit
3. Personal computer

PROGRAM:-

39
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

Address

Opcode

Label

2000
2002
2005

B0 B0
BA C6 FF
EE

2006
2009
200A
200D

BA C0 FF
EC
BA C2 FF
EE

200E

EB F6

L1

Mnemonic

Operand

Comments

MOV
MOV
OUT

AL,B0
DX,0FFC6
DX,AL

Initialize 8255 Port A in

MOV
IN
MOV
OUT

DX,0FFC0
AL,DX
DX,0FFC2
DX,AL

JMP

L1

Mode -1as input


Port B in Mode -0 as output
Read Value from Port A
Read value send to port B as
output
Repeat the above process

RESULT:- :- Reads data from Port A and displays same in port B when S2 is pressed
Ex: - Port A 55, Port B -55

5. AIM:- To Configure 8255A Port A as output in mode -0 , Port B as a input in


Mode 1 and verify its function by reading port B and send it to port A using 8255
Study card
APPARATUS:-

1. 8086 Trainer kit


2. 8255 study card interfacings kit
3. Personal computer

PROGRAM:Address

Opcode

Label

Mnemonic
40

ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

Operand

Comments

GITAM UINVERSITY HYD.CAMPUS

2000
2002
2005

B0 86
BA C6 FF
EE

2006
2009
200A
200D
200E

BA C2 FF
EC
BA C0 FF
EE
EB F6

L1

MOV
MOV
OUT

AL,86
DX,0FFC6
DX,AL

MOV
IN
MOV
OUT
JMP

DX,0FFC2
AL,DX
DX,0FFC0
DX,AL
L1

Initialize 8255 Port B in


Mode -1as input
Port A in Mode -0 as output
Read Value from Port B
Port A in Mode -0 as output
Repeat the above process

RESULT:- :- Reads data from Port B and displays same in port A when S2 is pressed
Ex: - Port A 55, Port B -55

6. AIM:- To Configure 8255A Port A in mode 2 , Port B as output

in Mode 0 and

verify its function by reading port A and send it to port B & Read at Port A and sent it
Port A LEDDisplays using 8255 Study card
APPARATUS:-

1. 8086 Trainer kit


2. 8255 study card interfacings kit
3. Personal computer

PROGRAM:Address

Opcode

2000
2002
2005
2006
2009
200A
200D
200E

B0 C0
BA C6 FF
EE
BA C0 FF
EC
BA C2 FF
EE
B0 55

Label

L1

Mnemonic
MOV
MOV
OUT
MOV
IN
MOV
OUT
MOV
41

ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

Operand

Comments

AL,C0
DX,0FFC6
DX,AL
DX,0FFC0
AL,DX
DX,0FFC2
DX,AL
AL,55

Initialize Port A in Mode- 2


Taking Data From Port A
Sending data to Port B
Moving 55 to the AL register and

GITAM UINVERSITY HYD.CAMPUS

2010
2013
2014

BA C0 FF
EE
EB F3

MOV
OUT
JMP

DX,0FFC0
DX,AL
L1

sending it to Port B
Repeat the above process

RESULT:- :Following procedure should be followed for using above program in Mode 2
1. Adjust Dip Switch 1 in on position and Dip Switch 2 in position corresponding to
the data which u want to send as input from port A
2. Adjust Port B as output port by keeping SW3 OFF position
3. The port A value will be displated on the port B by pressing S2
4. Press S3 and hold it. The corresponding Port A LEDs will show 55H. This display
can be changed by changing the operand of MOV AL,55 instruction at memory
location 200E in above program
5. Dont press S1 or S2 switch after putting Dip Switch 1 in OFF position
6. While pressing and holding s3 you can see that the port A working as output port

7. AIM:- BSR MODE


APPARATUS:-

1. 8086 Trainer kit


2. 8255 study card interfacings kit
3. Personal computer

PROGRAM:Address

Opcode

2000
2002
2005
2006
2008
200B
200C
200F
2011
20114
2015
2018
201A

B0 80
BA C6 FF
EE
B0 0F
BA C6 FF
EE
E8 0B 00
B0 0E
BA C6 FF
EE
E8 02 00
E2 EC
50

Label Mnemonic

L1

DELAY

MOV
MOV
OUT
MOV
MOV
OUT
CALL
MOV
MOV
OUT
CALL
LOOP
PUSH
42

ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

Operand

Comments

AL,80
DX,0FFC6
DX,AL
AL,0F
DX,0FFC6
DX,AL
DELAY
AL,0E
DX,0FFC6
DX,AL
DELAY
L1
AX

Initialize 8255 as Port A ,Port B & C


as output
Set PC7 using bit Set/Reset mode
Introduce delay
Reset PC7
Introduce delay
Repeat the above process

GITAM UINVERSITY HYD.CAMPUS

201B
201C
201F
2022
2023
2025
2027
2028
2029

51
B9 30 00
B8 FF 0F
48
72 FD
E2 EC
59
58
C3

L3
L2

PUSH
MOV
MOV
DEC
JNZ
LOOP
POP
POP
RET

CX
CX,0030
AX,0FFF
AX
L2
L3
CX
AX

Delay Program

Note:- 1.To set/ Reset bits in port C , a control word is written in the control register
and not in port C
2. BSR Control word affects only on bit in port C
3. The BSR control word does not affect the I/O mode

RESULT:(KEY BOARD MANAGEMENT)8279 STUDY CARD


AIM:APPARATUS:-

1. 8086 Trainer kit


2. 8279 study card interfacings kit
3. Personal computer

THEORY:- The 8279 Study Card provides 6 nos of 8 Digit Seven Segment and
4*4 Matrix Hex Keypad . The keypad includes shift and control keys for key
scanning option. The study card has got two 26 pin (j3 & J4) connectors and a 50Pin (PI) connector for interfacing with different trainers.
Jumpers are provided ont eh study card for encode and decode modes of
operation of 8279
For encode method
Place the jumpers as follows
43
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

JP1 = 1 2
JP2 = 2 3
JP3 = 2 3
JP4 = 1 2
JP5 = 2 3
For encode method
Place the jumpers as follows
JP1 = open
JP2 = 1 2
JP3 = 1 2
JP4 = 2 3
JP5 = 1 2

PROGRAM:-

Substitute Values At 2100


2100 0D,50,6F,72,74,20,41,31,00 ; PORT A
2110 20,50,6F,72,74,20,42,3A,00;PORT B
Address

Opcode

Label

Mnemonic

2000
2003
2005
2006
200B
2010
2013
2016
2017
2019
44
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

Operand

Comments

GITAM UINVERSITY HYD.CAMPUS

201B
201D
2020
2025
2027
2029
202B
202E
202F
2034
2037
203C
203E
2043
RESULT:-

INTERRUPTS HANDLING USING 8259


AIM:APPARATUS:-

1. 8086 Trainer kit


2. 8259 study card interfacings kit
3. Personal computer

THEORY:PROGRAM:-

45
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

Substitute Values At 2100


2100 0D,50,6F,72,74,20,41,31,00 ; PORT A
2110 20,50,6F,72,74,20,42,3A,00;PORT B
Address

Opcode

Label

Mnemonic

2000
2003
2005
2006
200B
2010
2013
2016
2017
2019
201B
201D
2020
2025
2027
2029
202B
202E
202F
2034
2037
203C
203E
2043
RESULT:-

46
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

Operand

Comments

GITAM UINVERSITY HYD.CAMPUS

DUAL SLOPE ADC INTERFACE

AIM:APPARATUS:-

1. 8086 Trainer kit


2. Dual slope ADC interfacings kit
3. Personal computer

THEORY:- LM 339 is a quad differential comparator of which three comparators


are used to trigger the bi-lateral switches present in CD 4066. The LM 308 OP-Amp
is used as an integrator . Finally the LM 311 is used as the differential comparator.
The steps carried out by the Microprocessor for A/D conversion are as follows.
1. Switch SW! is ON to reset the integrator. This can be accomplished by setting
pin7 of the LM 339 high ( i.e by sending a high on bit 1 port A) which inturn
triggers the bilateral switch of CD 4066 and the required delay can be introduced
in software.
2. Switch SW2 on and start the counter at count N. This is done by sending a high
on bit 0 of port A and by decrementing the count to zero. It is during this that the
analog input is integrated.
3. After the counter counts down to zero, switch SW3 is ON and starts the counter
again. This is done by sending a high on bit 2 of port A . It is during this period
that the reference voltage is integrated.
4. Stop the counter when the LM 311 comparator output changes its state and read
the timer count. This is done by sampling the bit 0 of port B which inputs the
comparator output
PROGRAM:-

ORG 2000
S1 ASC DIGITAL VALUE=
N1 DB 00
47
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

Address

Opcode

200E
2011
2013

B8 00 00
8E C0
9A 31 00 00

2018
201B
201D
201E

FE
BA E6 FF
B0 82
EE
9A ED 01

2023
2027
2029

00 FE
8D 16 00 20
8B C2
9A 13 00 00

202E
2030
2033
2034
2035
2036
2037
2038
2039

FE
B0 02
BA E0 FF
EE
90
90
90
90
90
B8 01 00

Label

Mnemonic
MOV
MOV
CALLS

MOV
MOV
OUT
START CALLS

Operand

Comments

AX,0000
EX,AX
OUT_CRLF

Initialize segment registers

DX,0FFE6
AL,82
DX,AL
CLR_LCD

Initialize 8255
Port A as O/P & Port B as I/P

New line routine

Clear LCD if in Stand- alone


mode

LEA
MOV
CALLS
STC

MOV
MOV
OUT
NOP
NOP
NOP
NOP
NOP
MOV

DX,@S1
AX,DX
OUT_STRING

Display message

AL,02
DX,0FFE0
DX,AL

Reset integrator

AX,01

Integrate Vin for known value


of time

203C
203D
2040
2042
2044
2045
2048
204A
204D

EE
B9 00 10
E2 FE
B0 04
EE
BA E0 FF
B3 00
BA E2 FF
EC

KK

TVAR

OUT
MOV
LOOP
MOV
OUT
MOV
MOV
MOV
IN

DX,AL
CX,1000
KK
AL,04
DX,AL
DX,0FFE0
BL,00
DX,0FFE2
AL,DX

Feed Vref to comparator


Start counter
Check for comparator output .
If high display digital value

204E
2050
2052

24 01
74 04
FE C3

AND
JE
INC BL

AL,01
DISP
Else increment counter and
continue routine to output
digital value

2054
2056

EB F4
8A C3

DISP

JUM
MOV

TVAR
AL,BL
48

ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

2058

9A 52 00 00

CALLS

OUT _BYTE

205D
205F
2062
2063
2066
2069
206B
206C
206E

FE
B0 02
BA E0 FF
EE
BB 03 00
B9 FF 1F
E2 FE
4B
75 F8
EB AE

MOV
MOV
OUT
MOV
MOV
LOOP
DEC
JNZ
JMP

AL,02
DX,0FFE0
DX,AL
BX,03
CX,01FFF
SS
BX
DY
START

DY
SS

Reset integrator

Repeat continously

RESULT:DUAL SLOPE DAC INTERFACE

AIM:APPARATUS:-

1. 8086 Trainer kit


2. Dual slope DAC interfacings kit
3. Personal computer

THEORY:- The circuit only 17 lines from the connector are used totally. The Port
A and Port B of 8255 programmable peripheral interface are used as output ports.
The digital inputs to the DACs are provided through the port A and port B of 8255 .
The analog outputs of the DACs are connected to the inverting inputs of opamps A
741 which act as current to voltage converters. The outputs from the opamps are
connected to points marked Xout and Yout at which the wave forms are observed on
a CRO. (Port A is used to control Xout and Port B is used to control Y out ) The
reference voltage for the DACs is derived from an on-board voltage regulator A
723 . It generates a voltage of about 8V. The offset balancing of the opamps is done
by making use of the two 10K pots provided. The output waveforms are observed at
Xout and Yout on an oscilloscope.
49
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

PROGRAM:-

Org 2000
S1 ASC DUAL DAC INTERFACE
S2 ASC S-SQUARE WAVE
S3 ASC T TRIANGULAR WAVE
N1 DB 00
Address

Opcode

2031
2034
2036
2038
203B
203D
203E

B8 00 00
8B C8
8E C0
BA E6 FF
B0 80
EE
9A ED 01 00 FE

2043

8D 16 00 20

2047
2049

8B C2
9A 13 00 00 FE

Label

Mnemonic

Operand

MOV
MOV
MOV
MOV
MOV
OUT
CALLS

AX,0000
CS,AX
ES,AX
DX,0FFE6
AL,80
DX,AL
CLR _LCD

LEA

DX,@S1

MOV
CALLS

AX,DX
OUT _STRING

START

Comments

Initialize all 8255


Ports as output ports
New line routine
Display message string
on LCD or console
Wait for user entry if S,
jump to square wave

204E

9A A9 00 00 FE

GETKEY

CALLS

GET_CHAR

routine if T jump to
triangle wave routine .
Wait for valid key

2053
2055
2057
2059
205B
205D
2062
2065
2067

3C 53
74 2F
3C 54
74 02
EB F1
9A 31 00 00 FE
B9 FF 00
B0 00
FE C0

TRIANGLE
RPT1
UP

CMP
JE
CMP
JE
JMP
CALLS
MOV
MOV
INC

AL,53
SQUARE
AL,54
TRIANGLE
GETKEY
OUT_CRLF
CX,0FF
AL,00
AL

Set count
Set from 0
Increment data for + ve
going slope & output at

50
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

port A &B
2069
206C
206D
2070
2071
2073
2076

BA E0 FF
EE
BA E2 FF
EE
E2 F4
B9 FF 00
8B C1

2078

FE C8

207A
207D
207E
2081
2082
2084
2086
208B
208D
2090
2091
2094
2095
2098
209A
209C
209F
20A0
20A3
20A4
20A7
20A9

BA E0 FF
EE
BA E2 FF
EE
E2 F4
EB DC
9A 31 00 00 FE
B0 FF
BA E2 FF
EE
BA E2 FF
EE
B9 FF 00
E2 FE
B0 00
BA E0 FF
EE
BA E2 FF
EE
B9 FF 00
E2 FE
EB E0

MOV
OUT
MOV
OUT
LOOP
MOV
MOV

DX,0FFE0
DX,AL
DX,0FFE2
DX,AL
UP
CX,0FF
AX,CX

DEC

AL

MOV
OUT
MOV
OUT
LOOP
JMP
CALLS
MOV
MOV
OUT
MOV
OUT
MOV
LOOP
MOV
MOF
OUT
MOV
OUT
MOV
LOOP
JMP

DX,0FFE0
DX,AL
DX,0FFE2
DX,AL
DOWN
RPT1
OUT_CRLF
AL,0FF
DX,0FFE0
DX,AL
DX,0FFE2
DX,AL
CX,0FF
DLY1
AL,00
DX,0FFE0
DX,AL
DX,0FFE2
DX,AL
CX,0FF
DLY2
RPT2

DOWN

SQUARE
RPT2

DLY1

DLY2

RESULT:-

51
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

Set count, start from FF


Decrement data for Ve
going slope at Port A & B

Repeat continuously
Output FF at ports

Delay
Output 0 at ports

Delay
Repeat continuously

GITAM UINVERSITY HYD.CAMPUS

TRAFFICTRAFFICTRAFFICTRAFFIC LIGHTS INTERFACE


AIM:APPARATUS:-

1. 8086 Trainer kit


2. Traffic Lights interfacings kit
3. Personal computer

THEORY:- The interface provides a set of six LEDs at each of the four corners of a
four road junction.
The organization of these LEDs is identical at each of the four corners. Hence
for simplicity, the organization is described below with reference to the LEDs at
SOUTH WEST corner only.

52
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

The LEDs at SOUTH WEST corner are organized as follows:

RED
A
R

L
DL

pedestrians

DL

SOUTH
RED

Referred to as SOUTH RED hence forth

Referred to as SOUTH AMBER hence forth

Referred to as SOUTH LEFT hence forth

Referred to as SOUTH STRAIGHT hence forth

Referred to as SOUTH RIGHT hence forth

DL

Referred to as SOUTH PEDESTRIAN hence


forth( please note that DL refers to a set of two LEDs
one on either side of the road)

Of these , the first five LEDs will be ON or OFF depending on the state
of the
Corresponding port line ( LED is ON if the port line is Logic HIGH and LED
is OFF if
the port line is Logic LOW). The last one marked as DL is a set of two dual
colour
LEDs and they both will be either RED or GREEN depending on the state of
the
corresponding port line (RED if the port line is Logic HIGH and GREEM if
the port line
is Logic LOW)
53
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

There are four such sets of LEDs and these are controlled by 24 port
lines. Each
port lineis inverted and buffered using 7406 ( open collector inverter buffers)
and is used
to control an LED. Dual colour LEDs are controlled by a port line and its
complement.
The 24 LEDs and their corresponding port lines are summarized below

LED
SOUTH

EAST

NORTH

Port Line

RED

PA3

AMBER

PA2

LEFT

PA0

STRAIGHT

PC3

RIGHT

PA1

PEDESTRIAN

PC6

RED

PA7

AMBER

PA6

LEFT

PA4

STRAIGHT

PC2

RIGHT

PA5

PEDESTRIAN

PC7

RED

PB3

AMBER

PB2

LEFT

PB0

STRAIGHT

PC1

RIGHT

PB1

PEDESTRIAN

PC4
54

ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

WEST

RED

PB7

AMBER

PB6

LEFT

PB4

STRAIGHT

PC0

RIGHT

PB5

PEDESTRIAN

PC5

User can assign any meaningful interpretation to these LEDs and then develop
software accordingly . usually , the interpretation would be as follows
Vehicles coming from one direction are controlled by the LEDs at the opposite
corner
For example, vehicles coming from NORTH are controlled by the set of LEDs at the
SOUTH WEST corner , as shown below:
Vehicles coming from NORTH can
Go left ( i.e to EAST ) if SOUTH LEFT LED is ON
Go right ( i.e to WEST) of SOUTH RIGHT LED is ON
Go straight ( i.e to SOUTH) if SOUTH STRAIGHT LED is ON
Further , the above movements are flowed only if SOUTH RED LED is OFF. If
SOUTH RED LED is ON , no movement is allowed for vehicles from north.
Pedestrian crossing on SOUTH is allowed when SOUTH PEDESTRIAN is green
and disallowed when it is red. . It is obvious that, logically some combinations can
not be allowed. For example , SOUTH RED = OFF, SOUTH STRAIGHT = ON
and SOUTH PEDESTRIAN = GREEN is not allowed ( vehicles are allowed to go
from NORTH to SOUTH and pedestrians are allowed to cross on SOUTH) . SOUTH
AMBER can be ON to indicate at SOUTH RED is about to change its status from
OFF to ON.
55
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

The movement of vehicles and pedestrians on the roads can be controlled


in a similar way
As already noted , user can assign a different interpretation if desired.
However , the sample programs presented in the next section are based on the above
simple interpretation.
Example:
Determine port values for the following traffic situation:
Vehicles from WEST are allowed to go NORTH or EAST
Vehicles from EAST are allowed to go WEST
Pedestrian crossing is allowed on SOUTH
No other vehicle movement / pedestrian crossings are allowed
Now, as per the above interpretation , the status of the LEDs should be as shown
below:

RED

AMBER

LEFT

STRAIGHT

RIGHT

PEDESTRIAN
SOUTH

ON

OFF

OFF

OFF

OFF

OFF

ON

ON

OFF

OFF

OFF

OFF

OFF

OFF

OFF

ON

OFF

GREEN
EAST

OFF
RED

NORTH

ON
RED

WEST

OFF
RED

From the correspondence already between the port lines and LEDs , we can now
determine the logic values for each port line. For example, PA) should be Logic
56
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

LOW as SOUTH LEFT RED is OFF. Deterring the values of the other port lines in
similar fashion , we can arrive at the following port values:
PA = 18H

PB = 08H

PC = B5H

User can work out the port values for other situations in a similar way

PROGRAM:

Address
2000
2002
2005
2006
2009
200B
200E
200F
2010
2013
2015
2016
2017
201A
201C
201D
201E
2021
2025
2027
202A
202D
202E
2031

Opcode
B0 80
BA E6 FF
EE
BE 38 20
8A 04
BA E0 FF
EE
46
83 C2 02
8A 04
EE
46
83 C2 02
8A 04
EE
46
E8 09 00
81 FE 56
20
75 E2
E9 DC FF
B9 FF 03
51
B9 FF 03
90

Label
START

AGAIN
NEXTST

DELAY
DLY5
DLY 10

Mnemonic
MOV
MOV
OUT
MOV
MOV
MOV
OUT
INC
ADDW
MOV
OUT
INC
ADDW
MOV
OUT
INC
CALL

Operand
AL,80
DX,0FFE6
DX,AL
SI , 2038
AL,[SI]
DX,0FFE0
DX,AL
SI
DX,02
AL,[SI]
DX,AL
SI
DX,02
AL,[SI]
DX,AL
SI
DELAY

CMP

SI,2056

JNZ
JMP
MOV
PUSH
MOV
NOP

NEXTST
AGAIN
CX,00FF
CX
CX,03FF

57
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

Comments
Initialization of 8255 Mode 0
All ports as output
Talbe of port 13
Values
Port A value

Port B value

Port C value
Calling delay routine

Delay routine

GITAM UINVERSITY HYD.CAMPUS

2032
2034
2035
2037

E2 FD
59
E2 F6
C3

2038

10 81 7A

203B

44 44 F0

203E

08 11 E5

2041

44 44 F0

2044

81 10 DA

2047

44 44 F0

204A

11 08 B5

204D

44 44 F0

2050

88 88 00

2053

44 44 F0

2056

00

PORT
VALUES

LOOP
POP
LOOP
RET
DB

DLY10
CX
DLY5

10,81,7A
DB 44 44
0F0
DB 08 11
0E5
DB 44 44
0F0
DB 81 10
0DA
DB 44 44
0F0
DB 11 08
0B5
DB 44 44
0F0
DB 88 88
00
DB 44 44
0F0
DB 00

RESULT:-

LOGIC CONTROLLER

58
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

State 1
All ambers ON
State 2
All ambers ON
State 3
All ambers ON
State 4
All ambers ON
State 5
All ambers ON
dummy

GITAM UINVERSITY HYD.CAMPUS

AIM:APPARATUS:-

1. 8086 Trainer kit


2. Logic Controller interfacings kit
3. Personal computer

THEORY:- Logic Controller interface consists of 8 TTL inputs and 8 TTL outputs .
The inputs and the outputs are buffered. There are 8 input pins provided on the card.
Each of these can be set to logic 1/logic 0 by setting the DIP switch provided on the
card to ON/OFF positions.
The user can also determine the status of any required signal, by
connecting it to one of the 8 input berg strip pins (IB)-IB7) provided on the card. The
status of output lines of interface are controlled through port A of 8255. There are
two sets of 8 LEDs indicating the status of the input and out put ports. ( If the LED is
ON , the signal is logic 1 and if the LED is OFF, the signal is logic 0)
PROGRAM:-

Substitute Values At 2100


2100 0D,50,6F,72,74,20,41,31,00 ; PORT A
2110 20,50,6F,72,74,20,42,3A,00;PORT B
Address
2000

Opcode
BA E6 FF

2003

B0 02

MOV

AL,82

2005
2006

EE
9A 31 00 00 FE
9A ED 01 00

OUT
CALLS

DX,AL
OUT _CRLF

New line

CALLS

CLR_LCD

Clear LCD

MOV

BX,01

MOV
IN

DX,0FFE2
AL,DX

200B

Label Mnemonic
MOV

FE

2010

BB 01 00

2013
2016

BA E2 FF
EC

DISP

59
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

Operand
DX,0FFE6

Comments
Configuring 8255
Initialize port A as output ,
port B as input port

Setup BX register for


comparison
Get data from Port B

GITAM UINVERSITY HYD.CAMPUS

2017

8A D8

MOV

BL,AL

2019
201B
201D

3A DF
74 F6
B8 00 21

CMP
JE
MOV

BL,BH
DISP
AX,2100

2020

9A 13 00 00 FE

CALLS

OUT_STRING

2025
2027
2029
202B
202E
202F
2034

8A C3
8A FB
F6 D0
BA E0 FF
EE
9A 52 00 00 FE
B8 10 21

MOV
MOV
NOT
MOV
OUT
CALLS
MOV

AL,BL
BH,BL
AL
DX,0FFE0
DX,AL
OUT_BYTE
AX,2110

2037

9A 52 00 00 FE

CALLS

OUT_STRING

203C
203E
2043

8A C3
9A 52 00 00 FE
EB CE

MOV
CALLS
JMP

AL,BL
OUT_BYTE
DISP

RESULT:-

60
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

Compare with previously


read value

Call for displaying the


message
Invert Port B data
Out data to Port A
Call displaying the value
Call for displaying the
message
Call for displaying the value

GITAM UINVERSITY HYD.CAMPUS

ELEVATOR INTERFACE

AIM:APPARATUS:-

1. 8086 Trainer kit


2. Elevator interfacings kit
3. Personal computer

THEORY:-

This interface has four keys, marked 0,1,2 and 3 representing

the request buttons at the four floors. Pressing of a key causes a corresponding FlipFlop to be set. The outputs of the four Flip-Flops can be read through

Port

B( PB0,PB1,PB2,PB3) . Also , the status of these signals is reflected by a set of 4


LEDs. The Flip-Flop can be reset ( LEDs are cleared) through Port A( PA4,PA5,PA6
and PA&) . A column of 10 LEDs, representing the elevator can be controlled
through port A ( PA0,PA1,PA2 and PA3) .
These port lines are fed to the inputs of the decoder 7442 whose outputs
are used to control the ON/OFF states of the LEDs which simulate the motion of the
elevator
61
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

PROGRAM:-

Substitute Values At 2100


2100 00,03,06,09; position codes for floors
2104 0E0,0D3,0B6,79; clear code+postion code for all floors
Address
Opcode
Label
Mnemonic
Operand
2000
2003
2005
2006
2008
200A
200C
200F
2010
2013
2014
2016
2018
201A
201D
201F
2021
2022
2024

BA E6 FF
B0 82
EE
33 C0
8A C4
0C F0
BA E0 FF
EE
BA E2 FF
EC
24 0F
3C 0F
74 F9
BE 00 00
D0 C8
73 03
46
EB F9
8A 84 00

2028
202A
202C
202E

21
3A C4
77 0C
72 21
8A 84 04

2032
2035
2036
2038
203B
203D
203F
2041

21
BA E0 FF
EE
EB D0
E8 2B 00
FE C4
86 C4
0C F0
BA E0 FF

FOUND

MOV
MOV
OUT
XOR
MOV
OR
MOV
OUT
MOV
IN
AND
CMP
JZ
MOV
ROR
JNC
INC
JMP
MOV

DX,0FFE6
AL,82
DX,AL
AX,AX
AL,AH
AL,0F0
DX,0FFE0
DX,AL
DX,0FFE2
AL,DX
AL,0F
AL,0F
LOOP2
SI,00
AL,01
FOUND
SI
FINDF
AL,[SI]2100

CLEAR

CMP
JA
JB
MOV

AL,AH
GOUP
GODN
AL,[SI],2104

MOV
OUT
JMP
CALL
INC
XCHG
OR
MOV

DX,0FFE0
DX,AL
LOOP1
DELAY
AH
AL,AH
AL,0F0
DX,0FFE0

LOOP1

LOOP2

FINDF

GOUP

62
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

Comments
Configure 8255
Port A as o/p, port B as i/p
Initial stage is ground floor
AH is the floor position

Get request

If requested floor found


Otherwise continue search
Get requesting floor code
Compare with current floor
If need to go UP
If need to go DOWN

Elevator goes UP by one LED

GITAM UINVERSITY HYD.CAMPUS

2044
2045
2047
2049
204B
204D
204F
2052

EE
24 0F
86 E0
3A C4
75 EB
EB DF
E8 14 00
FE CC

2054
2056
2058
205B
205C
205E
2060
2062
2064
2066

86 E0
0C F0
BA E0 FF
EE
24 0F
86 C4
3A C4
75 EB
EB C8
B9 00 08

2069
206B
206D

E2 FE
E2 FE
C3

GODN

OUT
AND
XCHG
CMP
JNZ
JMP
CALL
DEC

DX,AL
AL,0F
AH,AL
AL,AH
GOUP
CLEAR
DELAY
AH

XCHG
OR
MOV
OUT
AND
XCHF
CMP
JNZ
JMP
MOV

AH,AL
AL,0F0
DX,0FFE0
DX,AL
AL,0F
AL,AH
AL,AH
GODN
CLEAR
CX,0800

LOOP
LOOP
RET

HR1
HR2

Elevator goes DOWN by one


LED

DELAY

Delay between glow of


successive LEDs

HR1
HR2

RESULT:-

63
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

64
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

STEPPER MOTOR

AIM:APPARATUS:-

1. 8086 Trainer kit


2. Stepper Motor interfacings kit
3. Personal computer

THEORY:- The stepper motor interface uses four transistor pairs(SL100 & 2N3055)
in a Darlington pair configuration . Each Darlington pair is used to excite the
particular winding of the motor connected to 4 pin connector on the interface . The
inputs to these transistors are from the 8255 PPI I/O lines of the microprocessor
trainer kit or from digital I/O card plugged in the PC . Port A lower nibbles PA0,
PA1, PA2, PA3 are the four lines brought out to the 26 pin FRC male connector (JI)
on the interface module. The free wheeling diodes across each winding protect
transistors from switching transients .
SPECIFICATION OF THE STEPPER MOTOR USED:
The stepper motor specification is available at the end of the manual. The
motor is reversible on with a torque of 3.5 kg cm. The power requirement is + 5
V/6.6V DC @ 1.2 A current per winding at full torque. The step angle is 1.8* i.e for
every single excitation, the motor shaft rotates by 1.8* . For the motor to rotate one
65
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

GITAM UINVERSITY HYD.CAMPUS

full revolution ( 360*) number of steps required is 200, The stepper motor used has
four stator windings which are brought out through colored wires terminated at a 4
pin polarized female connector. The remaining two wires ( usually white & black
wires) are shorted and terminated at 2 pin polarized female connector.

PROGRAM:

Org 2000
S1 ASC ENTER DIRECTION
S2 ASC A- ANTI CLOCKWISE, C- CLOCK WISE
N1 DB 00H
Address
202B
202E
2030
2033
2035
2036
203B
203F
2044
2049
204B
204D
204F
2051
2053
2058
205D
205F

Opcode
B8 00 00
8E C0
BA E6 FF
B0 80
EE
9A ED 01 00 FE
8D 06 00 20
9A 13 00 00 FE
9A A9 00 00 FE
3C 41
74 1D
3C 43
74 02
EB F1
9A 31 00 00 FE
9A 00 00 00 FE
B0 11
BA E0 FF

Label

C10

Mnemonic
MOV
MOV
MOV
MOV
OUT
CALLS
LEA
CALLS
CALLS
CMP
JE
CMP
JE
JMP
CALLS
CALLS
MOV
MOV
66

ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

Operand
AX,0000
ES,AX
DX,0FFE6
AL,80
DX,AL
CLR_LCD
AX,@S1
OUT _STRING
GET_CHAR
AL,41
ANTI
AL,41
C10
UP
OUT_CRLF
OUT _CHAR
AL,11
DX,0FFE0

Comments
Initialize segment
registers
Initialize all ports as
ouput

GITAM UINVERSITY HYD.CAMPUS

2062
2063
2066
2068
206A
206F
2074
2076
2079
207A
207D
207F
2081
2084
2086

EE
E8 1B 00
D0 D8
EB F8
9A 31 00 00 FE
9A 00 00 00 FE
B0 11
BA E0 FF
EE
E8 04 00
D0 D0
EB F8
B9 00 08
E2 FE
C3

REPEAT

ANTI

REPEAT1

DELAY
SS

OUT
CALL
RCR
JMP
CALLS
CALLS
MOV
MOV
OUT
CALL
RCL
JMP
MOV
LOOP
RET

RESULT:-

67
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

DX,AL
DELAY
AL,1
REPEAT
OUT _CRLF
OUT _CHAR
AL,11
DX,0FFE0
DX,AL
DEALY
AL,1
REPEAT1
CX,0800
SS

GITAM UINVERSITY HYD.CAMPUS

68
ECE VI SEMESTER
MICROPROCESSORS LAB MANUAL

S-ar putea să vă placă și