5 #include "../Command.h"
9 class GotoCompare : public Command {
12 void process(octet_t* memory, address_t& index) override {
13 address_t aa = read<address_t>(memory, index);
14 address_t ab = read<address_t>(memory, index);
15 address_t eq = read<address_t>(memory, index);
16 address_t gt = read<address_t>(memory, index);
17 address_t lt = read<address_t>(memory, index);
19 octet_t a = read<octet_t>(memory, aa);
20 octet_t b = read<octet_t>(memory, ab);
22 if (a == b) index = eq;
23 else if (a > b) index = gt;
26 wprintf(L"GOTO COMPARE a = %02X, b = %02X, eq = %d, gt = %d, lt = %d → %d\n", a, b, eq, gt, lt, index);