| | |
Four questions
![]() |
Hi
I have 4 questions
1-Is it right that when you learn assembly you learn machine language,too?How?
2-What makes a programming language feature OS dependent?
3-Does Assembly have OS dependent feature?what about HLA?
4-How can i write an OS independent program(bootable programs)?
thanks alot
I have 4 questions
1-Is it right that when you learn assembly you learn machine language,too?How?
2-What makes a programming language feature OS dependent?
3-Does Assembly have OS dependent feature?what about HLA?
4-How can i write an OS independent program(bootable programs)?
thanks alot
My heart hates death
but in the moment that the morning of life is dark,
and there is a war between the good and the evil
being sank by the mouth of death,is sweet.
and yes that is worthy for chilvary
but in the moment that the morning of life is dark,
and there is a war between the good and the evil
being sank by the mouth of death,is sweet.
and yes that is worthy for chilvary
I can answer 1 and 3 for you right now.
1. As far as I know, Assembly IS machine language. It's the actual instructions that get passed to the CPU. Hence having to manually keep track of a lot of things that high-level languages do for you automatically.
3. Assembly isn't OS dependent. However, compiling it to runnable files can be dependent on the OS (like a .exe file for Windows). The source is unchanged by the OS it's run on, but what it IS dependent on is the architecture of the CPU. The most common is the 80x86 architecture (found in most desktops), but there are others like MIPS. This means that different architectures have different instruction sets, etc.
The other thing the source does actually depend on is the compiler too. Like, NASM and MASM use slightly different syntaxes in the ASM source code.
And I don't know anything about HLA
1. As far as I know, Assembly IS machine language. It's the actual instructions that get passed to the CPU. Hence having to manually keep track of a lot of things that high-level languages do for you automatically.
3. Assembly isn't OS dependent. However, compiling it to runnable files can be dependent on the OS (like a .exe file for Windows). The source is unchanged by the OS it's run on, but what it IS dependent on is the architecture of the CPU. The most common is the 80x86 architecture (found in most desktops), but there are others like MIPS. This means that different architectures have different instruction sets, etc.
The other thing the source does actually depend on is the compiler too. Like, NASM and MASM use slightly different syntaxes in the ASM source code.
And I don't know anything about HLA
Last edited by shadwickman; Apr 2nd, 2009 at 6:21 pm.
"Two good old boys in a fire-apple red convertible. Stoned. Ripped. Twisted. Good people."
- Hunter S. Thompson
my photography
- Hunter S. Thompson
my photography
But again ASM instructions must be introduced to the CPU.no?
if yes,What does that?
and HLA stands for High Level Assembler and is a kind of assembly that supports some commands of high level languages like condition statements
if yes,What does that?
and HLA stands for High Level Assembler and is a kind of assembly that supports some commands of high level languages like condition statements
My heart hates death
but in the moment that the morning of life is dark,
and there is a war between the good and the evil
being sank by the mouth of death,is sweet.
and yes that is worthy for chilvary
but in the moment that the morning of life is dark,
and there is a war between the good and the evil
being sank by the mouth of death,is sweet.
and yes that is worthy for chilvary
•
•
Join Date: Sep 2008
Posts: 1,568
Reputation:
Solved Threads: 196
•
•
•
•
Hi
I have 4 questions
1-Is it right that when you learn assembly you learn machine language,too?How?
2-What makes a programming language feature OS dependent?
3-Does Assembly have OS dependent feature?what about HLA?
4-How can i write an OS independent program(bootable programs)?
thanks alot
-A specific hardware has a specific set of instructions that it can execute. http://en.wikipedia.org/wiki/Instruc...t_architecture
-If your programming language wants to run on that architecture, it must somehow break all of its high level statements down into instructions that that architecture can understand. So if I want C code to run on a specific architecture, there needs to be a compiler that breaks the C code statements into machine code that the machine understands.
Note: I think this process happens by first breaking the C code down into assembly language statements that the machine understands, then breaking the assembly into machine code. But I'm not positive about that.
Last edited by BestJewSinceJC; Apr 3rd, 2009 at 11:43 am.
So there must be different versions of a compiler for different architectures.Is it right?
And does the word architecture returns just to CPU?
And does the word architecture returns just to CPU?
Last edited by pywriter; Apr 3rd, 2009 at 1:29 pm.
My heart hates death
but in the moment that the morning of life is dark,
and there is a war between the good and the evil
being sank by the mouth of death,is sweet.
and yes that is worthy for chilvary
but in the moment that the morning of life is dark,
and there is a war between the good and the evil
being sank by the mouth of death,is sweet.
and yes that is worthy for chilvary
Well in computer architectures , the newer versions have new technology appended to the older ones .
so if ur programming 8086 on an intel core 2 duo processor , it would still work (but the vice - verse will not ) , its just the size of the registers and their no changes but the primary architecture still remains the same .
well the above i said assuming that intel pc s are used .
well as far as i know it may/maynot work for motorola or IBM pc `s .
so if ur programming 8086 on an intel core 2 duo processor , it would still work (but the vice - verse will not ) , its just the size of the registers and their no changes but the primary architecture still remains the same .
well the above i said assuming that intel pc s are used .
well as far as i know it may/maynot work for motorola or IBM pc `s .
•
•
Join Date: Sep 2008
Posts: 1,568
Reputation:
Solved Threads: 196
Yes, since different architectures have different sets of instructions (instructions break down into machine code), different architectures would need a different compiler.
![]() |
Similar Threads
- I have a few questions to be patched up can anybody get these to me ? (C++)
- Questions about Forum (Geeks' Lounge)
- Preparing for an interview and need some questions answered (C)
- Wireless Questions (Networking Hardware Configuration)
- Linux printing questions (*nix Hardware Configuration)
- Tutorials & Code Submissions - Questions? (DaniWeb Community Feedback)
Other Threads in the Assembly Forum
- Previous Thread: Help with Assemblt on AMD64
- Next Thread: Floating point numbers
| Thread Tools | Search this Thread |






