Nasty problem 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:

Nasty problem on P16

#1 Post by yo2lio » 18 Mar 2008 09:29

Hi,

In MIkroPascal and MikroBasic, on P16 MCU, compiler skip following instruction : _x := _y;

Code: Select all

program Test;

var la_,lb_ : byte;

procedure equalize_var(var _x, _y : byte);
begin
  _x := _y;
end;

begin
  la_ := 2;
  lb_ := 1;
  equalize_var(la_, lb_);
end.
On P18 work ok, also in MikroC work both P16 and P18 :

Code: Select all

unsigned short la,lb;

void equalize_var(unsigned short *_x, unsigned short *_y) {
  *_x = *_y;
}

void main() {
  la = 2;
  lb = 1;
  equalize_var(&la, &lb);
}
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: Nasty problem on P16

#2 Post by zristic » 18 Mar 2008 17:18

Thanks Florin. We will fix it asap.

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

Re: Nasty problem on P16

#3 Post by zristic » 24 Mar 2008 16:52

Fixed, thanks.

Post Reply

Return to “mikroPascal Beta testing”