[理工] [計組]-指令集
這是高點汪兆慶 計算機組織/結構 經典題型解析 第六章 <指令集> 的題目
Q1:
The top of a memory stack contains 3350.
The stack pointer SP contains 3240.
A two-word procedure call instruction is located in memory at address 2000,
followed by the address field of 4385 at location 2001.
What are the contents of PC , SP , and the top of the stack :
(一) Before the call instruction is fetched from memory.
(二) After the call instruction is executed.
(三) After the return from the procedure.
A:
(一) PC = 2000 , SP = 3240 , top of stack = 3350
(二) PC = 4385 , SP = 3239 , top of stack = 2002
(三) PC = 2002 , SP = 3240 , top of stack = 3350
(一) 很trivial 就不用多解釋
(二)、(三) 就不懂了,希望高手能指教這題的觀念
---------------------------------------------------------------------------
Q2:
Given the memory values in Table 1 and a one-address machine with an
accumulator, what value do the following instructions load into the
accumulator ?
Address Content
(一) LOAD INDIRECT 20 20 40
(二) LOAD DIRECT 30 30 50
(三) LOAD IMMEDIATE 30 40 60
50 70
< Table 1 >
A:
(一) 60
(二) 50
(三) 30
我不懂的是為什麼 (一) 的答案是 60 呢?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 221.169.157.105
※ 編輯: Karena1983 來自: 221.169.157.105 (02/16 09:22)
→
02/16 10:02, , 1F
02/16 10:02, 1F
→
02/16 10:04, , 2F
02/16 10:04, 2F
→
02/16 10:54, , 3F
02/16 10:54, 3F
→
02/16 10:55, , 4F
02/16 10:55, 4F