c++/rgb-assembler/commands/Goto.h
changeset 31 b997cbf9e30b
parent 29 10d6964e7b4a
child 33 ff150572e8c0
     1.1 --- a/c++/rgb-assembler/commands/Goto.h	Sun Dec 24 00:47:34 2017 +0100
     1.2 +++ b/c++/rgb-assembler/commands/Goto.h	Mon Dec 25 00:24:07 2017 +0100
     1.3 @@ -27,12 +27,11 @@
     1.4  class Goto : public Command {
     1.5  public:
     1.6  
     1.7 -	void process(octet_t* memory, address_t& index) override {
     1.8 -		index = read<address_t>(memory, index);
     1.9 +	void process(Memory &memory) override {
    1.10 +		address_t index = memory.read<address_t>();
    1.11 +		memory.setIndex(index);
    1.12  		wprintf(L"GOTO %*d\n", 5, index);
    1.13  	}
    1.14 -private:
    1.15 -
    1.16  };
    1.17  
    1.18  }