commands in hexadecimal
authorFrantišek Kučera <franta-hg@frantovo.cz>
Thu, 21 Dec 2017 17:22:55 +0100
changeset 5e0a48e475a77
parent 4 b589459129a9
child 6 d55ac7dbc2e6
commands in hexadecimal
c++/rgb-assembler/rgb-assembler.cpp
     1.1 --- a/c++/rgb-assembler/rgb-assembler.cpp	Thu Dec 21 17:18:22 2017 +0100
     1.2 +++ b/c++/rgb-assembler/rgb-assembler.cpp	Thu Dec 21 17:22:55 2017 +0100
     1.3 @@ -11,9 +11,9 @@
     1.4  
     1.5  const address_t MEMORY_SIZE = 1024;
     1.6  
     1.7 -const command_t CMD_GOTO = 100;
     1.8 -const command_t CMD_SLEEP = 101;
     1.9 -const command_t CMD_END = 102;
    1.10 +const command_t CMD_GOTO = 0x70;
    1.11 +const command_t CMD_SLEEP = 0xFF;
    1.12 +const command_t CMD_END = 0xED;
    1.13  
    1.14  /**
    1.15   * Reads the command on given position in memory and increments the index (position).
    1.16 @@ -73,7 +73,7 @@
    1.17  	for (address_t i = 0; i < MEMORY_SIZE;) {
    1.18  		wprintf(L"command %d = ", i);
    1.19  		command_t ch = readCommand(memory, i);
    1.20 -		wprintf(L"%d\n", ch);
    1.21 +		wprintf(L"%X\n", ch);
    1.22  
    1.23  		string command;
    1.24