0% found this document useful (0 votes)
8 views6 pages

12 Prac 6 (A, B, C)

Cs 2

Uploaded by

nakhavasachi022
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views6 pages

12 Prac 6 (A, B, C)

Cs 2

Uploaded by

nakhavasachi022
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

PRACTICAL NO -06(A)

AIM: A block of data is stored in memory location from D000H to D004H. Write a program
to transfer the data from one location to another location starting from D010H. Enter the
program on microprocessor kit. Execute the program. Write the contents of both data blocks
before and after execution as well as the contents of the registers used in the program after
execution and the bit contents of five flags individually. Verify the results.

LOCATION LABEL MNEMONICS OPCODE COMMENT


C000 LXI B 01 Load Register
pair BC with
D000
C001 00
C002 D0
C003 LXI D 11 Load Register
pair DE with
D010
C004 10
C005 D0
C006 MVI L 2E Move
immediately
Data in Register
L
C007 05
C008 UP LDAX B 0A Load Data from
BC pair location
in Accumulator
C009 STAX D 12 Store Data from
Accumulator to
DE pair
Location
C00A INX B 03 Increment BC
pair
C00B INX D 13 Increment DE
pair
C00C DCR L 2D Decrement
Value of
Register L
C00D JNZ UP C2 Jump if Not
Zero
C00E 08
C00F C0
C010 HLT 76 End of Program

INPUT TABLE:
LOCATION DATA
D000 04
D001 04
D002 04
D003 04
D004 04

OUTPUT TABLE:
LOCATION DATA
D000 04
D001 04
D002 04
D003 04
D004 04

REGISTER VALUES
REGISTER VALUES REGISTER VALUES
A E
B H
C L
D

FLAG REGISTER:
D7 D6 D5 D4 D3 D2 D1 D0

SF ZF X AC X PF X CY

FLOWCHART:(Draw on Blank page with pencil)


CONCLUSION: Thus successfully we have transfer Data from one location to another.

PRACTICAL NO -06(B)
AIM: A block of data is stored in memory location from D000H to D004H. Write a program
to transfer the data from one location to another location in reverse order starting from
D014H. Enter the program on microprocessor kit. Execute the program. Write the contents of
both data blocks before and after execution as well as the contents of the registers used in the
program after execution and the bit contents of five flags individually. Verify the results.

LOCATION LABEL MNEMONICS OPCODE COMMENT


C000 LXI B 01 Load Register
pair BC with
D000
C001 00
C002 D0
C003 LXI D 11 Load Register
pair DE with
D010
C004 14
C005 D0
C006 MVI L 2E Move
immediately
Data in Register
L
C007 05
C008 UP LDAX B 0A Load Data from
BC pair location
in Accumulator
C009 STAX D 12 Store Data from
Accumulator to
DE pair
Location
C00A INX B 03 Increment BC
pair
C00B DCX D 1B Decrement DE
pair
C00C DCR L 2D Decrement
Value of
Register L
C00D JNZ UP C2 Jump if Not
Zero
C00E 08
C00F C0
C010 HLT 76 End of Program

INPUT TABLE:
LOCATION DATA
D000 0A
D001 0B
D002 0C
D003 0D
D004 0E

OUTPUT TABLE:
LOCATION DATA
D000 0E
D001 0D
D002 0C
D003 0B
D004 0A

REGISTER VALUES
REGISTER VALUES REGISTER VALUES
A E
B H
C L
D

FLAG REGISTER:
D7 D6 D5 D4 D3 D2 D1 D0

SF ZF X AC X PF X CY

FLOWCHART:(Draw on Blank page with pencil)


CONCLUSION: Thus successfully we have transfer Data from one location to another
location in Reverse Order.

PRACTICAL NO -06(C)
AIM: A block of data is stored in memory location from D000H to D009H. Another block of data
having the same length is stored in memory location starting from D010H. Write a program to
Exchange the contents of these two blocks. Enter the program on microprocessor kit. Execute the
program. Write the contents of both data blocks before and after execution as well as the contents of
the registers used in the program after execution and the bit contents of five flags individually. Verify
the results.

LOCATION LABEL MNEMONICS OPCODE COMMENT


C000 LXI B 01 Load Register
pair BC with
D000
C001 00
C002 D0
C003 LXI D 11 Load Register
pair BC with
D010
C004 10
C005 D0
C006 MVI L 2E Move
immediately
Data in Register
L
C007 05
C008 UP LDAX B 0A Load Data from
BC pair location
in Accumulator
C009 MOV H,A 67 Transfer Data
from
Accumulator to
Register H
C00A LDAX D 1A Load Data from
DE pair location
in Accumulator
C00B STAX B 02 Store content of
Accumulator in
BC pair.
C00C MOV A,H 7C Transfer Data
from Register H
C00D STAX D 12 Store content of
Accumulator in
DE pair.
C00E INX B 03 Increment BC
pair
C00F INX D 1B Increment DE
pair
C010 DCR L 2D Decrement
Value of
Register L
C011 JNZ UP C2 Jump if Not
Zero
C012 08
C013 C0
C014 HLT 76 End of Program

INPUT TABLE:
LOCATION DATA LOCATION DATA
D000 0A D010 0B
D001 0A D011 0B
D002 0A D012 0B
D003 0A D013 0B
D004 0A D014 0B

OUTPUT TABLE:
LOCATION DATA LOCATION DATA
D000 0B D010 0A
D001 0B D011 0A
D002 0B D012 0A
D003 0B D013 0A
D004 0B D014 0A

REGISTER VALUES
REGISTER VALUES REGISTER VALUES
A E
B H
C L
D

FLAG REGISTER:
D7 D6 D5 D4 D3 D2 D1 D0

SF ZF X AC X PF X CY
FLOWCHART:(Draw on Blank page with pencil)
CONCLUSION: Thus successfully we have Exchange Data from one location with another
location.

You might also like