Jump to content

Execute Computer/Zero: Difference between revisions

m
change debugging display
m (change debugging display)
Line 202:
while compzero.isready
instruction = compzero.ram[compzero.ip]
opcode, operand = instruction >> 5 + 1, instruction & 0b00011111
debug && println("op ", $(instructions[opcode]), operand $operand")
step[opcode](compzero)
opcode == 8 && break
end
return compzero.accum
end
run(program::Vector, debug = false) = run(ComputerZero(program), debug)
 
function compile(text::String)
Line 223:
push!(bin, parse(UInt8, m.match))
else
error("Compilation error in at line $lines: error parsing <$line>")
end
end
4,106

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.