We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The sv command, even the one copied from the readme, does not appear to function. The following occurs on my system:
Enter a command: sv 100000011000000000000000000000000000 16: 111111111111111111111111111111111111spot▒╩Üc▄ε
The below modification to the code appears to fix things:
else if(memcmp(buff,"sv",2) == 0) { char instruction_string[WORD_SIZE]; memset(instruction_string, 0, WORD_SIZE); if (read_size > 3) memcpy(instruction_string, buff+3, WORD_SIZE < read_size-3 ? WORD_SIZE : read_size-3); int *byte_value; byte_value = (int*) malloc(WORD_SIZE*sizeof(int)); byte_value_from_string(instruction_string,byte_value,WORD_SIZE); for(int i=0; i<WORD_SIZE; i++) Machine_Memory[pc.current_address][i] = byte_value[i]; set_address(&pc,pc.current_address,Machine_Memory); free(byte_value); char* memory_value = (char*) malloc(WORD_SIZE); byte_value_to_string(Machine_Memory[pc.current_address], memory_value, WORD_SIZE); fprintf(stdout, "%d: %s\n",pc.current_address, memory_value); free(memory_value); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The sv command, even the one copied from the readme, does not appear to function. The following occurs on my system:
The below modification to the code appears to fix things:
The text was updated successfully, but these errors were encountered: