Re: In what ways the assembly language can help us?
Posted: Wed Jul 17, 2013 7:42 pm
Is it possible to add GUI in assembly language?
The Place to Start for Operating System Developers
http://forum.osdev.org./
They hide it, if you don't want to see it. I don't know why it should be forbidden to be visible if necessary.Casm wrote:Because that is not what high level languages do. The whole point of them is to use high level instructions which hide (and are not tied to) the underlying hardware.I don't see the point why access to CPU control registers, I/O ports* or the creation of interrupt handlers should actually be impossible in all high level languages.
GCC is free software, so of course I do have control if I really badly want to.Casm wrote:The compiler emits whatever the compiler writer decided it should emit. Unless you are the person who wrote the code generator, you have no control over that.That's the point. Since everything becomes assembly, your compiler is theoretically capable of emitting every assembly code you could also write yourself.JAAman wrote:ultimately everything becomes assembly
I don't see how that relates to my argument you've cited.Casm wrote:A "high level" language which could do every thing you can do in assembly language would almost by definition not be a high level language. It would at least have to be some kind of strange hybrid.And this, on the other hand, is wrong. Of course there can. There is no fundamental reason to restrict a compiler to emit only arithmetic-logical and branching instructions.JAAman wrote:in other languages, you are not directly controlling the CPU, you are controlling the logic, therefore there can be nothing inherently in the language that can directly control the CPU...
They are implementation defined, not undefined. Otherwise we'd be in big trouble.XanClic wrote:This is already ignoring the fact that most of us (if not all) are horribly abusing C/C++ already by doing basically completely undefined pointer operations (ever casted an integer to a pointer that wasn't created by casting a pointer to an integer?).
Oh, yes, you're right. I'll take back the “horribly”, then.Kevin wrote:They are implementation defined, not undefined. Otherwise we'd be in big trouble.XanClic wrote:This is already ignoring the fact that most of us (if not all) are horribly abusing C/C++ already by doing basically completely undefined pointer operations (ever casted an integer to a pointer that wasn't created by casting a pointer to an integer?).
The fact that access to the whole address space through casting arbitrary integers to pointers is not undefined shows that C is in fact such a hybrid language (at least to me).XanClic wrote:What's the problem with having languages that allow you to access low level stuff in a high level manner and not having to deal with that low level if you don't need to?
Your experience is showing againm12 wrote:Here's a comprehensive list:IdiotOS wrote:In what ways Assembly Language can specially help us to make an operating system ,when comparing to other programming languages like c,c++..?
For example: Controlling fan speed,data handling...
Other than that
Then you'll have a hard time finding any natively compiled language that isn't.XanClic wrote:The fact that access to the whole address space through casting arbitrary integers to pointers is not undefined shows that C is in fact such a hybrid language (at least to me).
Why would I bother? I said I don't see why such languages shouldn't exist and, in fact, I like such “hybrid” languages.Kevin wrote:Then you'll have a hard time finding any natively compiled language that isn't.XanClic wrote:The fact that access to the whole address space through casting arbitrary integers to pointers is not undefined shows that C is in fact such a hybrid language (at least to me).
It's true most compiled language have some kind of 'low level' functionality; but often languages that attempt to create a higher level interface have little or no low level capabilities because the creators see no need to incorporate them. So in this sense there aren't as many "hybrid" languages as it seems at first glance.Kevin wrote:Just saying. A category like "hybrid language" loses its meaning when all languages are part of the category.
I agree with this in the same way that javascript and html are not the same language, even though they're typically embedded in one another.Prochamber wrote:It's true most compiled language have some kind of 'low level' functionality; but often languages that attempt to create a higher level interface have little or no low level capabilities because the creators see no need to incorporate them. So in this sense there aren't as many "hybrid" languages as it seems at first glance.Kevin wrote:Just saying. A category like "hybrid language" loses its meaning when all languages are part of the category.
i.e. Simply having the ability to do inline assembly would not qualify a language to be a low/high level hybrid.