Wednesday, January 20, 2010

Why do you think we cannot have full control over hardware when using a higher language like Java, C, or C++?

Accessibility to hardware is one of the main reasons for programming in assembly language.


Why do you think we cannot have full control over hardware when using a higher language like Java, C, or C++?Why do you think we cannot have full control over hardware when using a higher language like Java, C, or C++?
i could think of a couple of reason :





1. hardware spesific code would not run on different hardware, and it will your program untransportable. you would need to code different code on different hardware, if you want to write high level program you wouldn't need access directly to hardware.





2. having full control over hardware is like what uncle Ben said to peter parker.. with too much powers comes too much responsibility... uhmm well point being :D too much responsibility is given to programmer that could end up destroying / damaging the hardware. OS needs u to let it control the hardware so to prevent you from causing a catastrhope and cause the OS to crash or something worse.


(of course assembly user are allowed simply because they are aiming to


program in low level and thus will have more concentration and awareness to maintain hardware manually , unlike when we're dealing with high level programming)





is that enough ?Why do you think we cannot have full control over hardware when using a higher language like Java, C, or C++?
hard-ware is run by software. if you can alter the code that runs the hardware, then you can change it... but the hardware only works 1 way, so changing the software would damage it completely(which is why most languages dont give you control). i would not suggest altering it.
It depends on the operating system. In Windows, for instance, programs not part of the OS itself (like drivers) can't access much hardware directly. (In C, you CAN access hardware directly in operating systems that allow it.)
  • face mask
  • No comments:

    Post a Comment