c++/rgb-assembler/commands/Goto.h
author František Kučera <franta-hg@frantovo.cz>
Sat, 23 Dec 2017 23:24:51 +0100
changeset 20 b9ceffdcaf14
child 29 10d6964e7b4a
permissions -rw-r--r--
move memory functions to a header file + introduce Command classes
franta-hg@20
     1
#pragma once
franta-hg@20
     2
franta-hg@20
     3
#include <wchar.h>
franta-hg@20
     4
franta-hg@20
     5
#include "../Command.h"
franta-hg@20
     6
franta-hg@20
     7
namespace commands {
franta-hg@20
     8
franta-hg@20
     9
class Goto : public Command {
franta-hg@20
    10
public:
franta-hg@20
    11
franta-hg@20
    12
	void process(octet_t* memory, address_t& index) override {
franta-hg@20
    13
		index = read<address_t>(memory, index);
franta-hg@20
    14
		wprintf(L"GOTO %*d\n", 5, index);
franta-hg@20
    15
	}
franta-hg@20
    16
private:
franta-hg@20
    17
franta-hg@20
    18
};
franta-hg@20
    19
franta-hg@20
    20
}