ADVANCED TOPICS IN COMPILER DESIGN
CODE GENERATION FOR OBJECT ORIENTED LANGUAGES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
data structures
|
|
assembly language
|
|
assembler
|
|
AI
|
Detailed explanation-1: -A compiler is computer software that transforms computer code written in one programming language (the source language) into another programming language (the target language).
Detailed explanation-2: -Assembly language is a low-level computer programming language. Its instructions are short mnemonics, such as ADD, SUB (subtract), and JMP (jump), that match machine language instructions. An assembler converts assembly language into machine language. A disassembler converts machine language into assembly.
Detailed explanation-3: -So all you have to do is identify each opcode in the assembly language, map it to the corresponding machine instruction, and write the machine instruction out to a file, along with its corresponding parameters (if any). You then repeat the process for each additional opcode in the source file.