It is NOT a bug. But Irritating.

Can I call this a bug?

I try to compile a simple assembly code with MPLAB. The compiler shows no error but I found one of the instruction missing in the ROM. After some checking,  Danny found that it is due to a “special code” lays behind a comment which make the subsequent instruction a comment as well. Please refer to the picture for a better understanding.

I can’t blame Microchip as it may be because I am running Windows as a guest inside my Linux’s VirtualBox.

A simlple source code. Note that I have MOVLW 0x20 here.
Compiler shows no error.
However, MOVLW 0x20 is missing in the program memory?

I try to open the file with VI in Linux and found that line 6 was behind line 5, acting as a comment. MPLAB showed me a different source code!
It was due to the error formation of the ASCII code. The ending of REMARK 1 suppose to be 0x0D 0x0A but it shows 0x0D 0x09.
Advertisements

Author: zkchong

I have been teaching in university for 7 years and currently a data science engineer at Axiata Digital Advertising, Malaysia.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s