Fixed a bug where CMP REG, REG wouldn't get encoded and a disassembler bug related to said CMP bug.
This commit is contained in:
+3
-2
@@ -32,8 +32,9 @@ void Disassemble(unsigned char image[HIGHMEMORY]) {
|
||||
IsRegisterPattern(instruction & 0x07, parameter1);
|
||||
unsigned char parameterType = instruction & 0x18;
|
||||
|
||||
if (!parameterType) {
|
||||
IsRegisterPattern(Image[position], parameter2);
|
||||
if (parameterType == REGMASK) {
|
||||
IsRegisterPattern(Image[position + 1], parameter2);
|
||||
position += 2;
|
||||
} else if (parameterType == CONSTMASK) {
|
||||
snprintf(parameter2, sizeof(char) * 31, "%d", Image[position + 1] + Image[position + 2]);
|
||||
position += 3;
|
||||
|
||||
Reference in New Issue
Block a user