Hi guys.
I just started using their demo version of their PIC IDE + compiler and being new to uC programmming...I find that their asm generated appears to be huge.........any comments?
I just wanted the PORTB to output AAH delay 1 sec and 55H and delay 1 sec.....
Pascal Version
program Led_blinking;
begin
TRISB := 0; // configure pins of portb as output
repeat // beginning of a repeat loop
begin
PORTB := $AA; // turn ON diodes on portb
delay_ms(1000); // wait for 1 second
PORTB := $55;
delay_ms(1000); // wait for 1 second
end;
until 0 = 1; // endless loop (as this condition is never satisfied)
end.
Assembly Version [Generated by Mikropascal Compiler] GOTO main
;--- procedure main ---
main:
CLRF TRISB,0
L_Led_blinking_0:
MOVLW 170
MOVWF PORTB,0
MOVLW 6
MOVWF STACK_1,0
MOVLW 255
MOVWF STACK_2,0
MOVLW 255
MOVWF STACK_3,0
DECFSZ STACK_1,F,0
GOTO $+2
GOTO $+8
DECFSZ STACK_2,F,0
GOTO $+2
GOTO $+4
DECFSZ STACK_3,F,0
GOTO $-1
GOTO $-5
GOTO $-9
MOVLW 26
MOVWF STACK_1,0
MOVLW 255
MOVWF STACK_2,0
DECFSZ STACK_1,F,0
GOTO $+2
GOTO $+4
DECFSZ STACK_2,F,0
GOTO $-1
GOTO $-5
MOVLW 66
MOVWF STACK_1,0
DECFSZ STACK_1,F,0
GOTO $-1
MOVLW 85
MOVWF PORTB,0
MOVLW 6
MOVWF STACK_1,0
MOVLW 255
MOVWF STACK_2,0
MOVLW 255
MOVWF STACK_3,0
DECFSZ STACK_1,F,0
GOTO $+2
GOTO $+8
DECFSZ STACK_2,F,0
GOTO $+2
GOTO $+4
DECFSZ STACK_3,F,0
GOTO $-1
GOTO $-5
GOTO $-9
MOVLW 26
MOVWF STACK_1,0
MOVLW 255
MOVWF STACK_2,0
DECFSZ STACK_1,F,0
GOTO $+2
GOTO $+4
DECFSZ STACK_2,F,0
GOTO $-1
GOTO $-5
MOVLW 66
MOVWF STACK_1,0
DECFSZ STACK_1,F,0
GOTO $-1
GOTO L_Led_blinking_0
L_Led_blinking_1:
GOTO $
;---endproc---
I just started using their demo version of their PIC IDE + compiler and being new to uC programmming...I find that their asm generated appears to be huge.........any comments?
I just wanted the PORTB to output AAH delay 1 sec and 55H and delay 1 sec.....
Pascal Version
program Led_blinking;
begin
TRISB := 0; // configure pins of portb as output
repeat // beginning of a repeat loop
begin
PORTB := $AA; // turn ON diodes on portb
delay_ms(1000); // wait for 1 second
PORTB := $55;
delay_ms(1000); // wait for 1 second
end;
until 0 = 1; // endless loop (as this condition is never satisfied)
end.
Assembly Version [Generated by Mikropascal Compiler] GOTO main
;--- procedure main ---
main:
CLRF TRISB,0
L_Led_blinking_0:
MOVLW 170
MOVWF PORTB,0
MOVLW 6
MOVWF STACK_1,0
MOVLW 255
MOVWF STACK_2,0
MOVLW 255
MOVWF STACK_3,0
DECFSZ STACK_1,F,0
GOTO $+2
GOTO $+8
DECFSZ STACK_2,F,0
GOTO $+2
GOTO $+4
DECFSZ STACK_3,F,0
GOTO $-1
GOTO $-5
GOTO $-9
MOVLW 26
MOVWF STACK_1,0
MOVLW 255
MOVWF STACK_2,0
DECFSZ STACK_1,F,0
GOTO $+2
GOTO $+4
DECFSZ STACK_2,F,0
GOTO $-1
GOTO $-5
MOVLW 66
MOVWF STACK_1,0
DECFSZ STACK_1,F,0
GOTO $-1
MOVLW 85
MOVWF PORTB,0
MOVLW 6
MOVWF STACK_1,0
MOVLW 255
MOVWF STACK_2,0
MOVLW 255
MOVWF STACK_3,0
DECFSZ STACK_1,F,0
GOTO $+2
GOTO $+8
DECFSZ STACK_2,F,0
GOTO $+2
GOTO $+4
DECFSZ STACK_3,F,0
GOTO $-1
GOTO $-5
GOTO $-9
MOVLW 26
MOVWF STACK_1,0
MOVLW 255
MOVWF STACK_2,0
DECFSZ STACK_1,F,0
GOTO $+2
GOTO $+4
DECFSZ STACK_2,F,0
GOTO $-1
GOTO $-5
MOVLW 66
MOVWF STACK_1,0
DECFSZ STACK_1,F,0
GOTO $-1
GOTO L_Led_blinking_0
L_Led_blinking_1:
GOTO $
;---endproc---