main: .pos 0 irmovl stack,%esp irmovl l1,%eax pushl %eax call length # retour dans %eax iaddl 4,%esp halt length: mrmovl 4(%esp),%esi # param l xorl %eax,%eax # n = 0 loop: andl %esi,%esi # test si l est NULL ? je end iaddl 1,%eax # n++ mrmovl 4(%esi),%esi # l = l->next jmp loop end: ret # retour n dans eax .pos 0x100 # linked list l1: .long 1 .long l2 # next = l2 l2: .long 2 .long l3 # next = l1 l3: .long 3 .long 0 # next = NULL .pos 0x200 stack: