Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

What the shit! ASM!

Name: Anonymous 2010-08-21 7:23

Hi /prog/

I have writen a program in ASM and for some odd reason this:
call dicks
movl %ecx, 1(%edx, %eax, 4)
does not work, but this code:
call dicks
movl %eax, %ebx
movl %ecx, 1(%edx, %ebx, 4)
does.

And no, there is no code that alters eax inbetween, its just 0, i examined that and it was not 0 before.
edx is correct too, i checked it.

I also get a FP exception when making a division and ecx is not 0.

I am currently reading 286 and 386 programmer manuals by the way.

What the fuck is going on here? Am i missing something?

Name: Anonymous 2010-08-21 9:39

AT&T syntax

Please use Intel syntax for x86 assembly unless you are forced to use GAS for some reason.  I'm not sure why you would want to use GAS if you are just writing some random shit to fuck around with... use FASM or NASM or something.

Name: Anonymous 2010-08-21 10:20

PIG DISGUSTING AT&T SYNTAX ;_;

Anyway, I recommend stepping through your code with a debugger. It'll make more sense what happens. I don't see how you can get a FPU exception. The only exception that makes sense for your 2 lines is an access violation/segmentation fault, depending on the values of edx/eax.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List