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

Assembly language programming: แบบฝึกหัด

ข้อปรนัย 5 ข้อ ตรวจให้ทันทีที่ตอบ และข้อเขียน 5 ข้อ พร้อมวิธีทำละเอียด ทั้งหมดจากเรื่อง Assembly language programming

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 วินาที

อยากฝึกโจทย์แบบนี้เพิ่มไหม เริ่มฝึกหัวข้อนี้ได้เลย ตรวจให้ทันทีทุกข้อ

เริ่มฝึกเลย