diff options
| author | Peter Mikkelsen <petermikkelsen10@gmail.com> | 2026-05-16 10:59:21 +0200 |
|---|---|---|
| committer | Peter Mikkelsen <petermikkelsen10@gmail.com> | 2026-05-16 10:59:21 +0200 |
| commit | d86f31325ca1343355f81918f0ad449f8788baa1 (patch) | |
| tree | 277f2a324bd0f6b3d85ba4df693c05722934badf /lib/eval.c | |
| parent | 3b0ed8d3296efd16e422e66168dab66399f60776 (diff) | |
Commit work in progress changes
Diffstat (limited to 'lib/eval.c')
| -rw-r--r-- | lib/eval.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -19,13 +19,23 @@ */ #include <stdio.h> +#include <inttypes.h> #include <aplwc.h> #include "aplwc_internal.h" void aplwc_eval(struct aplwc_eval_context *context) { - struct aplwc_syscmd *syscmd; + struct aplwc_instr instr; + for(size_t i = 0; i < context->instrs->n_instrs; i++){ + instr.encoded = context->instrs->instrs[i]; + aplwc_decode_instr(&instr); + + printf("INSTR: 0x%016" PRIX64 " type=%02x op=%04x\n", instr.encoded, instr.type, instr.op); + } + + +/* struct aplwc_syscmd *syscmd; switch(context->ast->tag){ case APLWC_AST_SYSCMD: @@ -35,4 +45,5 @@ aplwc_eval(struct aplwc_eval_context *context) case APLWC_AST_ERROR: printf("cannot evaluate since parsing failed\n"); } +*/ } |