Chapter 5 & 7
Assembly Language I
Trivia Questions
Assembly Language II
Assembly Language III
100

Control System is to _____________, while Monitoring System is to ________________.

Actuator and Sensors

100

How does this code work?

MOV EAX, 4

MOV EBX, 1

MOV ECX, "9"

MOV EDX, 1

INT 0X80

A NASM code that prints the value 9

100

Which horror game features a character named Pyramid Head?

Silent Hill 2

100

Assume ACC value is: 01 0 1 0 0 1 1 

What is the new ACC value when we perform: 

OR #51

Assembler

100

Assume ACC value is: 01000110

What is the new ACC value when we perform: 

LSR #3

00001000

200

What is the purpose of Control Unit

Direct the operation of the processor.

Manage and coordinate the operations of the CPU, 

Act as the "brain" of the computer, directing and coordinating the operation of all other parts of the computer

Handle all processor control signals, fetching code for instructions and providing control and timing signals

200

What type of addressing mode is LDI? 

Indirect Addressing Mode

200

What dog breed has a blue tongue?

Chow-chow / Shar Pei

200

Differentiate between Symbolic, Relative, and Absolute addressing

Symbolic doesn't use memory addresses

Relative uses a Base Register

Absolute uses the actual memory addresses

200

Now you know how LDD, LDI, LDM, LDX work, explain how CMP, CMI, work? 

CMP is direct addressing. You compare the accumulator to its corresponding operand, which is an address.

CMI is indirect addressing. You compare the accumulator to its corresponding operand, which is an address of the address of that value.

300

Write the Fetch-decode-execute cycle using register translation notation.

MAR ← [PC]

PC ← [PC] + 1

MDR ← [[MAR]]

CIR ← [MDR]

300

How does this code work?

MOV EAX, 3

MOV EBX, 0

MOV ECX, char

MOV EDX, 255

INT 0X80

NASM code used to get user inputs

300

In ‘Monsters, Inc.’, what powers the city of Monstropolis?

Children's screams

300

Find the error and why.

A. LDD 1001

B. LDX 1002

C. LDM 1003

LDM 1003, because operand should not be an address but the actual value itself.

300

What is the value of the latest accumulator:

Address | 100 | 101 | 110 | 111

Data      |   0   |   0  |  51  |  65

Index Register : 1

Instruction:

LDR #1 ; STO 101 ; LDX 110 ; CMP 100; JPE 21; LDM #16

16

400

Bonus: Why was there a gap of 16 years between a World Cup Tournament? 

World War II

400

Describe the four types of addressing modes

Direct - direct addressing. Load contents of that address into the accumulator.

Index- Use the address based on the summed up address of the operand and the value in the index register

Immediate - load value immediately into the accumulator.

Indirect - indirect addressing. Load contents of a memory location whose address is stored in the operand. 

400

 What is the only number that is both the sum and product of three consecutive positive integers?

6

400

Assume ACC value is: 10110110

What is the new ACC value when we continuously perform these instructions:

LSL #2

OR #37

LSR #2

XOR #22

LSL #2 - 11011000

AND #37 - 11111101 

LSR #2 - 00111111 

XOR #22 - 00101001

400

Assume ACC value is: 0 0 1 1 0 1 1 0 

What is the new ACC value when we continuously perform these instructions: 

AND B01001100 

LSL #1

XOR #103

LSR #2

AND B01001100 - 00000100 

LSL #1 - 00001000 

XOR #103 - 01101111 

LSR #2 - 00011011

500

Ann has a farm and is using a robot to harvest her bell peppers. State one device that would be used for the monitoring system and control system and explain how they are applied.

Infrared Sensor

Motion Sensor

Actuators (Robotic Arm, Wheels)

Infrared sensor is used to identify the shape of the fruit if it is ready to harvest. Motion sensor is used to detect any movements upon pick-up. Actuators is used to collect the bell peppers.

500

Identify the operand of the following opcode:

LDD - 

CMP -

LDX - 

LDM/LDR - 

INC -

LDD - address

CMP - denary number

LDX - address

LDM/LDR - denary number

INC - register

500

What is the largest desert in the world?

Antarctica / Antarctic Polar Desert

500
There are at least 5 instruction group such as Data Movement Group. Give the other 4 instruction groups.

Arithmetic Group

Bitwise Group

Conditional Group

Shift Operations

500

What is the value of the latest accumulator:

Memory   |  21   |   100   | 101  | 110   | 111

Address   |  end  |   100   |   0   | 100   |  65

Index Register : 1

Instructions:

LDR #1 ; STO 101 ; LDX 110 ; CMP 100; JPE 21; LDM #5

1

M
e
n
u