1.1 --- a/c++/rgb-assembler/rgb-assembler.cpp Sat Dec 23 23:42:46 2017 +0100
1.2 +++ b/c++/rgb-assembler/rgb-assembler.cpp Sat Dec 23 23:45:27 2017 +0100
1.3 @@ -10,6 +10,7 @@
1.4 #include "Command.h"
1.5 #include "commands/Goto.h"
1.6 #include "commands/Sleep.h"
1.7 +#include "commands/End.h"
1.8
1.9 using namespace std;
1.10
1.11 @@ -114,6 +115,7 @@
1.12 unordered_map<command_t, shared_ptr < Command>> commands = {
1.13 {CMD_GOTO, make_shared<commands::Goto>()},
1.14 {CMD_SLEEP, make_shared<commands::Sleep>()},
1.15 + {CMD_END, make_shared<commands::End>()},
1.16 };
1.17
1.18 for (address_t i = 0; i < MEMORY_SIZE;) {
1.19 @@ -170,12 +172,6 @@
1.20 wprintf(L"GOTO COMPARE a = %02X, b = %02X, eq = %d, gt = %d, lt = %d → %d\n", a, b, eq, gt, lt, i);
1.21 break;
1.22 }
1.23 - case CMD_END:
1.24 - {
1.25 - wprintf(L"END\n");
1.26 - i = MEMORY_SIZE;
1.27 - break;
1.28 - }
1.29 default:
1.30 {
1.31 wprintf(L"invalid command\n");