Discussion:
lab2
(too old to reply)
stuart alan mckinney
2005-02-18 23:44:48 UTC
Permalink
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
stuart alan mckinney
2005-02-19 00:47:44 UTC
Permalink
nvm i got it, needed a nop afetr i branched to pDIV
Post by stuart alan mckinney
my lab is working fine except for when it reaches the divide operation
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)
smul %r3, 1, %r3
sdiv %r3, %r6, %r3
Continue reading on narkive:
Loading...