A machine instruction consists of one or more bits, up to a maximum of 64 bits.
Format
The user specifies the format of the instruction by specifying a list of fields for the instruction. Each field corresponds to a certain number of bits of the instruction. The first field stores the opcode of the instruction. The machine uses the opcode to determine which instruction it is. The remaining fields include the operands of the instruction.
For example, a 16-bit instruction might have a 4-bit opcode, a 2-bit field, and a 10-bit field.
To specify the format of a machine instruction, you use the machine instruction dialog. In that dialog, you can choose which fields to include and the order in which to include them. The only restriction is that the opcode field must come first.
To provide flexibility in the assembly language, you have several options that allow you to format the assembly instruction corresponding to the machine instruction differently than the format of the actual instruction. For example, you can list the fields in a different order in assembly language than their order in the machine instruction. The assembler will rearrange the fields when constructing the machine instruction. Also, you can include 0-bit fields, which are just used as punctuation in the assembly language instruction. For example, an instruction might have a format "loadr A0 -3[A1]", which contains six fields. Here "loadr" is the name of the instruction, which is assembled into the opcode, A0 and A1 are symbols representing registers, and the brackets are just punctuation, represented as 0-bit fields.
You can also specify one field as optional, which means that you need not include a value for that field in assembly language programs. If you do not include a value, a default value is used for the field. In addition, you can specify some fields to be ignored, which means that you never specify a value for that field in assembly language programs and instead a default value is always used.
Furthermore, you can specify whether you want the address of the instruction or its successor to be subtracted from the value of the field when it is assembled into machine language. Such subtractions are useful for pc-relative addressing.
Finally, you can specify a range of legal values for each field. In particular, you can say that the field only takes positive integers as values or that it can take signed values. You can also specify particular values as the only legal ones. In that case, you need to supply a name for each of those values and then use those names in assembly language programs when supplying a value for the field.
Execute sequence
Each machine instruction also specifies a list of microinstructions that form the implementation of the machine instruction and that are executed when the machine instruction is to be executed. This microinstruction list is called the "execute sequence" of the instruction. Every execute sequence should contain an End microinstruction, which causes the machine to stop executing the current execution sequence and start executing the fetch sequence, and so cause the start of a new machine cycle.
Parameters: