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

Pages: 1-

assembly calculator?

Name: Anonymous 2010-11-11 21:59

anybody have an 8086 assembly code that does addition/subtraction?  not being lazy, new to the language and my code keeps screwing up and i can't seem to find any good examples with google at the moment.  thanks

Name: Anonymous 2010-11-11 22:00

I don't have any nearby, but running this C code through an 8086 assembler may produce the code you seek:

int x = a + b; /* to add a and b and store the result in x */
int y = c - d; /* to subtract d from c and store the result in y */

You're welcome.

Name: Anonymous 2010-11-11 23:46

>>1

try iadd and/or isub.

Did I just say and/or, is the English `or' actually an exclusive or?

Name: Anonymous 2010-11-11 23:55

add var1, var2 ;; Really bro?

Name: Anonymous 2010-11-12 0:12

>>1
Use -S switch for gcc. study its glorious assembler output. You'll be ENLIGHTED.

Name: Anonymous 2010-11-12 0:51

>>3
I believe you are right that the English "Or" is a exclusive disjunction rather than a inclusive one.
Therefor I propose to change the usage of "OR" in the English language to imply "XOR" and "XOR" to imply "OR".

Hence when I write I would love a cup of tea or a hot latte!,
I am actually implying I'd like a cup of tea, a hot latte, or both!


Your thoughts, /prauge/?

Name: Anonymous 2010-11-12 0:55

>>5

Worst way to learn asm

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