作者ken52011219 (ken52011219)
看板Grad-ProbAsk
標題[理工] [計組] BEQ
時間Sun Nov 6 11:46:51 2016
For a conditional branch instruction such as beq rs , rt , loop ,which
of following statement are true ?
(A) The label "loop" defines the base address of the branch target
(B) The label "loop" is an offset relative to the program counter which
points to the sequential instruction of the branch instruction
(C) The label "loop" is an unsigned number
(D) The label "loop" is coded into the instruction as "loop"
Ans : B
想請問C、D為何錯 感謝
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 36.224.32.87
※ 文章網址: https://www.ptt.cc/bbs/Grad-ProbAsk/M.1478404014.A.41C.html
推 yorunohoshi: C的話 如果loop是在beq指令上方可以填負數 11/06 12:01
推 yorunohoshi: D的話,在指令裡會把loop轉成"(PC+4)+相對位址*4" 11/06 12:05
→ yorunohoshi: 不曉得有沒有記錯@@ 11/06 12:05
我懂了 頭昏了 把LOOP想成副program的title
感謝 !!
※ 編輯: ken52011219 (36.224.32.87), 11/06/2016 12:11:19
推 Transfat: C的解釋還是有點不懂欸,什麼叫作“可以填負數”啊 11/06 13:21
推 k2shouai: 你要跳的點在你所在行數的上方就要填負數。 11/06 14:03
推 kyuudonut: 重點不是正數還是負數 而是se unit會把他當有號數看待 11/06 16:04
→ kyuudonut: 啊啊 抱歉我看錯意思了~ 請忽略 11/06 16:05
推 aa06697: 樓上說的沒錯吧? 那16bit 要用signed number 來看 11/07 11:51
推 boy00114: 這題老師上課是說c)可以填負數d)沒有叫"loop"這個名 11/08 00:26
→ boy00114: 字的指令 不知道有沒有記錯@@ 11/08 00:26