2012-02-02 120 views
0

我正在做一個家庭作業的作業,需要花費一段時間,並以幾種不同的方式進行格式化。引用乘法運算的結果?

我目前的問題是參考乘法的結果。爲TotalSeconds DD 0

我不是100%確定如何引用兩個寄存器的級聯

mov ax, 3600 ;Copy 3600D to ax for multiplication... 
mul Hours; After this, DX:AX have the result... 

add TotalSeconds, dx:ax <- This is incorrect according to MASM 

TotalSeconds定義。

謝謝!

回答

0

變化add TotalSeconds, dx:ax

add word ptr TotalSeconds, ax 
adc word ptr TotalSeconds+2, dx 

請閱讀CPU手冊(從英特爾或AMD的),看看有什麼指令和操作數是有效的。