Jump to content

Bit Access Bug...


Recommended Posts

Found following bit access problem using BoostC version 6.87;

 

//  BoostC code

unsigned int TxChar = 0;

void main()
{
 TxChar.4 = 1;	 // set bit 4
 TxChar.9 = 1;	 // set bit 9
}

//  assembler output sets bit 1 in the low byte rather than
//  bit 1 in the high byte at "gbl_TxChar+d'1'"
//
//	0052  1623	  BSF gbl_TxChar,4
//	0053  14A4	  BSF gbl_TxChar,1

Link to post
Share on other sites
Found following bit access problem using BoostC version 6.87;

 

//  BoostC code

unsigned int TxChar = 0;

void main()
{
 TxChar.4 = 1;	 // set bit 4
 TxChar.9 = 1;	 // set bit 9
}

//  assembler output sets bit 1 in the low byte rather than
//  bit 1 in the high byte at "gbl_TxChar+d'1'"
//
//	0052  1623	  BSF gbl_TxChar,4
//	0053  14A4	  BSF gbl_TxChar,1

 

For this code correct opcodes get generated. Your program will run as intended. It's only the instruction that gets displayed incorrectly as if it uses low byte. So the reported problem seems not to be a problem but it reveals another one that is a problem though much more minor.

 

Regards,

Pavel

Link to post
Share on other sites
For this code correct opcodes get generated. Your program will run as intended. It's only the instruction that gets displayed incorrectly as if it uses low byte. So the reported problem seems not to be a problem but it reveals another one that is a problem though much more minor.

 

Regards,

Pavel

Thank you Pavel...

 

Mike

Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...