C nebo ASM?

Andrej Jancura hw_aj@zoznam.sk
Sobota Květen 23 20:58:42 CEST 2009


Toto vyliezlo z PIC16PRO

;test.c: 22: do {
l4:

;test.c: 23: Sum += *p_Pointer++;
 movf 12,w
 movwf 4
 movf 0,w
 addwf 77,f
 incf 12,f

;test.c: 24: } while(Number_of_Bytes-- != 0);
 decf 13,f
 incfsz 13,w
 goto l4
 
A.

  ----- Original Message ----- 
  From: Michal HW 
  To: HW-news 
  Sent: Friday, May 22, 2009 12:19 PM
  Subject: Re: C nebo ASM?


  Tak jsem zkusil prelozit upraveny program s pointery a vysledek neni o moc lepsi:

  (PIC18STD)
  19:                 do {
  20:                  Suma = Suma + *p_Pointer++;
    FFB4    C0FE     MOVFF 0xfe, 0xfe9
    FFB6    FFE9     NOP
    FFB8    C0FF     MOVFF 0xff, 0xfea
    FFBA    FFEA     NOP
    FFBC    50EF     MOVF 0xfef, W, ACCESS
    FFBE    010F     MOVLB 0xf
    FFC0    273F     ADDWF 0x3f, F, BANKED
    FFC2    0100     MOVLB 0
    FFC4    2BFE     INCF 0xfe, F, BANKED
    FFC6    0E00     MOVLW 0
    FFC8    23FF     ADDWFC 0xff, F, BANKED
  21:                 } while(Pocet_Byte--);
    FFCA    010F     MOVLB 0xf



  Michal Gregor

    ----- Original Message ----- 
    From: Andrej Jancura 
    To: HW-news 
    Sent: Friday, May 22, 2009 11:31 AM
    Subject: Re: C nebo ASM?


    Michal HW  wrote / napísal(a):
    > PIC18 STD
    > A ted napsano v asembleru:
    >     movlw    32
    >     movwf    Pocet_Byte
    >     lfsr 0,Pole
    >     clrf    WREG
    > Pocitej_Soucet
    >     addwf POSTINC0,W
    >     decfsz Pocet_Byre
    >     bra Pocitej_Soucet
    V asembleri si napisal toto...

    Pocet_Byte = 32;
    p_Pointer = &Pole[0]
    Suma = 0;

    do {
    Suma = Suma + *p_Pointer++;
    } while(Pocet_Byte--);

    A.

    _______________________________________________
    HW-list mailing list  -  sponsored by www.HW.cz
    Hw-list@list.hw.cz
    http://list.hw.cz/mailman/listinfo/hw-list



  __________ Informacia od ESET NOD32 Antivirus, verzia databazy 4097 (20090522) __________

  Tuto spravu preveril ESET NOD32 Antivirus.

  http://www.eset.sk



------------------------------------------------------------------------------


  _______________________________________________
  HW-list mailing list  -  sponsored by www.HW.cz
  Hw-list@list.hw.cz
  http://list.hw.cz/mailman/listinfo/hw-list



  __________ Informacia od ESET NOD32 Antivirus, verzia databazy 4097 (20090522) __________

  Tuto spravu preveril ESET NOD32 Antivirus.

  http://www.eset.sk

------------- další část ---------------
HTML příloha byla odstraněna...
URL: http://list.hw.cz/pipermail/hw-list/attachments/20090523/11433211/attachment-0002.htm 


Další informace o konferenci Hw-list