Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*max(a,b)
- _asm
- {
- mov eax, a
- cmp eax, b
- jge L
- mov eax, b
- L: mov max, eax
- }*/
- /*
- if(x>0) S
- _asm
- {
- mov eax, a
- cmp eax, 0
- jg S
- mov eax, 0
- S: mov res, eax
- }*/
- /*
- if(x <= 0) S1 else S2
- _asm
- {
- mov eax, a
- cmp eax, 0
- jle S1
- jg S2
- S1: mov eax, 1
- jmp END
- S2: mov eax, 0
- jmp END
- END: mov res, eax
- }*/
- /*
- if(a > 0 && b > 0)
- _asm
- {
- mov eax, a
- mov ebx, b
- cmp eax, 0
- jg COMP2
- jmp S2
- COMP2: cmp ebx, 0
- jg S1
- jmp S2
- S1: mov eax, 1
- jmp END
- S2: mov eax, 0
- jmp END
- END: mov res, eax
- }*/
- /*if(a > 0 || b > 0 && c > 0)
- _asm
- {
- mov eax, a
- mov ebx, b
- cmp eax, 0
- jle COMP2
- jmp S1
- COMP2: cmp ebx, 0
- jle S2
- jmp S1
- S1: mov eax, 1
- jmp END
- S2: mov eax, 0
- jmp END
- END: mov res, eax
- }*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement