diff --git a/disassembler.c b/disassembler.c index ab72504..6dfc525 100644 --- a/disassembler.c +++ b/disassembler.c @@ -151,6 +151,7 @@ int disassemble8080(buffer* b, int pc, cJSON* json) { for (int i = 0; i < operand_count; i++) { cJSON *operand = cJSON_GetArrayItem(operands, i); cJSON *name = cJSON_GetObjectItem(operand, "name"); + cJSON *immediate = cJSON_GetObjectItem(operand, "immediate"); cJSON *bytes = cJSON_GetObjectItem(operand, "bytes"); if (name != NULL && cJSON_IsString(name)) { 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)) { printf(", Bytes: %d", bytes->valueint); } + if (immediate != NULL && cJSON_IsBool(immediate)) { + printf(", Immediate: %s", cJSON_IsTrue(immediate) ? "true" : "false"); + } printf("\n"); } }