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 9116027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:34:27+00:00 2026-06-17T04:34:27+00:00

I am working on windows 7 but I also try the codes on dosbox

  • 0

I am working on windows 7 but I also try the codes on dosbox too

I wonder how can I divide double word by word in 16 bit mode

I use fasm. and making .com file

following code run correctly
but it just shutdown emulation window when dx is higher than 0

org 100h
mov dx, 0
mov ax, 10
mov bx, 10
div bx
add ax, '0'
int 29h   
mov ax, 00h
int 16h
mov ax, 4c00h
int 21h

if I change the code like following..
it shutdown when dx is higher than 0xf
I don’t know why.

org 100h
mov dx, 0xf
mov ax, 10
div word [divby]
add ax, '0'
int 29h
mov ax, 00h
int 16h
mov ax, 4c00h
int 21h
divby:
        dw 0x10           

how can I divide double word by word without shut down bug?

  • 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-06-17T04:34:28+00:00Added an answer on June 17, 2026 at 4:34 am

    The “shutdown” or divide overflow exception occurs, when dx:ax / bx can’t fit into ax (or when one divides by zero).

    Assuming one has a “big” value in aa:bb:cc:dd, then dividing by bx one would have to perform the following steps:

     lea si,[aa]
     lea di,[result]
     mov dx,0
     mov cx,4
     again:
     lodsw      ;; load ax
     div bx
     stosw      ;; store result of division
     loop again
     ;; at this point dx will contain the remainder of the big_int % bx
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following vbscript worked fine on XP computers but is not working on Windows
I wanted to use winreg module of python for working with windows registry. But
I am working on Ubuntu environment (LAMP) .But when i install symfony2 on windows
I recently installed PHP on IIS/Windows 7, but it isn't working. I am getting
I've been trying Node.js running in Windows Azure Emulator, but unfortunatelly it isn't working.
Window.open javascript function is not working in Mozilla, but working in other browsers, here
I have modified a working Windows service that had always been starting beforehand. After
I am working on windows forms applications using c# .net 4.0. Where I have
I am working in Windows Application. I am reading a value from Excel and
I m working on windows form application. I need to show amount in words

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.