Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Possible MPLAB - PICC (HI-TECH) compiling bugs

Status
Not open for further replies.

gusman13

Newbie level 1
Joined
Dec 15, 2008
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,289
Compiler: HI-TECH PICC v9.60PL5 (PRO, Lite) & PICC v9.70PL0 (PRO,Lite)
MPLAB 8.40, 8.30
MPLAB HI-TECH Plug-In v1.35

Situations
------------
1) Defining two or more assembly instructions asm("instruction") in #define resulting in wrong code.

Code:
#include <htc.h>
#define nop() asm("nop")
#define testnop() { nop(); nop(); nop();}
#define testnop1() nop(); nop(); nop()

void main(void)
{
      /* Routine 1*/
      /* Routine 2*/
      testnop();
      /* Routine 3*/
      /* Routine 4*/
      /* Routine 5*/
}
The result assembly code is unexpected....

Code:
...
...
call routine2
NOP
call routine3
NOP
call routine4
NOP
...
...
It places 3 nops but one nop before every other command or call...
Strange thing is that in HI-TIDE v3.15PL2 there is no problem. 3 NOP in the right place.

2) Wrong bit assignment of 'c', 'z' etc in Status register
3) Yesterday I wrote a program and somehow in asm("---") generated btfsc for btfss and vice-versa... I can't recall the situation so I can not reproduce the error...
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top