1

I am new with assembly. Trying to port the assembly written in Intel syntax to X86 assembly syntax. I am done with almost all the required statements. But can't find any way to port the below call in Intel Syntax

call [ebp+16]

to X86 assembly syntax. Based on google I get the below statement for x86

call label

Is it possible to do something like "call 16(%ebp)" in X86 assembly? If so what are the ways to do so?

rkhb
  • 14,159
  • 7
  • 32
  • 60
user804195
  • 31
  • 1
  • That syntax should work, although it does give a warning. Indirect calls/jumps should have a `*`, so `call *16(%ebp)`. – Jester Dec 17 '15 at 12:00
  • 2
    Your trying to convert from x86 Intel syntax to x86 AT&T syntax. – Gunner Dec 17 '15 at 12:01
  • Also note that most GNU tools can be switched to intel syntax, and that you can convert between syntaxes if you assemble using one and disassemble using the other. – Jester Dec 17 '15 at 12:03
  • Since, I think, gcc 2.10 you can also just use the [`.intel_syntax`](https://sourceware.org/binutils/docs/as/i386_002dVariations.html#i386_002dVariations) directive – J... Dec 17 '15 at 12:04
  • http://stackoverflow.com/a/9347957/327083 – J... Dec 17 '15 at 12:04
  • Thanks for all the reply. I was getting an error "unknown use of instruction mnemonic without a size suffix". The solution given by Jester solved the issue. – user804195 Dec 17 '15 at 12:56
  • Can't you just use YASM or NASM? GNU `as` with `.intel_syntax` still uses gas-style assembler directives, not full NASM syntax. – Peter Cordes Dec 17 '15 at 21:41

0 Answers0