0

What's wrong with that simple code, I don't know what's happened, the push eax instruction occurs that error:

.386
.model flat, stdcall
.stack 4096

.data

.code       
_start:
    mov eax, 100
    push eax
    ret
end _start
Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
Lion King
  • 32,851
  • 25
  • 81
  • 143
  • 2
    `ret` pops a value from the stack and jumps to that address - in this case 100 or 0x64 which doesn't contain executable code. – tkausl Jun 05 '21 at 01:43
  • Also related: [Is pop eip legal instruction?](https://stackoverflow.com/q/56676840) = it's what `ret` is equivalent to. – Peter Cordes Jun 05 '21 at 01:54

0 Answers0