Baldaux preta
This commit is contained in:
parent
494b59bcd2
commit
ae867cde3a
1 changed files with 4 additions and 0 deletions
|
@ -151,6 +151,7 @@ int disassemble8080(buffer* b, int pc, cJSON* json) {
|
||||||
for (int i = 0; i < operand_count; i++) {
|
for (int i = 0; i < operand_count; i++) {
|
||||||
cJSON *operand = cJSON_GetArrayItem(operands, i);
|
cJSON *operand = cJSON_GetArrayItem(operands, i);
|
||||||
cJSON *name = cJSON_GetObjectItem(operand, "name");
|
cJSON *name = cJSON_GetObjectItem(operand, "name");
|
||||||
|
cJSON *immediate = cJSON_GetObjectItem(operand, "immediate");
|
||||||
cJSON *bytes = cJSON_GetObjectItem(operand, "bytes");
|
cJSON *bytes = cJSON_GetObjectItem(operand, "bytes");
|
||||||
if (name != NULL && cJSON_IsString(name)) {
|
if (name != NULL && cJSON_IsString(name)) {
|
||||||
printf("Operand %d: %s", i + 1, name->valuestring);
|
printf("Operand %d: %s", i + 1, name->valuestring);
|
||||||
|
@ -158,6 +159,9 @@ int disassemble8080(buffer* b, int pc, cJSON* json) {
|
||||||
if (bytes != NULL && cJSON_IsNumber(bytes)) {
|
if (bytes != NULL && cJSON_IsNumber(bytes)) {
|
||||||
printf(", Bytes: %d", bytes->valueint);
|
printf(", Bytes: %d", bytes->valueint);
|
||||||
}
|
}
|
||||||
|
if (immediate != NULL && cJSON_IsBool(immediate)) {
|
||||||
|
printf(", Immediate: %s", cJSON_IsTrue(immediate) ? "true" : "false");
|
||||||
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue