Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
why does my solution always return 0?
registers are declared as global variables. Should I implement readReg / writeReg methods in my solution?
var reg = {'a':0,'b':0,'c':0,'d':0};
var stack = [];
function Machine(cpu) {
function exec(inst) {
console.log(inst);
const getArg = (arg) => /[0-9]+/.test(arg)? +arg : reg[arg];
}
return { exec }
}
Very good Kata!
...
Nice job, mr.MindWanderer!
I think this Kata has some mistakes(
8.88 * 7.96 is less then 7.48 * 1.91 ?