问题描述
我是汇编语言的新手,我对乘法很困惑.
I am new to assembly language, and I am really confused over multiplying.
我在这里阅读快速教程: http://logos.cs.uic.edu/366/notes/mips%20quick%20tutorial.htm
I was reading the quick tutorial here:http://logos.cs.uic.edu/366/notes/mips%20quick%20tutorial.htm
它说在我使用mult $t0, $t1
之后,结果存储在Hi和Lo中,我知道这些是mult
和div
的特殊寄存器,但是如何访问它们?
It says after I use mult $t0, $t1
the results are stored in Hi and Lo, I understand these are special registers for mult
and div
, but how do I access them?
让我说我做mult $t0, $t1
,其中$t0
和$t1
都是2.如何得到结果? (4)
Lets say I do mult $t0, $t1
where $t0
and $t1
are both 2. How do I get the result? (4)
推荐答案
您必须使用MFHI
和MFLO
将数据从HI
和LO
移至通用寄存器.
You have to use MFHI
and MFLO
to move data from HI
and LO
to general purposes register.
这篇关于从多重技巧中获得结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!