Answers To Tutorial 1
Answers To Tutorial 1
1. The term destination means where we copy data to. This term is usually used
with accumulator A and accumulator B.
2. The term immediate addressing means that the value following immediately
after the symbol # is taken to be a number.
3. The word hexadecimal is often abbreviated to h.
4. a) LD #FFh, A ; Incorrect. Should be LD #0FFh, A
b) LD #70h, B. ; Correct.
c) LD #0E0h, A ; Correct.
d) LD #66h, C ; Incorrect. There is no accumulator C.
e) LD #222h ; Incorrect. Missing destination.
f) LD #0E3, B ; Incorrect. Missing letter h.
5. To store the value 100h in auxiliary register AR6 we write:
STM #100h, AR6
6. a) LD #7Fh, B ; Accumulator B now contains 0000007Fh
b) LD 7Fh, B ; Accumulator B now contains contents of
; data memory address 7Fh.
7. a) LD 123h, A ; Incorrect. Must be in range 0h to 7Fh.
b) LD -23, B ; Incorrect. Negative operand.
c) LD 28h, A ; Correct.
d) LD 127, B ; Correct.
e) LD 128, B ; Incorrect. Operand greater than 127.
f) LD 14h ; Incorrect. Missing operand.
8. The term data memory address can be abbreviated to dmad.
9. At power up, the data memory page pointer (DP) is not initialised to any
particular value This means that before direct addressing is used, the data
memory page pointer must be initialised to a known value.
10. On page 0, memory locations 0 to 5Fh are reserved for memory mapped
registers, including auxiliary register AR0 to AR7. This means these registers
are not available for general purpose.
11. To write #1000h to data memory address 230h we write:
LD #4, DP ; Gain access to 200h to 27Fh.
ST #1000h, 30h ; Store 1000h at 200 + 30h.
12. To store the contents of an accumulator in data memory we use the instructions
STL and STH. We can use either order of instructions, but using STL followed
by STH maintains compatibility with the TMS320C5000 C compiler.
13. The instruction LD (load) uses either accumulator A or accumulator B as the
destination. The instruction ST (store) uses a data memory address or an
auxiliary register as the destination.