ASM Newbie Question: 10/6 Byte Division

  • Thread starter Thread starter Brazilian Fan
  • Start date Start date
  • Tags Tags
    Division
Click For Summary

Discussion Overview

The discussion revolves around how to perform division of a 10-byte number by a 6-byte number in assembly language, particularly in the context of the limitations of the DIV (or IDIV) opcode, which supports only 8-byte by 4-byte divisions. The scope includes technical explanations and potential methods for achieving this division.

Discussion Character

  • Technical explanation, Exploratory

Main Points Raised

  • One participant inquires about the method for dividing a 10-byte number by a 6-byte number using assembly language.
  • Another participant suggests using a long division algorithm similar to what is taught in grade school.
  • A third participant mentions that extended precision math can be complex and provides a link to a resource that includes source and documentation for handling such calculations.

Areas of Agreement / Disagreement

The discussion does not reach a consensus on a specific method for performing the division, and multiple approaches are suggested without resolving which is preferable.

Contextual Notes

Participants do not clarify the assumptions or limitations regarding the implementation of the suggested methods, nor do they address any specific mathematical steps involved in the division process.

Brazilian Fan
Messages
2
Reaction score
0
Hi, I am new here and I got a newbie ASM Question:

How to divide, say, a 10 by 6 bytes number if the DIV (or IDIV) opcode only supports a 8 by 4 Bytes division?

Thanks in advance
 
Last edited:
Technology news on Phys.org
One way would be to simply use the same algorithm you used in grade-school for long division.

- Warren
 
Extended precision math can get tricky. Here's a link to a website that includes source and documentation:

http://www.apfloat.org
 
Thanks for the help :smile:
 

Similar threads

Replies
2
Views
2K
Replies
1
Views
5K
  • · Replies 21 ·
Replies
21
Views
7K
  • · Replies 5 ·
Replies
5
Views
8K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
Replies
7
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
3
Views
11K