Highlights
The purpose of this exercise is to familarise yourself with the CdM-8 development environment.
You are given a program that includes a commented-out sequence of CdM-8 instructions that will compute the following if they are executed:
mem[0x30] = mem[0x20] + mem[0x21]
Where mem[0x20], mem[0x21] and mem[0x30] refer to the memory cells at addresses 0x20, 0x21 and 0x30
To do so it uses the following algorithm
r0 = 0x20 # Put the number 0x20 into register r0
r1 = mem[r0] # Copy the contents of the memory location pointed at by r0 into r1
r0 = 0x21 # Put the number 0x21 into register r0
r2 = mem[r0] # Copy the contents of the memory location pointed at by r0 into r1
r2 = r1 + r2 # Add the contents of r1 to r2
r0 = 0x30 # Put the number 0x30 into register r0 mem[r0] = r2 # Copy the contents of r2 to the memory location pointed at by r0
Use the solution template provided in 7COM1013.asm-T00L1e01.asm. This template includes a working solution, which is commented out. Uncomment the instructions to make the program a working solution.
This IT Computer Science has been solved by our PhD Experts at My Uni Paper.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.