Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Round UP to the nearest tenth?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
deama1234
Master Cheater
Reputation: 3

Joined: 20 Dec 2014
Posts: 328

PostPosted: Sun Sep 06, 2015 12:55 pm    Post subject: Round UP to the nearest tenth? Reply with quote

Let's say I have a value of 222; how would I round it up to 230? In assembly.
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sun Sep 06, 2015 3:02 pm    Post subject: This post has 1 review(s) Reply with quote

Code:
newmem:
  push eax
  push ecx
  push edx
  xor edx,edx
  mov eax,[myvar1]
  mov ecx,#10
  div ecx
  cmp edx,0
  je ignore
  mov eax,[myvar1]
  sub eax,edx
  add eax,#10
  mov [myvar1],eax
ignore:
  pop edx
  pop ecx
  pop eax
code:
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites