Writing Low Level Programs

Total Page:16

File Type:pdf, Size:1020Kb

Writing Low Level Programs

TEJ 4M Writing Low Level Programs

Write complete programs with documentation to answer the following questions. The documentation should be written in sentence form where the commands themselves are clearly explained. You should try and use the microprocessor simulator to check your solutions.

1. Add the hex number AB with 12.

2. Load the accumulator with 84 and then move that value to the B register.

3. Load the accumulator with base 10 number 55. Add 5 to this number and store it at location 4556.

4. Load the contents of two memory locations into registers C and D. Add the contents of these registers and store the answer at address 9ABC.

5. Add the contents of memory location 130F and 1310 and store the result at address 9ABC.

6. Load registers L and H with two numbers. Subtract the contents of register L from H and store the answer in the accumulator.

7. Load the contents at memory location FFF0 into register D and load the contents of memory location FFF1 in register E. Add these values together and store the contents in memory location FFFF.

8. Store the integers from 1 to 10 in the accumulator one at a time.

9. Count from 1 to 5 and store these integers in memory locations from 2030 to 2034.

10. Add the hex values from 8 through E and store the result at memory location 8100.

Advanced:

11. Add the 10 numbers that are stored in 10 consecutive memory locations starting at location 3000. Store the answer at memory location 4000.

12. Move the 5 bytes that are stored at memory location 0250 through 0254 to memory location 0300 through 0304.

13. Write a program that will store two hundred and fifty-six Fs in 256 consecutive memory locations.

Recommended publications