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

  • SEARCH
  • Home
  • 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 3674066
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:48:35+00:00 2026-05-19T02:48:35+00:00

As I know in order to write device drivers people usually use c++ or

  • 0

As I know in order to write device drivers people usually use c++ or assembly? The choice of assembly is clear for me. But why c++? I guess it is possible to do in java (for example), or in other high level language as well. So why c++ is so common? Is there a specific feature of C++ programming language that is necessary for writing drivers?

  • 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-19T02:48:36+00:00Added an answer on May 19, 2026 at 2:48 am

    I would say that C is much more commonly used as a language for device drivers (over C++).

    There are a couple of reasons for this:

    1. Most of the major operating systems are written in a combination of C and assembler and provide C language interfaces to the operating system.
    2. Writing a device driver usually involves communicating with a device which involves direct memory manipulation of registers and the like. C and C++ allow you to do this natively.

    Edit – Example of Direct Memory Manipulation:

    Let me make up some fictitious device. Say it has a register, that when you write certain values onto it, makes a light on the device turn on. This register is 32 bits wide. The top 31 bits say how bright to make the light, the lowest bit turns it on and off.

    When you plug the device into the computer, the operating system assigns that register a particular memory location, (let’s say 0x00FF00FF00 on a 32 bit OS). In order to turn the light on, the device driver would do something like this:

    int* lightRegister = 0x00FF00FF00; // You would normally ask the OS for this address, not hardcode it.
    int brightnessValue = 256; // Only Even numbers, the low bit must be zero.
    *lightRegister = brightnessValue | 1; //Turn it on.
    *lightRegister = 0; // Turn it off.
    

    Higher level languages like Java, don’t generally let you write into some random memory location like this.

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

Sidebar

Related Questions

i new to neko vm. may i know in order to use it, i
I want to know how I need to write the line $j('#'+divRes).html()=datos; in order
I am a novice in Threads, but I want to know how to order
I know that in order to write a GTK application, I write a bunch
I know I can read the PE specification in order to write a code
Please forgive me, but I do know js basics and how to write/call a
I never really know what order is the best installation or if it even
If you know the order of a B-tree, how do you figure out the
I know that in order to programmatically add my own taxonomy to a node
I know that in order for me to force the app to be in

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.