Simulation of a CPU:
Memory
Registers
Enter your program below
LDC 0x10 R10 // destination pointer LDC 0x10 R4 // loop counter LDC 0x1 R11 // increment LDC 0xcc R12 // value to write ALU a R15 R15 R13 // save loop address ST R12 [R10] // write to memory ALU a+b R10 R11 R10 // compute next destination ALU a-b R4 R11 R4 // decrement loop counter JMP nz R4 R13 // loop HALT // end