Contents > General-purpose Computer > Assembly Language
A transfer instruction copies an 8-bit source register to an 8-bit destination register. Its format is:
T(source)(destination)
where source,destination ∈ { A, B, M, N } and source ≠ destination.
Each transfer instruction corresponds to an opcode with bits 0000ssdd, where ss and dd are one of the values below.
| Value | Register |
|---|---|
| 00 | A |
| 01 | B |
| 10 | M |
| 11 | N |
The twelve transfer instructions follow.
| Instruction | Name | Pseudocode | Opcode |
|---|---|---|---|
| TAB | Transfer A to B | B = A; | 01 |
| TAM | Transfer A to M | M = A; | 02 |
| TAN | Transfer A to N | N = A; | 03 |
| TBA | Transfer B to A | A = B; | 04 |
| TBM | Transfer B to M | M = B; | 06 |
| TBN | Transfer B to N | N = B; | 07 |
| TMA | Transfer M to A | A = M; | 08 |
| TMB | Transfer M to B | B = M; | 09 |
| TMN | Transfer M to N | N = M; | 0B |
| TNA | Transfer N to A | A = N; | 0C |
| TNB | Transfer N to B | B = N; | 0D |
| TNM | Transfer N to M | M = N; | 0E |
The transfer instructions do not affect the flags.
© 2023 meatfighter.com |