flat assembler
Message board for the users of flat assembler.

Index > Main > One byte sign numbers add.

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1719
Roman 16 Jun 2024, 06:07
X86
Very strange But I not find one asm command for this.
But exist imul asm command.
I want add - 1 and 1

1 = 1
-1 = 128

Simple add not good solution because wrong result.

And my two numbers changed sign.
I mean first or second or both could be negativ numbers.
Post 16 Jun 2024, 06:07
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20215
Location: In your JS exploiting you and your system
revolution 16 Jun 2024, 08:32
Code:
mov al,1
add al,-1
 ; result is al = 0    
-1 = 255
Post 16 Jun 2024, 08:32
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.