9618 MJ 12 Q4b
9618 MJ 12 Q4b
9618 MJ 12 Q4b
Instruction
Explanation
Opcode Operand
AND #n Bitwise AND operation of the contents of ACC with the operand
AND <address> Bitwise AND operation of the contents of ACC with the contents of <address>
XOR #n Bitwise XOR operation of the contents of ACC with the operand
XOR <address> Bitwise XOR operation of the contents of ACC with the contents of <address>
OR #n Bitwise OR operation of the contents of ACC with the operand
OR <address> Bitwise OR operation of the contents of ACC with the contents of <address>
<address> can be an absolute address or a symbolic address
# denotes a denary number, e.g. #123
Bit Number 7 6 5 4 3 2 1 0
300 0 1 1 0 0 1 1 0
(i) The contents of memory address 300 represent an unsigned binary integer.
Write the denary value of the unsigned binary integer in memory address 300.
..................................................................................................................................... [1]
(ii) An assembly language program needs to test if bit number 2 in memory address 300
is a 1.
......................... #4
[1]
(iii) An assembly language program needs to set bit numbers 4, 5, 6 and 7 to 0, but keep
bits 0 to 3 with their existing values.
...........................................................................................................................................
..................................................................................................................................... [2]