!void delayfive (int loop)
!{
! int i;
! for (i=0; i<loop; i++)
0x1F90: MOVLW 0x0
0x1F92: MOVWF 0x5, ACCESS
0x1F94: MOVLW 0x0
0x1F96: MOVWF i, ACCESS
0x1F98: BRA 0x1FA0
0x1F9C: INFSNZ i, F, ACCESS
0x1F9E: INCF 0x5, F, ACCESS
0x1FA0: MOVF __pcstackCOMRAM, W, ACCESS
0x1FA2: SUBWF i, W, ACCESS
0x1FA4: MOVF 0x5, W, ACCESS
0x1FA6: XORLW 0x80
0x1FA8: MOVWF 0x3, ACCESS
0x1FAA: MOVF 0x2, W, ACCESS
0x1FAC: XORLW 0x80
0x1FAE: SUBWFB 0x3, W, ACCESS
0x1FB0: BTFSC STATUS, 0, ACCESS
0x1FB2: RETURN 0
0x1FB4: BRA 0x1F9A
! {
! Nop();
0x1F9A: NOP
0x1F9C: INFSNZ i, F, ACCESS
0x1F9E: INCF 0x5, F, ACCESS
0x1FA0: MOVF __pcstackCOMRAM, W, ACCESS
0x1FA2: SUBWF i, W, ACCESS
0x1FA4: MOVF 0x5, W, ACCESS
0x1FA6: XORLW 0x80
0x1FA8: MOVWF 0x3, ACCESS
0x1FAA: MOVF 0x2, W, ACCESS
0x1FAC: XORLW 0x80
0x1FAE: SUBWFB 0x3, W, ACCESS
0x1FB0: BTFSC STATUS, 0, ACCESS
0x1FB2: RETURN 0
0x1FB4: BRA 0x1F9A
I'm afraid to my shame assembler is all Greek to me.
I guessing a lot of this is overhead, I'm not using the optimised compiler and I have heard that it can seriously over-complicate quite simple routines?
I can get where I need to get adjusting the numbers (just) so it's not critical for my application however I'm quite staggered either how unoptimised the code is OR how many operations things that appear quite superfically simple take.
It's to my shame I don't understand this, I'm not making out that it's a fault of anybody but me!