From ca004156cbb1c525900f444994112fc17b71d63d Mon Sep 17 00:00:00 2001 From: iamcheeseman Date: Tue, 14 Apr 2026 12:44:25 -0400 Subject: microscript: add globals --- uscript/us_debug.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'uscript/us_debug.c') 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: { -- cgit v1.3-2-g0d8e