Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6089777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:08:19+00:00 2026-05-23T12:08:19+00:00

I am porting c code of a firmware to c# and not sure how

  • 0

I am porting c code of a firmware to c# and not sure how this keyword

"sbit"

can be written in c#. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:08:19+00:00Added an answer on May 23, 2026 at 12:08 pm

    link @Ben Robinson,

    “(…)With typical 8051 applications, it is often necessary to access individual bits within an SFR. The sbit type provides access to bit-addressable SFRs and other bit-addressable objects. For example:

    sbit EA = 0xAF;
    

    This declaration defines EA as the SFR bit at address 0xAF. On the 8051, this is the enable all bit in the interrupt enable register.(…)”.

    sbit name = sfr-address ^ bit-position;
    

    This too low level, you might try to use c++.net, for that matter. C# is a high level language, using pointers can be a little tricky, it can be done, but escapes from c# real intent.
    You could use c++.net made functions, as the final code of both is the same [clr (Common Language Run-Time)], the machine will not note the diference.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Java it's written like this.. when I was porting this code... realizied there
I'm porting some code from BSD sockets to Winsock, and I'm not sure how
I'm porting some code from Python 2 to 3. This is valid code in
I'm looking at porting some code that uses java.util.concurrent.ConcurrentSkipListSet to an environment where this
GNU libc's backtrace and In-circuit emulators/debuggers are not always available when porting code to
If you port code over from one language to another, how can this be
I'm now porting arduino code to stm32(c/c++). Please help me with this function: constrain(x,
I'm porting C++ code from Linux to Windows. During this process, I found out
I am porting some code from C to C++ and I found this code:
I'm porting some code from lisp, but I got stuck at this part (apparently

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.