MikroPascal and MikroBasic BIT LOGICAL OPERATION

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:

MikroPascal and MikroBasic BIT LOGICAL OPERATION

#1 Post by yo2lio » 28 Jun 2008 16:11

Hello,

This code don't work in MikroPascal and MikroBasic but work OK in MC :

Code: Select all

program Test_mp8_1_Bit_Logical_Operation;
      
var d1,d2 : byte;

begin
  d1 := %00000011;
  d2 := %00000000;
  nop;
  if (d1.1 <> d2.1) and (d1.1 = 1) then d2.7 := 1;
end.
For first bit program works OK :

Code: Select all

  if (d1.0 <> d2.0) and (d1.0 = 1) then d2.7 := 1;
Tested also in MC and works :

Code: Select all

unsigned short d1;
unsigned short d2;

void main(){
  d1 = 0b00000011;
  d2 = 0b00000000;
  asm {nop}
  if ((d1.F1 != d2.F1) & (d1.F1 = 1)) d2.F7 = 1;
}
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: MikroPascal and MikroBasic BIT LOGICAL OPERATION

#2 Post by zristic » 30 Jun 2008 07:50

Thanks, we will check it out.

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

Re: MikroPascal and MikroBasic BIT LOGICAL OPERATION

#3 Post by zristic » 09 Jul 2008 09:21

Problem detected and fixed.
Thanks.

Post Reply

Return to “mikroPascal Beta testing”