added printing instruction (broken)

This commit is contained in:
Jeeves 2024-04-24 08:13:45 -06:00
parent 9257ce6074
commit 700b9dcc3f
2 changed files with 63 additions and 1 deletions

View file

@ -2,6 +2,7 @@ const std = @import("std");
const silkdot = @import("silkdot");
const Uxn = @import("uxn.zig");
const UxnFmt = @import("uxn-instructions.zig");
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
@ -35,7 +36,7 @@ pub fn main() !void {
// },
// else => {},
// };
std.debug.print("{any} {X}\n", .{ uxn.pc, uxn.mem.m[uxn.pc] });
std.debug.print("pc={X} code={X} op={s}\n", .{ uxn.pc, uxn.mem.m[uxn.pc], UxnFmt.fmtInstrs(uxn.mem.m[uxn.pc .. uxn.pc +% 1]) });
if (uxn.eval()) running = false;
// try term.draw();
}