Assy 101 Question

TK terryk at foothill.net
Fri May 28 04:50:59 GMT 1999


Integer Divide (D / X => X; r => D)

You can read this as D divided by X with the whole part going into X and the
remainder going into D.

Both original parts are replaced with the results.

Terry
-----Original Message-----
From: Shannen Durphey <shannen at grolen.com>
To: gmecm at efi332.eng.ohio-state.edu <gmecm at efi332.eng.ohio-state.edu>
Date: Thursday, May 27, 1999 9:41 PM
Subject: Re: Assy 101 Question


>Mike Pitts wrote:
>>
>> X is a register and D is an accumulator (both hold values).
>>
>Ok, so the index register is used to store the result of the divide.
>The manual doesn't lay this out for newbies.
>
>> Here's an easy example:
>>
>> The result of D / X where D = 7 and X = 2 is:
>>
>> X = 3  (integer value of 7/2)
>> D = 1 (remainder: 7/2=3 but 3x2=6 so 7-6=1)
>Straight, and to the point. I was thinking of a code snippet, but not
>necessary now.
>Thanks.
>Shannen
>>
>> -Mike
>>
>> -----Original Message-----
>> From: Shannen Durphey <shannen at grolen.com>
>> To: gmecm at efi332.eng.ohio-state.edu <gmecm at efi332.eng.ohio-state.edu>
>> Date: Thursday, May 27, 1999 9:06 PM
>> Subject: Assy 101 Question
>>
>> >Integer Divide (D / X => X; r => D)
>> >
>> >How do I use the result?  What do they mean by using "X"?
>> >Can someone provide a short example?
>> >Shannen
>> >
>
>




More information about the Gmecm mailing list