Assembly Language
1. The following table shows part of the instruction set for a processor. The processor has two registers: the Accumulator (ACC) and an Index Register (IX).
Instruction | Explanation | |
|---|---|---|
Opcode | Operand | |
LDM | #n | Immediate addressing. Load the number n to ACC |
LDD | Direct addressing. Load the contents of the location at the given address to ACC | |
LDI | Indirect addressing. The address to be used is at the given address. Load the contents of this second address to ACC | |
LDX | Indexed addressing. Form the address from + the contents of the index register. Copy the contents of this calculated address to ACC | |
LDR | #n | Immediate addressing. Load the number n to IX |
ADD | #n/Bn/&n | Add the number n to the ACC |
ADD | Add the contents of the given address to the ACC | |
SUB | #n/Bn/&n | Subtract the number n from the ACC |
SUB | Subtract the contents of the given address from the ACC | |
INC | Add 1 to the contents of the register (ACC or IX) | |
| can be an absolute or a symbolic address # denotes a denary number, e.g. #123 B denotes a binary number, e.g. B01001010 & denotes a hexadecimal number, e.g. &4A |
The current contents of memory are shown:
Address | Data |
|---|---|
10 | 1 |
11 | 3 |
12 | 5 |
13 | 11 |
14 | 10 |
15 | 16 |
16 | 12 |
The current contents of the ACC and IX are shown:
ACC | 10 |
|---|---|
IX | 0 |
Complete the table by writing the content of the ACC after each program has run.
Program number | Instructions | ACC content |
|---|---|---|
1 | LDI 15 | |
2 | LDD 14 | |
3 | LDM #11 | |
4 | LDR #2 |
Ai এর মাধ্যমে
১০ লক্ষ+ প্রশ্ন ডাটাবেজ
প্র্যাকটিস এর মাধ্যমে নিজেকে তৈরি করে ফেলো
উত্তর দিবে তোমার বই থেকে ও তোমার মত করে।
সারা দেশের শিক্ষার্থীদের মধ্যে নিজের অবস্থান যাচাই
No related questions found