flat assembler
Message board for the users of flat assembler.

Index > DOS > add x, y ... Where is the result stored?

Author
Thread Post new topic Reply to topic
Steve



Joined: 10 Sep 2005
Posts: 10
Steve
I've been looking at a tutorial that shows (http://www.decard.net/article.php?body=tajga&chapter=07) :

mov ax,5
mov bx,5
add bx,[five]
add ax,bx
;here ax contains 15, bx contains 10
five dw 5

Where exactly is it stored? Am I so close I can't see the answer?
Post 10 Sep 2005, 23:11
View user's profile Send private message Reply with quote
veach1



Joined: 16 Jul 2004
Posts: 165
veach1
add destination, source
Logic: destination <- destination + source
So add ax,bx would be as: addition of ax and bx and result is placed in ax
Like in C: a=a+b
Post 11 Sep 2005, 06:31
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
yup, "add ax,bx" is more like "ax += bx", most instructions take paramater in order that first is destination, and second is source, source usually remains unmodofied
Post 11 Sep 2005, 08:58
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.