Start New Discussion Reply to this Discussion If then statement
Can someone please help translate this statement to assembly language
if X <= Y then
if Y = V then
call Path1
end if
else
if X > Z then
call Path2
else
call Path3
endif
endif
Related Article: return statement problem
is a Software Development discussion thread by osamabin.idrees that has 1 reply and was last updated 9 months ago.
risen375
Newbie Poster
4 posts since May 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0
Without knowing what X, Y, V & Z are, I'm going to assume 32 bit integers
Source is NASM
V dd 1
Z dd 1
; EAX = "X"
; ECX = "Y"
cmp eax, ecx
ja .L1
cmp ecx, [V]
jnz .Done
call Path1
jmp .Done
.L1 cmp eax, [Z]
ja .L2
call Path3
jmp .Done
.L2 call Path2
.Done ret
Path1: nop
Path2: nop
Path3: ret
ShiftLeft
Light Poster
31 posts since Jun 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0
© 2013 DaniWeb® LLC
Page rendered in 0.0710 seconds
using 2.67MB