Computer Science, asked by hermione4739, 1 year ago

Explain the steps involved in writing a program using an assembler

Answers

Answered by AneesKakar
0

Answer:

There are certain steps to be followed while writing a program using an assembler. These steps are:

Explanation:

  • First you need to read input line from the text assembly file.
  • After reading the input line, parse the opcode. This is generally the first word of the input line you read.
  • Once you get to know the opcode, you are required to create final 8 bits in binary for the instruction.
  • Based on the opcode obtained, you can get to know if the succeeding words in input line are registers, addresses etc. After this parse the final words from the input line. Now you have all the bits required to create the instruction.
  • Convert the 8 bits for the instruction into 2 character hexadecimal number.
  • Go back to first step till all the instructions are processed.

Similar questions