flat assembler
Message board for the users of flat assembler.

Index > Linux > multiple regs in push with error: illegal instruction

Author
Thread Post new topic Reply to topic
catafest



Joined: 05 Aug 2010
Posts: 124
catafest
Can you help me with this error and why this is happened ? Thank you.
Code:
[mythcat@desk fasm]$ ./fasm 001.fasm 001
flat assembler  version 1.73.27  (16384 kilobytes memory)
source\Linux\system.inc [104]:
        push    esi edi ebp
processed: push esi edi ebp
error: illegal instruction.    

The source code in FASM is:
Code:
format  ELF64

include 'source\Linux\system.inc'
...    
Post 22 Jun 2021, 20:22
View user's profile Send private message Visit poster's website Yahoo Messenger Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 18221
Location: In your JS exploiting you and your system
revolution
In 64-bit mode (ELF64) it is not possible to push a 32-bit value.

You can only push 16-bit and 64-bit values.
Code:
use64
push ax ; okay
push rax ; okay
push eax ; invalid, cannot be encoded in 64-bit mode    
Post 23 Jun 2021, 00:36
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.