12.07.2015 Views

Cap. 4 Complejidad temporal de algoritmos - Inicio

Cap. 4 Complejidad temporal de algoritmos - Inicio

Cap. 4 Complejidad temporal de algoritmos - Inicio

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Complejidad</strong> <strong>temporal</strong> <strong>de</strong> <strong>algoritmos</strong> 39002590 AE9F0000 cmp.w @R15,0x0(R14) ;compara002594 1734 jge 0x25C4 ;salta a fin <strong>de</strong>l if{ temp=a[j-1]; //4002596 0F4B mov.w R11,R15002598 3F53 add.w #0xFFFF,R1500259A 0F5F rla.w R15 ;R15=2(j-1)00259C 0E4D mov.w R13,R1400259E 0E5F add.w R15,R14 ;R14 apunta a a[j-1]0025A0 284E mov.w @R14,R8 ;temp =R8=*(a+2(j-1))a[j-1]=a[j]; //50025A2 0F4B mov.w R11,R150025A4 0F5F rla.w R150025A6 0E4D mov.w R13,R140025A8 0E5F add.w R15,R14 ;R14 apunta a a[j]0025AA 094B mov.w R11,R90025AC 3953 add.w #0xFFFF,R90025AE 0959 rla.w R90025B0 0F4D mov.w R13,R150025B2 0F59 add.w R9,R15 ;R15 apunta a a[j-1]0025B4 AF4E0000 mov.w @R14,0x0(R15) ;asignacióna[j]=temp; //60025B8 0E4B mov.w R11,R140025BA 0E5E rla.w R140025BC 0F4D mov.w R13,R150025BE 0F5E add.w R14,R150025C0 8F480000 mov.w R8,0x0(R15)for (j=n-1; j>=i+1; j--) //20025C4 3B53 add.w #0xFFFF,R11 ;reinicio segundo forfor (j=n-1; j>=i+1; j--) //20025C6 0F4A mov.w R10,R15 ;mueve j al registro R15;evalúa condición segundo for0025C8 1F53 inc.w R15 ; incrementa i0025CA 0B9F cmp.w R15,R11 ;compara j (en R10) con i+1 (en R15)0025CC D837 jge 0x257E ;entra al bloque <strong>de</strong>l segundo forfor (i=0;i

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!