diff options
| author | iamcheeseman <[email protected]> | 2026-04-14 12:44:25 -0400 |
|---|---|---|
| committer | iamcheeseman <[email protected]> | 2026-04-14 12:44:25 -0400 |
| commit | ca004156cbb1c525900f444994112fc17b71d63d (patch) | |
| tree | 8d19ad7199044e4b11fde6725eb758917f317b4e /uscript/us_debug.c | |
| parent | 752d7967f3cccb4f43e1df7fd99d4944884fc977 (diff) | |
microscript: add globals
Diffstat (limited to 'uscript/us_debug.c')
| -rw-r--r-- | uscript/us_debug.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/uscript/us_debug.c b/uscript/us_debug.c index 496b191..6b981a4 100644 --- a/uscript/us_debug.c +++ b/uscript/us_debug.c @@ -56,6 +56,12 @@ int print_instruction(struct us_proto *proto, int idx) ); return idx + 2; } + case BC_GET_GLOBAL: + case BC_SET_GLOBAL: { + u16 loc = (u16)(proto->bytecode[idx + 1] << 8) | proto->bytecode[idx + 2]; + fprintf(stderr, "%d\n", loc); + return idx + 3; + } case BC_JMP: case BC_FALSEY_JMP: case BC_LOOP: { |
