Kyllingene / vc64

An experimental virtual console using x86-64 assembly
0 stars 1 forks source link

`windows_main.asm` gives STATUS_ACCESS_VIOLATION #5

Closed Kyllingene closed 2 years ago

Kyllingene commented 2 years ago

Describe the bug Something in about running the Windows build generates the following error a couple seconds after the window appears:

error: process didn't exit successfully: `target\debug\vc64.exe` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)

To Reproduce Steps to reproduce the behavior:

  1. Pull the latest changes
  2. Execute cargo run in a valid Windows environment
  3. See error

Desktop (please complete the following information):

Potential fixes The issue is most likely me mishandling the stack/calling convention in src/windows_main.asm, but it may also have something to do with the janky trickery in src/main.rs:93.

Kyllingene commented 2 years ago

ooor maybe it's just me forgetting to save/restore the stack pointer. Whoops.