作者smalldan532 (等待ing)
看板TransCSI
標題[問題] LC3 simulator
時間Tue Nov 22 20:23:09 2005
可以告訴我題目在問什麼嗎
一點概念也沒
不知怎麼寫說 謝謝
You are asked to write a program in LC-3 machine language to shift a bit
pattern some number of bits to the left and store the result in memory.
i. The number of bits the bit pattern should be shifted is called the
shift amount.
ii. Shift amount is a non-negative number between 0 and 16, inclusive (that
is 0 and 16 are valid shift amounts).
iii.Your program should assume that the initial bit pattern to be shifted
is in memory location x3200 and the shift amount is stored in memory
location x3201.
iv. Using those values, your program should perform the left shift and store
the result in memory location x3202.
v. Your program should start at memory location x3100.
vi. Note that when you shift a bit pattern n-bit to the left, you fill
the lowest n bits of the bit pattern with 0's.
vii.Example: The following is a snapshot of memory locations x3200 through
x3202 after the calculations described above have been performed.
The values at x3200 and x3201 are inputs and the value in x3202 is an
output.
Address Content
x3200 xD10B
x3201 x0005
x3202 x2160
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.238.170