; This simple ASM program increments register 1 until it is equal to 15, ; and then stops the CPU. LOAD r0, 1 ; Store the number to increment by. In this case, it is simply just 1. LOAD r2, 15 ; Store the goal number. In this case, it is 15. ; Define the loop logic. @MyLoop: ADD r1, r0, r1 ; Add the increment number to register 1. CMP r1, r2 ; Compare register 1 and register 2. JNZ @MyLoop ; If the `cmp` flag is not 0, jump to @MyLoop. HLT ; Stop the CPU.