DSPIC, LINKER ERROR

Discuss about beta versions of mikroPascal compiler.
Post Reply
Author
Message
yo2lio
Posts: 1878
Joined: 19 Sep 2006 12:57
Location: Romania, Arad City
Contact:

DSPIC, LINKER ERROR

#1 Post by yo2lio » 25 Dec 2007 22:25

HI,

In ASM, Linker don't recognize predefined globals variable such as PORTB if this variables is not initializated before.

http://www.mikroe.com/forum/viewtopic.php?p=65023#65023

For examples :

Code: Select all

  asm
    MOV RCOUNT,W12
  end;
Compile OK.

Code: Select all

  asm
    MOV PORTB,W12
  end;
0:26 E-420 Invalid ASM instruction (132): PORTB (0x000206) W12

Work around :

Code: Select all

  PORTB := PORTB; // skipped by optimizer
  asm
    MOV PORTB,W12
  end;
Best regards, Florin Andrei Medrea.

http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/

mail : florin@microelemente.ro

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

Re: DSPIC, LINKER ERROR

#2 Post by zristic » 28 Dec 2007 08:21

Florin, it's been the case since the very first compiler version, it is a feature rather than an error. It is not recommended that we link all variables including those which are not used.

As for assembly, hey we are talking here about HL comilers, assembly is provided just for more comfort, it is not intended to be a macro assembler compiler.

yo2lio
Posts: 1878
Joined: 19 Sep 2006 12:57
Location: Romania, Arad City
Contact:

Re: DSPIC, LINKER ERROR

#3 Post by yo2lio » 28 Dec 2007 09:01

zristic wrote:As for assembly, hey we are talking here about HL comilers, assembly is provided just for more comfort, it is not intended to be a macro assembler compiler.
Yes true,

I like MikroPascal and I have 17 years of experience in ASM .
I like to switch between MikroPascal and ASM.
zristic wrote:Florin, it's been the case since the very first compiler version, it is a feature rather than an error.
It's a very good compiler , have small problems now but is OK for me , I can handle.
Best regards, Florin Andrei Medrea.

http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/

mail : florin@microelemente.ro

Post Reply

Return to “mikroPascal Beta testing”