Comparing the generated Assembler code might give more clues.
Robert
Comparing the generated Assembler code might give more clues.
Robert
Yes the generated assembler would be smaller.
An example of two BASIC IF...THEN comparisons in assembler
You are always testing for zero, helps if the comparison is zero!Code:@ movf _Variable ,W 'IF Variable = $A0 THEN... @ sublw 0xA0 'subtract comparison @ btfss status ,Z 'test if result is zero // condition is here @ movf _Variable ,W 'IF Variable = $00 THEN... @ btfss status ,Z 'test if result is zero // condition is here
Bookmarks