stupidcomputer
38877d36ab
added more tests to the ISA -- covers all the instructions except RST (reset). fixed a bug in the ISA -- when comparing two numbers, we really compared their pointers. in C, it's the difference between ``` int a = 10; int b = 12; int *ap = &a; int *bp = &b; if (ap < bp) { /* do stuff */ } ``` the problem is that you're comparing the pointers, *not* the values they refer to. it instead should be like if (*ap < *bp) { /* do stuff */ } because you need to *dereference* the value before comparing. that's what happens in cli/data/computer.py now. |
||
---|---|---|
.. | ||
__init__.py | ||
computer.py | ||
testing.py |