answersLogoWhite

0


Best Answer

Data segment

n1 db 20

n2 db 10

sum db ?

Data ends

code segment

assume cs:code,ds:data

start:mov ax,data

mov ds,ax

mov al,n1

mov bl,n2

add al,bl

mov sum,al

mov ah,4ch

int 21h

code ends

end start

User Avatar

Wiki User

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

Wiki User

12y ago

This is a program to add two 16 bit numbers in which one number is stored at 8050 and 8051 and the 2nd number is stored at 8060 and 8061............

and the result is at 8070 and 8071

program:

LDA 8051H

LXI H,8061H

MOV B,M

MVI E,00H

ADD B

JNC L1

INR E

L1:STA 8071H

LDA 8050H

LXI H,8060H

MOV B,M

ADD E

ADD B

MVI E,00H

JNC L2

INR E

L2:STA 8070H

MOV A,E

STA 8072H

HLT

****************************************************************

LHLD 4000H : Get first I6-bit number

XCHG : Save first I6-bit number in DE

LHLD 4002H : Get second I6-bit number in HL

DAD D : Add DE and HL

SHLD 4004H : Store I6-bit result in memory locations 4004H and 4005H.

HLT : Terminate program execution

Sample problem:

(4000H) = 15H

(4001H) = 1CH

(4002H) = B7H

(4003H) = 5AH

Result = 1C15 + 5AB7H = 76CCH

(4004H) = CCH

(4005H) = 76H

************************************************ROCK FRANCIS***

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

Lhld 4000h

xchg

lhld 4002h

mov a,e

sub l

mov l,a

mov a,d

sub h

mov h,a

shld 4004h

hlt

********************************************************************

LHLD 4000H : Get first 16-bit number in HL

XCHG : Save first 16-bit number in DE

LHLD 4002H : Get second 16-bit number in HL

MOV A, E : Get lower byte of the first number

SUB L : Subtract lower byte of the second number

MOV L, A : Store the result in L register

MOV A, D : Get higher byte of the first number

SBB H : Subtract higher byte of second number with borrow

MOV H, A : Store l6-bit result in memory locations 4004H & 4005H.

SHLD 4004H : Store l6-bit result in memory locations 4004H & 4005H.

HLT : Terminate program execution.

Sample problem:

(4000H) = 19H

(400IH) = 6AH

(4004H) = I5H (4003H) = 5CH

Result = 6A19H - 5C15H = OE04H

(4004H) = 04H

(4005H) = OEH

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

Write a menu driven program to read two integers & find their sum, difference & product

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

once u check it from jntu spectrum

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write program to add two 16 bit number using assembly language of Intel 8085?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the assembly language program for GCD of two 16 bit unsigned integers using Intel 8086?

alp for lcm of a no


What assembly language is the best for making an OS?

The native Assembly language of the given platform. For example it would be stupid to write anything in Motorola 68000 Assembly for Intel x86 platform: it wouldn't work.


Write division of two 8 bit number using assembly language of Intel 8086?

Mov ax,[2020h] mov bx,[2022h] mul bl mov [2024h],ax hlt


What has the author Ross P Nelson written?

Ross P. Nelson has written: 'Microsoft's 80386/80486 programming guide' -- subject(s): Assembler language (Computer program language), Intel 80386 (Microprocessor), Intel 80486 (Microprocessor), Programming


What has the author James F Scanlan written?

James F. Scanlan is a professor of English and Comparative Literature, known for his research on Henry James and his works. Scanlan has written numerous scholarly articles and books focusing on James' literary influence and impact. Some of his notable works include "Narrative Perspective in the Posthumous Fiction of Henry James" and "Henry James: The Contemporary Reviews."


What is set a detailed instructions given to a computer?

Assembly language-or are you looking for the different instructions within assembly language if so search Intel 8086 datasheet in yahoo and download the datasheet for the Intel 8086 processor(x86) and the last three pages or so tell you the instructions.


What kind of a form factor is E210822?

It could be Micro ATX or ATX or even something else. This number appears on a lot of Intel motherboards. The number you really need to find is the AA (Altered Assembly) number.


What is the first x86 Microprocessor?

"The x86 architecture first appeared as the Intel 8086 CPU released in 1978, a fully 16-bit design based on the earlier Intel 8085. Although not binary compatible, it was designed to allow assembly language programs written for the 8085 to be mechanically translated into the equivalent 8086 assembly. " Here's the entire Article: http://en.wikipedia.org/wiki/X86


Why assembly level language is called machine dependent language?

Machine languages are composed of instructions intended to be read directly by the microprocessor (the computer's CPU). The manufacturer of the CPU determines it's "INSTRUCTION SET" ASSEMBLY LANGUAGE on the other hand IS NOT machine dependent. The same commands ADD, Divide, Move, etc are universal. HOWEVER the ASSEMBLY LANGUAGE has to have an INTERPRETER for EACH CPU, and that will translate the Universal ASSEMBLY language to the MACHINE SPECIFIC code required to program the CPU.


What are the types of processors used in assembly language?

Each processor has its own assembly language (well, some of them has more than one).Example for i386:Intel-style:MOV EDX,[EBP-16]MOV EAX,[EBP-20]MOV [EDX],EAXAT&T style:mov -16(%ebp),%edxmov -20(%ebp),%eaxmov %eax,(%edx


What is the effect of computer architecture in the field of operating system?

The architecture will provide different sets of operators and memory and quite possibly how they were used (in assembly language for instance). Compare risc and Intel architecture for extreme proof.


How much ram can a E210882 motherboard use?

This could vary as there are a number of motherboards that have that number. It would be better to find this information either from your computer's manufacturer (for example Dell or Gateway) or by looking up the Intel AA (altered assembly) number.