flat assembler
Message board for the users of flat assembler.

Index > Linux > 'add' not adding as expected

Author
Thread Post new topic Reply to topic
Ton



Joined: 06 Jan 2005
Posts: 22
Ton
Consider the following piece of assembly with fasm 1.58

b0 = 134918692
cnt = 157

mov ecx,[cnt] ; #
mov edi,b0 ; dest
mov esi,edi ; source
add esi,ecx

esi = 134918845 edi = 134918692 ecx = 157

However 134918692 + 157 = 134918849 (not ...45)

Why is this? And how to code this that esi becomes 134918849?

Best Regards,
Ton
Post 10 Mar 2005, 11:14
View user's profile Send private message Reply with quote
crc



Joined: 21 Jun 2003
Posts: 637
Location: Penndel, PA [USA]
crc
it works fine for me...
Post 10 Mar 2005, 11:38
View user's profile Send private message Visit poster's website Reply with quote
Ton



Joined: 06 Jan 2005
Posts: 22
Ton
After much troubleshooting with ald, I found I had a bug in my program.
Sorry for the interrupt here.
Post 13 Mar 2005, 15:03
View user's profile Send private message Reply with quote
THEWizardGenius



Joined: 14 Jan 2005
Posts: 382
Location: California, USA
THEWizardGenius
Try "mov edi,[b0]" rather than "mov edi,b0"
Post 15 Mar 2005, 16:43
View user's profile Send private message AIM Address 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.