Page 133 - Understanding Automotive Electronics
P. 133

2735 | CH 4  Page 120  Tuesday, March 10, 1998  11:06 AM



                4                     MICROCOMPUTER INSTRUMENTATION AND CONTROL





                Table 4.1
                                            Mnemonic            Operand                Comment
                Assembly Language
                Mnemonics              JMP                (Address)           Jump to new program location
                                       JSR                (Address)           Jump to a subroutine
                                       BRA                (Offset)            Branch using the offset
                                       BEQ                (Offset)            Branch if accumulator is zero
                                       BNE                (Offset)            Branch if accumulator is nonzero
                                       BCC                (Offset)            Branch if carry bit is zero
                                       BCS                (Offset)            Branch if carry bit is nonzero
                                       BPL                (Offset)            Branch if minus bit is zero
                                       BMI                (Offset)            Branch if minus bit is nonzero
                                       RTS                                    Return from a subroutine
                                                            a. Program Transfer Instructions

                                            Mnemonic             Operand               Comment
                                       LDA                (Address)           Load accumulator from memory
                                       STA                (Address)           Store accumulator to memory
                                       LDA                # (Constant)        Load accumulator with constant
                                       LDS                # (Constant)        Load stack pointer with constant
                                       STS                (Address)           Store stack pointer to memory
                                                             b. Data Transfer Instructions


                                            Mnemonic             Operand               Comment
                                       COM                                    Complement accumulator   (NOT)
                                       AND                (Address)           AND accumulator with memory
                                       OR                 (Address)           OR accumulator with memory
                                       ADD                (Address)           Add accumulator with memory
                                       SUB                (Address)           Subtract accumulator with memory
                                       AND                # (Constant)        AND accumulator with constant
                                       OR                 # (Constant)        OR accumulator with constant
                                       SLL                                    Shift accumulator left logical
                                       SRL                                    Shift accumulator right logical
                                       ROL                                    Rotate accumulator left
                                       ROR                                    Rotate accumulator right
                                                          c. Arithmetic and Logical Operations







                120                   UNDERSTANDING AUTOMOTIVE ELECTRONICS
   128   129   130   131   132   133   134   135   136   137   138