Write a program for the 11-instruction ISA below (one instruction or data byte per line, 16 bytes total), then assemble and load it.
Ready. Write a program and click "Assemble & Load".
NOP no operation LDA addr A = RAM[addr] ADD addr A = A + RAM[addr] (sets flags) SUB addr A = A - RAM[addr] (sets flags) STA addr RAM[addr] = A LDI value A = value (immediate, 0-15) JMP addr PC = addr JC addr PC = addr, only if the carry flag is set JZ addr PC = addr, only if the zero flag is set OUT output register = A HLT halt the clock addr/value are 0-15 (this machine has 16 bytes of RAM total). Flags are only updated by ADD/SUB — not by LDA/LDI — matching the real hardware, so JC/JZ only make sense right after an ADD or SUB.