Add Fkey handling

This commit is contained in:
JJ Bliss
2026-05-05 11:16:28 -04:00
parent f5b5f76979
commit f69c0c9039
2 changed files with 15 additions and 7 deletions
+4 -1
View File
@@ -168,7 +168,7 @@ fn emu_dei(port: u8, state: *uxn) u8 = {
};
fn emu_deo(port: u8, value: u8, state: *uxn) void = {
export fn emu_deo(port: u8, value: u8, state: *uxn) void = {
// fmt::printfln("Writing {:x} to port {:x}", value, port)!;
state.dev[port] = value;
switch(port) {
@@ -176,6 +176,8 @@ fn emu_deo(port: u8, value: u8, state: *uxn) void = {
state.ptr[0] = value;
case 0x05 =>
state.ptr[1] = value;
case 0x0e =>
print_stack_debug(state);
case 0x11 =>
let high = state.dev[0x10];
let low = value;
@@ -422,6 +424,7 @@ fn get_instruction(byte: u8) (instruction | error) = {
};
export fn print_stack_debug(state: *uxn) void = {
//TODO follow standard form
fmt::println("Working Stack:")!;
print_stack(false,state);