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

How to compile arithmetic expressions to x86?

Name: Anonymous 2015-07-10 21:16

hi prog, say I want to take as given some variables on the stack x,y,z,w and compile expressions (x+y)*(z+w) to x86 asm.

first off the instructions take registers or pointers and well x86 is weird and has instructions like this:

add x, y ;x OR y must be a register, result in x
mul x ;multiplies eax with x, result is put into eax


so this would work:

mov eax, stack0
add eax, stack1
mov ebx, stack2
add ebx, stack3
mul ebx


but how would you make an algorithm to do this in general?

Name: Anonymous 2015-07-19 18:26

>>39
stop posting or stop using a name you fucking retard

Name: Anonymous 2015-07-19 21:18

>>43
implying a retard can understand he behaves like a retard

Name: Anonymous 2015-07-19 21:26

>>44
Who are you quoting?

Name: Anonymous 2015-07-19 21:36

>>44
Using retarded /g/ memes is worse than using a name, you know. Also, Cudder is way older than your failure of a teenager mom.

Name: Anonymous 2015-07-19 21:57

>>46
Hello, Cudder!

Name: Anonymous 2015-07-19 22:27

>>46
Old Cudder-fag had a clam, HE-HI-HE-HI-HO
And on his clam he had some dicks, HE-HI-HE-HI-HO

With a dick, dick here, and a dick, dick there,
Here a dick, there a dick, everywhere a dick, dick,

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