Re: The answer to the Excel 2007 65,535 bug



Jamie jamie_ka1lpa_not_valid_after_ka1lpa_@xxxxxxxxxxx posted to
sci.electronics.design:

Tom Del Rosso wrote:

"JosephKK" <joseph_barrett@xxxxxxxxxxxxx> wrote in message
news:OfbWi.8832$%13.2903@xxxxxxxxxxxxxxxxxxxxxxxxxx

One of the above statements is backwards. I think the quotient
goes into AL, AX, or EAX.

So i went and checked, the quotient is placed in AL, AX, or EAX. I
did not find information on where the remainder went (IF anywhere).
Moreover, there does not seem to be any protection against divide
overflow (up to '386 processors at least).


It triggers software interrupt 0 even in the 8086/8. The remainder
does go into AH or DX or EDX.

Many years ago when looking at a hex dump (with ASCII on the right)
of one of my programs I noticed a divide char ÷ where my DIV AL
instruction was. It's the same code F6.


My original point of this was, many manuals have errors in their
publications. for example, the one I have states the remainder goes
in the AL, AX or EAX and quotient goes in the uppers like the DX
,EDX etc.. Not only that. when you reference the IDIV and DIV for
example, it states they're both unsigned.. ( another error)..

On top of all that, no where does it state that the remainder
which
we know is in the upper regs AH, DX, or EDX effects the next
calculation because it's assumed that any value in the remainder
register is from a prior DIV operation where it might be an extended
precision operating taking place and there for, used as a carry..
etc..
THe Book,
Assembler Language
for Real
programmers only..
this thing is full of errors and left out needed information.

it's not only this reference with these errors. I find all over
the
net what looks like exact reprints how ever, there are some that are
correct ! you just have to keep looking until you find information
that actually works with the test results you're getting.

I find my turbo references are most accurate.


As i posted elsewhere in this thread, accurate data from the Microsoft
MASM manual has the correct and reasonably complete information.

.



Relevant Pages

  • Re: The answer to the Excel 2007 65,535 bug
    ... So i went and checked, the quotient is placed in AL, AX, or EAX. ... did not find information on where the remainder went. ... of my programs I noticed a divide char ÷ where my DIV AL instruction was. ...
    (sci.electronics.design)
  • Re: The answer to the Excel 2007 65,535 bug
    ... did not find information on where the remainder went. ... in the AL, AX or EAX and quotient goes in the uppers like the DX,EDX ... when you reference the IDIV and DIV for example, ...
    (sci.electronics.design)
  • Re: divide by 10 with Z80
    ... Then shift HL left and subtract BC successively. ... ;quotient in H, remainder in L ...
    (comp.os.cpm)
  • Re: How can i find out the quotient?
    ... showing how to calculate both the quotient and remainder. ... But now I see that the quotient appears at the very top ... ... When it's divisor times x^n, write a '1' someplace; when it's zero, write '0' going ... with an encoded message which is a multiple of the divisor polynomial. ...
    (sci.math)
  • Re: .99999... still=/= 1 - explanation ?!
    ... Absolutely correct. ... It is standard high school and college mathematics. ... Shift down a factor of 10 and treat the remainder like you treated the ... The quotient becomes 0.99 and the new ...
    (sci.math)