Chapter 9 Writing Machine Language Instructions and Directive Statements152 Writing Machine Language Instruction Statements9.3 Writing Machine Language InstructionStatementsEach machine language instruction is defined by specific mnemonics. Mnemonics are formed fromoperations and operands accurately coded in the statement fields previously described.Both upper-case and lower-case letters may be used.Refer to the "Instruction Manual" for details of machine language instructions.Coding rulesWhen coding a label, insert at least one space or tab between it and the operation field.When the label field is omitted, replace it with at least one space or tab.Both upper-case and lower-case letters may be used.Insert at least one space or tab between the operation field and operand field.The assembler and linker optimization function will adjust conditional and unconditional branchinstructions to generate the optimal code.When a relative address is specified in an operand and only labels with specific addresses are coded,the assembler will calculate and set the relative values.Coding examplesSTART mov D0, (A0) ;src=register, dst=register indirectmov 0x11, D0 ;src=immediate data, dst=registernot D0 ;negaterol D0 ;rotate leftror D0 ;rotate rightand 0x0f, D0 ;logical ANDor 0x30, D0 ;logical ORxor D0, D1 ;exclusive ORadd D1, D0 ;additionsub D1, D0 ;subtractionmul D1, D0 ;multiplicationdivu D1, D0 ;divisioncmp 0x05, D0 ;comparisonbra SUBR ;unconditional branchjmp (A0) ;unconditional branch(register indirect)jsr SUBR ;subroutine callrts ;return from subroutine