flat assembler
Message board for the users of flat assembler.

Index > Main > 32-bit address in 16-bit mode

Author
Thread Post new topic Reply to topic
l4m2



Joined: 15 Jan 2015
Posts: 657
l4m2
I think I needn't be afraid to do so if used good.for example ,Mov cx,[4ax]
so how do you see it
Post 12 Feb 2015, 08:29
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17714
Location: In your JS exploiting you and your system
revolution
What is wrong with the standard "mov cx,[eax]"?
Post 12 Feb 2015, 08:33
View user's profile Send private message Visit poster's website Reply with quote
l4m2



Joined: 15 Jan 2015
Posts: 657
l4m2
revolution wrote:
What is wrong with the standard "mov cx,[eax]"?
4ax = ax + ax+ ax + ax
Post 01 Mar 2015, 02:45
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17714
Location: In your JS exploiting you and your system
revolution
Code:
movzx eax,ax
mov cx,[eax*4]    
Post 01 Mar 2015, 04:15
View user's profile Send private message Visit poster's website Reply with quote
gens



Joined: 18 Feb 2013
Posts: 161
gens
l4m2 wrote:
revolution wrote:
What is wrong with the standard "mov cx,[eax]"?
4ax = ax + ax+ ax + ax

mov cx, [ax*4]
edit: scratch that

mov ecx, [eax*4]
or
mov cx, [eax*4]



first one gives error:
mov cx, [ax*4]
error: reserved word used as symbol.

what word is here reserved ?


Last edited by gens on 01 Mar 2015, 04:19; edited 1 time in total
Post 01 Mar 2015, 04:16
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17714
Location: In your JS exploiting you and your system
revolution
gens wrote:
mov cx, [ax*4]
16-bit mod-reg-rm addressing doesn't support that. Neither "ax", nor "*4", is possible. You'll need the SIB addressing mode.
Post 01 Mar 2015, 04:19
View user's profile Send private message Visit poster's website Reply with quote
gens



Joined: 18 Feb 2013
Posts: 161
gens
revolution wrote:
gens wrote:
mov cx, [ax*4]
16-bit mod-reg-rm addressing doesn't support that. Neither "ax", nor "*4", is possible. You'll need the SIB addressing mode.

makes sense, thx
i already corrected above
Post 01 Mar 2015, 04:20
View user's profile Send private message Reply with quote
l4m2



Joined: 15 Jan 2015
Posts: 657
l4m2
revolution wrote:
Code:
movzx eax,ax
mov cx,[eax*4]    
I meant so but I did not say about movzx
Post 11 Mar 2015, 00:37
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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.