aboutsummaryrefslogtreecommitdiff
path: root/pu3/pu3.cpu.c
diff options
context:
space:
mode:
authorGravatar Moon Flower <moon@coffin.ir> 2025-08-27 19:21:05 +0330
committerGravatar Moon Flower <moon@coffin.ir> 2025-08-27 19:21:05 +0330
commit744cad1aab255a0b1ab2bd2c34e00e2ec66d3613 (patch)
treeb4a3d68b1818b45f6072c1decdaf3a7f717d624c /pu3/pu3.cpu.c
parentpu3 poc3 (diff)
pu3 poc4
Diffstat (limited to 'pu3/pu3.cpu.c')
-rw-r--r--pu3/pu3.cpu.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/pu3/pu3.cpu.c b/pu3/pu3.cpu.c
index 0597027..312b5a8 100644
--- a/pu3/pu3.cpu.c
+++ b/pu3/pu3.cpu.c
@@ -239,7 +239,12 @@ double bench_cycle(byte instr, pu3_ctx ctx) {
set_data_u16(ctx.memory.memory_u64[ i ], 2);
set_dest_u32(ctx.memory.memory_u64[ i ], 4);
- if (i == ctx.mem_size - 20) set_scroll_byte(ctx.memory.memory_u64[ i ], 1);
+ if (i == ctx.mem_size - 20) {
+ let j = 0;
+ for (j = 0; j < 20; j++) {
+ set_scroll_byte(ctx.memory.memory_u64[ ctx.mem_size - j ], 1);
+ }
+ }
}
set_scroll_byte(ctx.memory.memory_u64[ i ], 0);
*ctx.pc = 8;