flat assembler
Message board for the users of flat assembler.

Index > Main > Adding?

Author
Thread Post new topic Reply to topic
adroit



Joined: 21 Feb 2010
Posts: 252
adroit 03 Jun 2010, 16:09
When adding in assembly, are the following similar:
Code:
mov ah,4
mov al,5
add ah,al

; is it the same as?:
mov ah,[ah+al]    

_________________
meshnix
Post 03 Jun 2010, 16:09
View user's profile Send private message Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko 03 Jun 2010, 16:12
2nd looks to be wrong at all so it is not the same, what exactly do you want
Post 03 Jun 2010, 16:12
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 03 Jun 2010, 16:17
Code:
mov bx, 4
mov si, 5
add bx, si

; Is the same as:
lea bx, [bx+si]    
Post 03 Jun 2010, 16:17
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20459
Location: In your JS exploiting you and your system
revolution 03 Jun 2010, 16:23
LocoDelAssembly wrote:
Code:
mov bx, 4
mov si, 5
add bx, si

; Is the same as:
lea bx, [bx+si]    
Is the same ... except for the EFLAGS register.
Post 03 Jun 2010, 16:23
View user's profile Send private message Visit poster's website Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko 03 Jun 2010, 16:29
revolution
Is the same ... except for the EFLAGS register.
it's out off the topic, revolutio, still: have you been working with Eflags?
why not flags:) eg. time before i thought Eflags was present only, then found flags and Rflags :)
Post 03 Jun 2010, 16:29
View user's profile Send private message Reply with quote
adroit



Joined: 21 Feb 2010
Posts: 252
adroit 03 Jun 2010, 16:46
edemko wrote:
2nd looks to be wrong at all so it is not the same, what exactly do you want

Yea, I tried to compile; it didn't work. I just want to know if the add mnemonic (example: mov ah,8 / add ah,8) is the same as using + operator (example: mov ah,[9+6].
LocoDelAssembly wrote:
Code:
mov bx, 4 
mov si, 5 
add bx, si 

; Is the same as: 
lea bx, [bx+si]    


lea loads the actual memory location (calculation) of bx+si, right?
Post 03 Jun 2010, 16:46
View user's profile Send private message Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko 03 Jun 2010, 16:56
Post 03 Jun 2010, 16:56
View user's profile Send private message Reply with quote
adroit



Joined: 21 Feb 2010
Posts: 252
adroit 03 Jun 2010, 16:58
Yea, I should read a few chapters before making a fool of myself Laughing
Post 03 Jun 2010, 16:58
View user's profile Send private message 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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.