Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6880891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:02:14+00:00 2026-05-27T05:02:14+00:00

Im trying to write a program which get two 6-digit decimal numbers and show

  • 0

Im trying to write a program which get two 6-digit decimal numbers and show the addition of them, but in 16 bit 8086
i defined numbers as double word and put LO in WORD 1 and HO in word 2. similar to below code
but i dont have any idea to do next, can any body suggest me algorithm for next operations?
Thnx

x dd(?)
    next_no:
    mov cl,2
    mov ch,4

two_bit:
getch

sub al,30h
mov bl,10
mul bl
mov di,ax
add word ptr x+2,di

dec cl
jnz two_bit
fourbit:
getch
sub al,30h
mov bl,10
mul bl
mov di,ax
add word ptr x,di
dec ch
jnz fourbit

in this program
di is a place to storing the number made through the loop
when user enter a number
di will multiple to 10 and the new digit will add to di
like:
proccess of getting 28
di=0*10+2=2
di=2*10*+8=28

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:02:15+00:00Added an answer on May 27, 2026 at 5:02 am

    Rather than follow your uncommented code, I’ll present an independent example.

    Suppose you have one 32-bit number in DX:AX and one 32-bit number in CX:BX (this notation means that the high 16 bites are stored in DX for example, and the low 16 bits in AX). To add these values and leave the result in DX:AX, you would:

        add ax,bx
        adc dx,cx
    

    The add instruction adds the two values and sets the C (carry) bit to 1 or 0 depending on whether there was a carry or not. The adc instruction adds the two values plus the value of the carry bit (and then sets the carry bit again). In this way, you can add values of any size by continuing with more adc instructions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to write a program which prompts the user to enter two 3×3
I am trying to write a program in PHP which I had already written
I'm trying to write a simple program in VC++ which will just initialize the
I’m trying to write a twitter program to get my tinme line. I’m using
I need to write an extremely lightweight program (trying to get below 8Kb) that
I am trying to write a program which will listen to the serial input
I am currently trying to write a program which asks the user for a
i am trying to write a scheme program which will take a list of
I'm trying to write a program to process the BSD-style process accounting file under
I'm trying to write a program that uses sockets to connect with other instances

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.