Sign in to follow this  
Followers 0
My life

DIV Instruction

3 posts in this topic

Hi, I would like to divide 25 with 10 and store it in some memory location say v1400. But where is the remainder 5 stored? Can anyone help me.

Share this post


Link to post
Share on other sites
In the help menu it states simply, Divide is a 16 bit instruction that divides the BCD value in the accumulator by a BCD value (Aaaa), which is either a V memory location or a 4 digit (max.) constant. The first part of the quotient resides in the accumulator and the remainder resides in the first stack location.

Share this post


Link to post
Share on other sites
If you want the remainder the after you do an OUT to store the quotient perform a POP. This will transfer the remainder into the accumulator, replacing the quotient, where you can do what you want with it. [Edits - replaced 'dividend' with 'quotient'] Edited by b_carlton

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0