WinAsm Studio, The Assembly IDE - Free Downloads, Source Code
Sponsors
Articles
Programming Quick Start
32-bit Assembler is Easy
Porting Iczelion tutorials
What is FASM
Hard Drive Recovery
Wiring your own LAN
Personal menu
Welcome Guest
User:
Pass:
Register!
Resend Validation Email
 
Forum
 

Adding two 32-bit numbers using 16 bit regs, the code must work for any initiated value for upto 4,294,967,295 (the maximum 32-bit number)

blackZ
Quote Post


New Member
*

Group: Members
Posts: 1
Member No.: 46596
Joined: 30-September 11


I need to write a code for my Physics Micro App class using MASM assembly language.

Details:
1) Add 2 32bits integers using 16bit registers.
2) Store the result into data segment of the memory.
3) The value should be initialized within the code, there is no need for read input from keyboard.
4) The code must work for any initiated value for upto 4,294,967,295 (the maximum 32-bit number).

I know that there will be 4 regs required, two for each number.

Any help?
Thanks
PMEmail Poster
Top
shoorick
Quote Post


Extremely Active Member
******

Group: Admins
Posts: 2301
Member No.: 160
Joined: 22-June 04


dx/ax - num1
bx/cx - num2

add ax,cx
adc dx,bx

dx/ax - num1+num2
PMEmail PosterUsers Website
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll

 

Sponsors
Computer Science

Internet
C/C++
Hardware & PC maintenance

HiEditor

General Discussions
Suggestions/Bug Reports
WinAsm Studio

General Discussions
Suggestions/Bug Reports
WinAsm Studio FAQ
Multilingual User Interface
Add-Ins
Assembly Programming

Main
Newbies
Projects
Custom Controls
Snippets
Announcements & Rules

Announcements

General

Online Degrees - Distance Learning
The Heap
Russian
Google