From e2abb1c3f813e3386551dbe663484d87b3a6aefd Mon Sep 17 00:00:00 2001 From: Ry Date: Wed, 27 Jul 2022 14:00:53 -0700 Subject: [PATCH] Reset the stack pointer after seeding the RNG --- main.asm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.asm b/main.asm index f7209b5..9c994b9 100644 --- a/main.asm +++ b/main.asm @@ -29,7 +29,10 @@ entry_seed_loop: entry_seed_done: mov [RANDOM_STATE], r0 - ; set up the vsync interrupt + ; set the stach pointer again to pop the return address and flags off the stack + mov rsp, SYSTEM_STACK + + ; set the interrupt vector for interrupt 0xFF - vsync mov [0x000003FC], system_vsync_handler ise