Ask coding questions

← Back to all posts
Version of assembly
MocaCDeveloper (503)


What version of assembly does the gcc compiler compile?
I have a .s file and for some reason when I try to push the ebp(stack pointer), then move it into the esp register(a general purpose register), I get an error saying it's "too many instructions" or it "too many memory-to-memory" assignments.

I really don't know how I am going to push or move anything without being able to correctly use the ebp register and esp register. Some x86 assembly works, some x64 assembly works, and the tutorial I am following works with 32 bit assembly and uses movl and pushl. I am using the gcc compiler, but maybe I should switch?

I don't know. Any help would do. Thanks!

DynamicSquid (4359)

According to Wikipedia:

[..] whereas this would be written addl (%ebx),%eax in the AT&T syntax used by the GNU Assembler

MocaCDeveloper (503)

@DynamicSquid so instead of trying to use the ebp register I should use the ebx?

DynamicSquid (4359)

@MocaCDeveloper Well I don't know anything about Assembly lol, I just found that