Question

In: Computer Science

An assembler translates assembly language to machine language instructions. A disassembler can be used to translate...

  1. An assembler translates assembly language to machine language instructions. A disassembler can be used to translate the other way, from machine language to assembly language. For example, our 8086 emulator shows both the machine language bytes and the disassembler output while running a program (it also shows the original assembly code). The disassembled code is usually harder to read than the original assembly language program because some things are missing or may be incorrect. Write down one of the things that may be missing or incorrect

Solutions

Expert Solution

Assembler translates assembly language to machine language instructions and Disassembler translates machine language to assembly language. 8086 emulator shows both machine language bytes and disassembler output while running a program and it also shows the original assembly code.The disassembled code is difficult to read than the original assembly language program, because some things are missing or it may be incorrect. The missing terms in disassembly code is constants and comments.

Disassembler is actually the inverse of assembler. The output of disassembler is often formatted for human readablilty.

Because when an assembly language is converted into machine language by an assembler,constants and comments are removed from the assembled machine language. So when a disassembler works on these machine language ,it produce an assembly code which lacks constants ad comments User defined textual identifiers such as variables,labels and macros are removed by the assembler. These comments made the program easy t o understand and it gives some information about the purpose of the code.

In disassembler it is difficult to separate code from data. Data may be inserted into the code section or code may be inserted in the data section. It is not possible for all input programs.


Related Solutions

Translate the C function code below to the MIPS True Assembler Language code (machine instructions only)....
Translate the C function code below to the MIPS True Assembler Language code (machine instructions only). The function code should follow the conventions for MIPS function calls including passing parameters and returning results. Your function code must be written with the minimum number of machine instructions to be executed and without any use of MIPS pseudo-instructions. Myfunction(unsigned int a, unsigned int b, unsigned int c) { int i=0; while (a > c) { a /= b; i++; } return i;...
1. Convert the machine language instructions into assembly language instructions: 7976C1 06
1. Convert the machine language instructions into assembly language instructions: 7976C1 06
Question: In the following MIPS assembly code, translate all the instructions to their corresponding machine code...
Question: In the following MIPS assembly code, translate all the instructions to their corresponding machine code in hexadecimal format. This code is stored in the memory from address 0x2fff0004. Loop: lw $t0, 4($s0)             addi $t1, $t1, -15             sll $t1, $t1, 2             beq $t1, $s1, Exit             addi $s0, $s0, 4             j Loop Exit: …
Translate these two LEGv8 assembly instructions to 32-bit binary machine code. Give your answer in hexadecimal....
Translate these two LEGv8 assembly instructions to 32-bit binary machine code. Give your answer in hexadecimal. CBZ X19, exit ADD X10, X19, X20 exit:
What are the pseudo instructions commonly used in the MCS-51 assembly language? What effect does each...
What are the pseudo instructions commonly used in the MCS-51 assembly language? What effect does each directive have? 6. Provided data area from 1000H to 10FFH in external RAM, transfer the data to the area starting at 2500H in external RAM. Please write the program. 11. The crystal oscillator frequency of system is 12MHz. Write the delay subroutine with delay time of 50ms.
Take the following C++ program and translate it into assembly language( pep9 ) #include using namespace...
Take the following C++ program and translate it into assembly language( pep9 ) #include using namespace std; char ch; int main() {    cin >> ch;    cout << "You inputted " << ch << endl;    ch++;    cout << "Next character is " << ch << endl; if (ch <= ‘Z’)         cout << “Could be luppercase\n”;    return 0; }
Translate the following C code into M4K assembly language. You do not have to use the...
Translate the following C code into M4K assembly language. You do not have to use the frame pointer, just use $sp if you need to use the stack. You do not have to show the stack initialization nor stack cleanup. If you need a specific value for an address, just make an assumption. int A; main() { int B = 5; B = A+B }; // main //Disassembly starts here !main() { //stack and frame pointer init // you do...
The Indexed addressing mode can not be used to specify the destination in MSP430 assembly language...
The Indexed addressing mode can not be used to specify the destination in MSP430 assembly language programs. Select one: True False
Write a sequence of assembly language instructions to subtract each entry of an array A of...
Write a sequence of assembly language instructions to subtract each entry of an array A of five two’s complement 16-bit binary integers from the corresponding entry of an array B of five two’s complement 16-bit binary integers and construct a third array C of two’s complement 16-bit binary integers. i.e. C[i] = A[i] - B[i]. Use the following data for the arrays A and B. A: 10, -15, 20, 4, -5 B: 25, -5, -30, 6, 10 please answer in...
Why is assembly language considered more user friendly than machine language?
Why is assembly language considered more user friendly than machine language?  How does a low-level programming language differ from a high-level programming language?  Discuss five protocols that people use when communicating with each other over the internet.  What steps would you take to safeguard your computer against computer viruses?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT