Oxford AQA International A-level · Computer Science (9645)

組合語言程式設計:練習題

5 條多項選擇題即時批改,另有 5 條文字題附完整解題步驟,全部圍繞「組合語言程式設計」。

10 條題目26 免費,無需登記
第 1 題
1

Which of the following statements correctly distinguishes between assembly language and machine code?

第 2 題
1

Register R1 currently holds the value 15 and register R2 holds the value 10. Trace the following instructions:

ADD R1, R1, R2
SUB R1, R1, #3

What is the final value stored in R1?

第 3 題
1

Trace the following assembly code snippet to determine the final value in register R1:

MOV R1, #0
MOV R2, #3
loop:
ADD R1, R1, R2
SUB R2, R2, #1
CMP R2, #0
BNE loop

第 4 題
1

In the context of a processor's instruction set, which part of an assembly language instruction specifies the actual operation to be performed by the CPU?

第 5 題
1

Which logical bitwise instruction and mask should be used to ensure that the least significant bit (bit 0) of an 8-bit value in register R1 is set to 0, while all other bits remain unchanged?

第 6 題
2

Define the term immediate addressing as it is used within an assembly language instruction format.

先自己寫一次答案,再對照解題步驟。

第 7 題
4

Contrast direct addressing and indirect addressing by explaining how the processor identifies the data to be operated on in each mode.

先自己寫一次答案,再對照解題步驟。

第 8 題
5

A programmer uses a logical shift left operation by 3 places on an 8-bit register containing the value \( 00000101_2 \).
State the resulting bit pattern and explain the mathematical effect this has on the original denary value.

先自己寫一次答案,再對照解題步驟。

第 9 題
4

Assembly language is a low-level programming language that uses mnemonics to represent machine code instructions specific to a processor.

(a) Define the term instruction set.
(b) Describe the difference between immediate addressing and direct addressing.
(c) Identify the opcode and the operand in the following assembly instruction:
LDR \(R1\), 100

先自己寫一次答案,再對照解題步驟。

第 10 題
6

A programmer is required to convert a high-level selection structure into assembly language for the OxfordAQA processor.

(a) Write the equivalent assembly language code for the following pseudocode:
IF (\(R1\) > \(R2\)) THEN
    \(R1\) = \(R1\) - \(R2\)
ENDIF


(b) Explain how indirect addressing is used in an instruction such as LDR \(R1\), [\(R2\)].
(c) Describe how the Status Register (SR) is involved in the execution of the CMP and conditional branch instructions used in your answer to part (a).

先自己寫一次答案,再對照解題步驟。

* thinka提供的內容由AI生成,可能並非總是準確或最新。請將其用作輔助資源,並與官方材料進行核實。

你已看過標準答案,接下來輪到批改你的答案。

這一頁可以告訴你好答案的樣子,卻無法指出你的答案欠缺什麼。thinka 按真實評分準則批改你的文字答案,約 15 秒完成。

想多做幾條同類題目?立即開始練習呢個課題,即做即批改。

立即練習