c++/rgb-assembler/rgb-assembler.cpp
changeset 24 e24883b00180
parent 23 e85d2bfaff73
child 25 5ce09de7f9b7
     1.1 --- a/c++/rgb-assembler/rgb-assembler.cpp	Sat Dec 23 23:45:27 2017 +0100
     1.2 +++ b/c++/rgb-assembler/rgb-assembler.cpp	Sat Dec 23 23:47:37 2017 +0100
     1.3 @@ -11,6 +11,7 @@
     1.4  #include "commands/Goto.h"
     1.5  #include "commands/Sleep.h"
     1.6  #include "commands/End.h"
     1.7 +#include "commands/Color.h"
     1.8  
     1.9  using namespace std;
    1.10  
    1.11 @@ -116,6 +117,7 @@
    1.12  		{CMD_GOTO, make_shared<commands::Goto>()},
    1.13  		{CMD_SLEEP, make_shared<commands::Sleep>()},
    1.14  		{CMD_END, make_shared<commands::End>()},
    1.15 +		{CMD_COLOR, make_shared<commands::Color>()},
    1.16  	};
    1.17  
    1.18  	for (address_t i = 0; i < MEMORY_SIZE;) {
    1.19 @@ -133,15 +135,6 @@
    1.20  		}
    1.21  
    1.22  		switch (command) {
    1.23 -			case CMD_COLOR:
    1.24 -			{
    1.25 -				led_t led = read<led_t>(memory, i);
    1.26 -				color_t r = read<color_t>(memory, i);
    1.27 -				color_t g = read<color_t>(memory, i);
    1.28 -				color_t b = read<color_t>(memory, i);
    1.29 -				wprintf(L"COLOR  %02X %02X %02X → %d\n", r, g, b, led);
    1.30 -				break;
    1.31 -			}
    1.32  			case CMD_INCREMENT:
    1.33  			case CMD_DECREMENT:
    1.34  			{