diff -r 78c4d6b53499 -r ff150572e8c0 c++/rgb-assembler/commands/GotoCompare.h --- a/c++/rgb-assembler/commands/GotoCompare.h Mon Dec 25 00:34:27 2017 +0100 +++ b/c++/rgb-assembler/commands/GotoCompare.h Mon Dec 25 01:27:44 2017 +0100 @@ -34,13 +34,8 @@ address_t gt = memory.read(); address_t lt = memory.read(); - address_t originalAddress = memory.getIndex(); - // TODO: add to Memory methods read(address_t) and write(address_t, T) - memory.setIndex(aa); - octet_t a = memory.read(); - memory.setIndex(ab); - octet_t b = memory.read(); - memory.setIndex(originalAddress); + octet_t a = memory.read(aa); + octet_t b = memory.read(ab); address_t index; @@ -48,7 +43,7 @@ else if (a > b) index = gt; else index = lt; - memory.setIndex(index); + memory.setAddress(index); wprintf(L"GOTO COMPARE a = %02X, b = %02X, eq = %d, gt = %d, lt = %d → %d\n", a, b, eq, gt, lt, index); }