Hi, You can always do the divide and conquer method. Or do it the old fashioned way 1 bit at a time :-). Check out My I7000 sim for examples of how to do this. Or my B5500 sim where I do basically DP divide, with 3 divides. I am going to have a similar problem when I redo my KA10 sim since it does a 71 bit by 36 bit divide.
Generally the divide loop does not slow the sim down noticeably, since the sim will already be 100 times faster then the original. Rich > Whilst its not a SIMH simulator, I hope you can help. I want to write > an emulator for the Pegasus. The Ferranti Pegasus was (there are none > operating at present) a strange beast with two 18-bit instructions > per 39-bit word. Generally, it does 39-bit twos complement > arithmetic. The multiply results in a 77-bit result which I have no > problems implementing. > Where I am struggling is with the divide. I need to be able to divide > a 77-bit number by a 39-bit number and get a 39 bit quotient and a 39 > bit remainder. As the compiler I am using only does 64-bit numbers > this is proving challenging. Any one got a good article on how to do > this? > Dave Wade > G4UGM -- ========================================================================== Richard Cornwell [email protected] http://sky-visions.com LinkedIn: https://www.linkedin.com/in/richard-cornwell-991076107 ========================================================================== _______________________________________________ Simh mailing list [email protected] http://mailman.trailing-edge.com/mailman/listinfo/simh
