answersLogoWhite

0


Best Answer

;A assembly program to reverse a number.

jmp start

;data

;code

start: nop

mvi e,0f0h; ;no. to be reversed

mvi d,00h; ;result

mvi c,11h; ;masking bits

mvi a,11h; ;to store the current mask

mvi h,04h; ;counter

mvi b,01h;

rev: ana e; ;using the mask

jz end;

mov l,a; ;temp storage for storing the bits

ani 0fh; ;storing the lsb's

mov a,l;

mov l,b;

shift: rrc;

dcr l;

jnz shift;

ora d;

mov d,a;

end: mov a,c;

rlc;

mov c,a;

inr b;

inr b;

dcr h;

jnz rev;

hlt

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

Sample problem:

(4000H) = 51H

(4001H) = 19H

Result = 51H - 19H = 38H

Source program:

LXI H, 4000H : HL points 4000H

MOV A, M : Get first operand

INX H : HL points 4001H

SUB M : Subtract second operand

INX H : HL points 4002H

MOV M, A : Store result at 4002H.

HLT : Terminate program execution

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program to sub 8 bit numbers in microprocessor 8085?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a program to add two 8 bit numbers in microprocessor 8051?

write it in 8085


Prime numbers between 1 to 10 in microprocessor 8085?

program to find prime number in 8085 microprocessor


Program to count the number of numbers in an array using 8085 microprocessor?

A program which is used to count the number of numbers in an array using a 8085 microprocessor is known as a assembly language program.


Types of sorting in 8085 microprocessor?

Sorting is not a microprocessor specific thing. Sorting requires a program and, as such, is not dependent on which microprocessor is involved.


How do you write a program in 8085?

Either in Assembly or in some high level language/the hex-code (for the mnemonics) that the microprocessor 8085 generally understands.


Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 matrix?

Sp[[Q/Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 matrix|Answer]]ell chec[[Q/Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 matrix&action=edit&section=new|Answer it!]]k your answe[[Q/Discuss:Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 matrix|Disc]][[help/answering questions|guidelin]]Spell check your answeresussionr[[help/signing in|full benefits]] Save C[[Q/Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 matrix|Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 ]][[Q/Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 matrix&action=edit&section=new|Answering 'Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 matrix?']]matrix?ancel[[Q/How many animals are in West Texas|How many animals are in West Texas?]][[Q/How do you increase the number of four wheelers vehicles for servicing in a Service workshop|How do you increase the number of four wheelers vehicles for servicing in a]][[Q/How do you increase the number of four wheelers vehicles for servicing in a Service workshop|How do you increase the number of four wheelers vehicles for servicing in a Service workshop?]] Service workshop?[[Q/How do you increase the number of four wheelers vehicles for servicing in a Service workshop|How do you increase the number of four wheelers vehicles for servicing in a Service workshop?]]More Q&A


Why the name 8085 Why the name 8085 for microprocessor?

8085 is a microprocessor designed by Intel


What do '8085' in 8085 Microprocessor signify?

The '8085' in the 8085 microprocessor is the designation given to the microprocessor by Intel. The '5' means it is a single power supply (5 volt) version of the 8080, with enhancements.


What power supply is used in microprocessor 8085 programming?

+5v necessary for microprocessor 8085.


What is the Overview of 8085 microprocessor?

8085 is a 8 bit microprocessor designed by Intel Co.


What is subroutine in 8085?

in 8085 microprocessor a subroutine is a separate program written aside from main program ,this program is basically the program which requires to be executed several times in the main program. the microprocessor can call subroutine any time using CALL instruction . after the subroutine is executed the subbroutine hands over the program to main program using RET instruction.


What is a 8085 microprocessor?

with neat diagram explain the system bus structure of 8085