What are the limitation of single pass assembler over multipass assembler?
Answers
Answered by
0
Ok, so the question I believe you wanted the answer for, what is the disadvantage of a single pass assembler over a 2 pass assembler, where they both generate an executable (No linker).
So a single pass assembler, the biggest problems is forward references. The classic problem of if you jump to a forward label, it won’t know automatically if you need a near, or a far jump. So you either have to state it explicitly, or the assembler may have to just make everything far.
Any forwarding label reference will cause problems. Suppose you want to compile in an array of chars, and you want to calculate it’s size. You can only do this calculation AFTER the definition. You can’t place it before in a single pass assembler, because it won’t know those addresses until the compiler has already gone past them.
The other big disadvantage, is a single pass assemblers traditionally don’t really generate a symbol table, or object code. So you can’t “link” it with anything else. There is no object file generated so that you can link it with other languag
So a single pass assembler, the biggest problems is forward references. The classic problem of if you jump to a forward label, it won’t know automatically if you need a near, or a far jump. So you either have to state it explicitly, or the assembler may have to just make everything far.
Any forwarding label reference will cause problems. Suppose you want to compile in an array of chars, and you want to calculate it’s size. You can only do this calculation AFTER the definition. You can’t place it before in a single pass assembler, because it won’t know those addresses until the compiler has already gone past them.
The other big disadvantage, is a single pass assemblers traditionally don’t really generate a symbol table, or object code. So you can’t “link” it with anything else. There is no object file generated so that you can link it with other languag
Similar questions
Biology,
7 months ago
Science,
7 months ago
Physics,
7 months ago
Computer Science,
1 year ago
Computer Science,
1 year ago
Chemistry,
1 year ago
Science,
1 year ago