Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

assembly language program

Status
Not open for further replies.

cai2

Member level 2
Joined
Nov 30, 2006
Messages
50
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
1,618
please help me with this problem. To write an assembly program that adds two positive 5 digit numbers. Assume that the user will enter only up to 5-digit numbers. Then, the program will ask the user to enter two numbers and then the program proceeds to compute and display the sum. Thanks!!!!!!:cry:
 

Please tell what type of microcontroller you use.
 

Assembly language programs are processor specific. So u have to mention the micrcontroller, for which u want to code. To over come this problem, High level language like C is used to program microcontrollers. It is called Embedded C.
 

You can easily write a C code and use an appropriate compiler.
Problem: size
 

Hi caicai,

Your problem seem too easy, but too difficult to answer if you are not specific.

anyway, here's an assembly code (in 8085 microprocessor) as a sample

MVI A, 04h ; store value 04h at regA
MVI B, 05h ; store value 05h at regB
ADD B, A ; add A and B, result-->A
STA 002Fh ; store accumulator (regA) to memloc 002F
OUT A ; output values stored at regA
HLT ; program halt
 

an 8086...
 

an 8086 controller

Added after 7 minutes:

i mean processor....
 

try be controller specific then only we can come out with code
 

I've made a mistake its an 8051 microcontroller...
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top