Linker error: 196: not found, on P16

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:

Linker error: 196: not found, on P16

#1 Post by yo2lio » 09 Oct 2007 20:28

When I try to compile following program on P16 MCU, I got this ERROR :

0:0 E-0 Linker error: 196: not found
0:0 E-0 Linker error: Bank not found: 196

Code: Select all

program test;

var d1 : dWord;
    d_w, d_i : word;
    
begin
  d1 := (d_i - 2500)* d_w;
end.
This happened only if d1 is declared dWord and only on P16 MCU.
When I change program :

Code: Select all

d1 := (dWord(d_i) - 2500)* dWord(d_w);
program compile OK.

BTW , I got few " trick's " in following program :

Code: Select all

program test;

var data1 : byte;
    
procedure xxx(var data : byte);
var aa,bb : byte;
begin
  aa := 10;
  bb := 50;
  nop;
  bb := bb or aa;
  nop;
  bb := bb and aa;
  data := bb;
end;

begin
  xxx(data1);
end.
On P16 : in procedure xxx when compiler put result on data (data := bb; ) :

Code: Select all

;test.ppas,16 :: 		data := bb;
$0013	$0821			MOVF	FARG_xxx, 0
$0014	$0084			MOVWF	FSR
$0015	$0821			MOVF	FARG_xxx, 0
$0016	$0084			MOVWF	FSR
$0017	$0870			MOVF	STACK_0, 0
$0018	$0080			MOVWF	INDF
Compiler put twice FARG_xxx data in FSR register :!:

On P16 and P18 following code :

Code: Select all

;test.ppas,13 :: 		bb := bb or aa;
$000B	$0822			MOVF	_xxx_local_aa, 0
$000C	$04A3			IORWF	_xxx_local_bb, 1
It's OK, but take a look to next code :

Code: Select all

;test.ppas,15 :: 		bb := bb and aa;
$000E	$0822			MOVF	_xxx_local_aa, 0
$000F	$0523			ANDWF	_xxx_local_bb, 0
$0010	$00F0			MOVWF	STACK_0
$0011	$0870			MOVF	STACK_0, 0
$0012	$00A3			MOVWF	_xxx_local_bb
I don't understand reason to use this combination :

Code: Select all

			MOVWF	STACK_0
			MOVF	STACK_0, 0
Thanks.
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: Linker error: 196: not found, on P16

#2 Post by zristic » 10 Oct 2007 09:57

Ouch.
Thanks for finding this bug.
Will be fixed asap.

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

Re: Linker error: 196: not found, on P16

#3 Post by zristic » 10 Oct 2007 09:58

The other issue is the imperfection of the optimizer which we are working on.

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

Re: Linker error: 196: not found, on P16

#4 Post by zristic » 26 Mar 2008 14:45

Fixed now.
Thanks Florin.

Post Reply

Return to “mikroPascal Beta testing”