Fixed dotw

This commit is contained in:
JJ Bliss
2026-05-06 12:55:52 -04:00
parent e8df70a387
commit a98819e759
2 changed files with 14 additions and 4 deletions
+2 -2
View File
@@ -148,7 +148,7 @@ fn emu_dei(port: u8, state: *uxn) u8 = {
return time::date::second(&date): u8;
case 0xc7 =>
const date = time::date::localnow();
return time::date::weekday(&date): u8;
return (time::date::weekday(&date): u8 + 1) % 7;
case 0xc8 =>
const date = time::date::localnow();
const day = time::date::yearday(&date) - 1;
@@ -848,7 +848,7 @@ export fn uxn_step(state: *uxn) (done | error) = {
// /* STH */ OPC(0x0f,GOT(x),PUT(x,!r))
case let sth_inst: STH =>
let val = pop_or_get(sth_inst,0,state);
const val = pop_from_stack(sth_inst.keep,sth_inst.ret,sth_inst.short,state);
push_to_stack(!sth_inst.ret, val, state);
// /* LDZ */ OPC(0x10,POx(a,0),PEK(a, x, 0xff))
case let ldz_inst: LDZ =>