stuart alan mckinney
2005-02-18 23:44:48 UTC
my lab is working fine except for when it reaches the divide operation
my display out put aroud where it messes up is:
PC=0x8
ACC=0xFFFFFFF8
IR=0x3A
MAR=0x1A
MDR=0x8
PC=0x9
ACC=0x1 <- not as on example
IR=0x6F
MAR=0xF
MDR=0x2
it seems to me that what is left in the MDR should be the dividor
(denominator)
my 2 lines to divide are:
smul %r3, 1, %r3
sdiv %r3, %r6, %r3
my display out put aroud where it messes up is:
PC=0x8
ACC=0xFFFFFFF8
IR=0x3A
MAR=0x1A
MDR=0x8
PC=0x9
ACC=0x1 <- not as on example
IR=0x6F
MAR=0xF
MDR=0x2
it seems to me that what is left in the MDR should be the dividor
(denominator)
my 2 lines to divide are:
smul %r3, 1, %r3
sdiv %r3, %r6, %r3