//#### fatorial Intel ------------------------------------------------------- .globl main main: mov eax, 5 mov ebx, 1 L1: cmp eax, 0 je L2 imul ebx, eax dec eax jmp L1 L2: ret //#### fatorial AT&T ------------------------------------------------------- .globl main main: movl $5, %eax movl $1, %ebx L1: cmpl $0, %eax je L2 imull %eax, %ebx decl %eax jmp L1 L2: ret //#### if else Intel ------------------------------------------------------- cmp eax, 'w' jne skipWrite call writeFile jmp outOfThisMess skipWrite: call doSomethingElse outOfThisMess: ;qualquer coisa //#### if else AT&T ------------------------------------------------------- cmpl 'w', %eax jne skipWrite call writeFile jmp outOfThisMess skipWrite: call doSomethingElse outOfThisMess: ;qualquer coisa //#### while Intel -------------------------------------------------------- mov eax, 0 whileLoop: mov ebx, 100 cmp eax, ebx jge WhileTerminado inc eax jmp WhileLoop WhileTerminado: ;resto do código