The plus (+) indicates a more advanced problem and the asterisk (*) indicates that a solution is available on the Companion Website for the text.
*It is necessary to branch to ADRS if the bit in the least significant position of the operand in a 16-bit register is equal to 1. Show how this can be done with the TEST (Table) and BNZ (Table) instructions.
Table Typical Program Control Instructions
Name | Mnemonic |
Branch | BR |
Jump | JMP |
Call procedure | CALL |
Return from procedure | RET |
Compare (by subtraction) | CMP |
Test (by ANDing) | TEST |
Table Conditional Branch Instructions Relating to Status Bits in the PSR
Branch Condition | Mnemonic | Test Condition |
Branch if zero | BZ | Z = 1 |
Branch if not zero | BNZ | Z = 0 |
Branch if carry | BC | C = 1 |
Branch if no carry | BNC | C = 0 |
Branch if minus | BN | N = 1 |
Branch if plus | BNN | N = 1 |
Branch if overflow | BV | V = 1 |
Branch if no overflow | BNV | V = 0 |
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.