Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
25Activity
0 of .
Results for:
No results containing your search query
P. 1
8085 prog-ans

8085 prog-ans

Ratings: (0)|Views: 1,937 |Likes:
Published by msujith

More info:

Published by: msujith on Aug 15, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

05/21/2013

pdf

text

original

 
8085 PROGRAM V.V.C.E.T
DEPARTMENT OF EEEPage 1
1.Store 8-bit data in memory2.Exchange the contents of memory locations3.Add two 8-bit numbers4.Subtract two 8-bit numbers5.Add two 16-bit numbers6.Add contents of two memory locations7.Subtract two 16-bit numbers.8.Finding one's complement of a number9.Finding Two's complement of a number10.Pack the unpacked BCD numbers11.Unpack a BCD number12.Execution format of instructions13.Right shift bit of data14.Left Shifting of a 16-bit data15.Alter the contents of flag register in 808516.Calculate the sum of series of numbers17.Multiply two 8-bit numbers18.Divide a 16 bit number by a 8-bit number19.Find the negative numbers in a block of data.20.Find the largest of given numbers21.Count number of one's in a number22.Arrange in ascending order23.Calculate the sum of series of even numbers24.Calculate the sum of series of odd numbers25.Find the square of given number26.Search a byte in a given number27.Add two decimal numbers of 6 digit each28.Separate even numbers from given numbers29.Transfer contents to overlapping memory blocks
 
8085 PROGRAM V.V.C.E.T
DEPARTMENT OF EEEPage 2
1.Store 8-bit data in memoryEG:
Store the data byte 32H into memory location 4000H
Program 1:MVI A, 52H : Store 32H in the accumulatorSTA 4000H : Copy accumulator contents at address 4000HHLT : Terminate program executionProgram 2:LXI H : Load HL with 4000HMVI M : Store 32H in memory location pointed by HL register pair (4000H)HLT : Terminate program execution
Note: The result of both programs will be the same. In program 1 direct addressing instruction isused, whereas in program 2 indirect addressing instruction is used.2.Exchange the contents of memory locations
Statement:
Exchange the contents of memory locations 2000H and 4000H.
Program 1:LDA 2000H : Get the contents of memory location 2000H into accumulatorMOV B, A : Save the contents into B registerLDA 4000H : Get the contents of memory location 4000Hinto accumulatorSTA 2000H : Store the contents of accumulator at address 2000HMOV A, B : Get the saved contents back into A registerSTA 4000H : Store the contents of accumulator at address 4000HProgram 2:LXI H 2000H : Initialize HL register pair as a pointer to memory location 2000H.LXI D 4000H : Initialize DE register pair as a pointer to memory location 4000H.MOV B, M : Get the contents of memory location 2000H into B register.
 
8085 PROGRAM V.V.C.E.T
DEPARTMENT OF EEEPage 3
LDAX D : Get the contents of memory location 4000H into A register.MOV M, A : Store the contents of A register into memory location 2000H.MOV A, B : Copy the contents of B register into accumulator.STAX D : Store the contents of A register into memory location 4000H.
HLT : Terminate program execution.
Note: In Program 1, direct addressing instructions are used, whereas in Program 2, indirect addressing instructions are used.3. Add two 8-bit numbers
Statement:
Add the contents of memory locations 4000H and 4001H and place the result inmemory location 4002H.
(4000H) = 14H(4001H) = 89HResult = 14H + 89H = 9DH
Source program
LXI H 4000H : HL points 4000HMOV A, M : Get first operandINX H : HL points 4001HADD M : Add second operandINX H : HL points 4002HMOV M, A : Store result at 4002HHLT : Terminate program execution
Note: In Program 1, direct addressing instructions are used, whereas in Program 2, indirect addressing instructions are used.4. Add two 16-bit numbers
Statement:
Add the 16-bit number in memory locations 4000H and 4001H to the 16-bit number inmemory locations 4002H and 4003H. The most significant eight bits of the two numbers to beadded are in memory locations 4001H and 4003H. Store the result in memory locations 4004Hand 4005H with the most significant byte in memory location 4005H.

Activity (25)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Albano Sali liked this
Shishir Rai added this note
program 24 (i checked only this) its incomplete WRONG program where are you storing the result????? "BACK" loop is defined no where...??? and where are you decrementing the counter hanh!!???? INX H should be at 6th line above the back loop...LOLz
messallam added this note
thank you very much.
Neha Gupta liked this
Ronard Kazoora liked this
Akash Nahullah liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->