Hello everyone I have a question for assembly language cours
Hello everyone
I have a question for assembly language course and I need a good expert who can helps me on that.
Solution
cmp vall,ecx
jna L1
cmp ecx,edx
jna L1
mov X,1
jmp next
L1:mov x,2
next:
-----------------------------------------------------------------------------------------------------------
cmp ebx,ect ;ebx>ecx?
jna L1 ;no:try condition after OR
cmp ebx,edx ;yes:is ebx > edx?
jna L1 ;no:try condition after OR
jmp L2 ;yes:set X to 1
-----OR(edx>eax)-----
L1:cmp edx,eax ;edx>eax?
jna L3 ;no:set X to 2
L2:mov X,1 ;yes:set X to 1
jmp next ;and quit
L3:mov X,2 ;set X to 2
next:
