flat assembler
Message board for the users of flat assembler.

Index > Main > About operating on words

Author
Thread Post new topic Reply to topic
abramtarasov



Joined: 05 Oct 2020
Posts: 1
abramtarasov 05 Oct 2020, 15:13
Hi mates, I'm new to FASM. I need to ask how can I swap the even letters of word "even" with the odd letters of word "odd"?
I started writing some code:
format PE GUI
entry start
bol dd "even"
start:
movzx ecx, byte ptr bol+4
ret
Post 05 Oct 2020, 15:13
View user's profile Send private message Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 1228
Location: Belarus
DimonSoft 05 Oct 2020, 18:08
Memory operands are written with square brackets:
Code:
movzx cl, [bol + 4]    
Note also that operand sizes are important.
Post 05 Oct 2020, 18:08
View user's profile Send private message Visit poster's website 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-2023, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.