What are Instruction formats?

HOME

when the assembler processes an Instruction it converts the instruction from its mnemonics form to standard manchine language format called the "Instruction format". In the process of convertion the assembler must determine the type of instruction, convert symbolic labels and explicit notation to a base/displacement format, determine the lengths of certain operands and parse any literal and constants.

An instruction format defines layout of bits of an instruction, in terms of its constituent parts.

An instruction format must include an opcode and implicitly or explicitly, zero or more operands.

Each explicit operand is referenced using one of addressing modes.

Format must, implicitly or explicitly, indicate addressing mode for each operand.


For most instruction sets, more than on instruction format is used.


General Instruction Format
Opcode-Field Address-Field

Op-field: specifies the operation to be performed;
Address-field: provides operands or the CPU register/MM addresses of the operands.