Hi,
I have written simple code using Hi-Tech C in MPLAB. When I compile it, the Disassembly Listing shows a weird result.
Here is the code in Hi-Tech C
Here is the code in Disassembly Listing
This is when the optimization is turned off. Any solution?
Please advice.
Thanks.
I have written simple code using Hi-Tech C in MPLAB. When I compile it, the Disassembly Listing shows a weird result.
Here is the code in Hi-Tech C
Code:
#include <htc.h>
void main ()
{
unsigned char a;
while (1)
{
a = 1;
a += 1;
a = 10;
a = 20;
}
}
Here is the code in Disassembly Listing
Code:
1: #include <htc.h>
2: void main ()
3: {
4: unsigned char a;
5: while (1)
001 2801 GOTO 0x1
This is when the optimization is turned off. Any solution?
Please advice.
Thanks.