Previous page

Table of contents

Chapter overview

Next page

 

Appendix A

Instruction Set

 

Introduction

Appendix contains all instructions presented separately with examples for their use. Syntax, description and its effects on status bits are given for each instruction.

 

A.1 MOVLW     Write constant in W register

A.2 MOVWF      Copy W to f

A.3 MOVF      Copy f to d

A.4 CLRW      Write 0 in W

A.5 Write 0 in f

A.6 SWAPF      Copy the nibbles from f to d crosswise

A.7 ADDLW      Add W to a constant

A.8 ADDWF      Add W to f

A.9 SUBLW      Subtract W from a constant

A.10 SUBWF      Subtract W from f

A.11 ANDLW      Logic AND W with constant

A.12 ANDWF      Logic AND W with f

A.13 IORLW      Logic OR W with constant

A.14 IORWF      Logic OR W with f

A.15 XORLW      Logic exclusive OR W with constant

A.16 XORWF      Logic exclusive OR W with f

A.17 INCF      Increment f

A.18 DECF      Decrement f

A.19 RLF      Rotate f to the left through CARRY

A.20 RRF      Rotate f to the right through CARRY

A.21 COMF      Complement f

A.22 BCF      Reset bit b in f

A.23 BSF      Set bit b in f

A.24 BTFSC      Test bit b in f, skip if it = 0

A.25 BTFSS      Test bit b in f, skip if =1

A.26 INCFSZ      Increment f, skip if=0

A.27 DECFSZ      Decrement f, skip if = 0

A.28 GOTO      Jump to address

A.29 CALL      Call a program

A.30 RETURN      Return from a subprogram

A.31 RETLW Return from a subprogram with constant in W

A.32 RETFIE      Return from interrupt routine

A.33 NOP      No operation

A.34 CLRWDT      Initialize watchdog timer

A.35 SLEEP      Stand by mode

 

Previous page

Table of contents

Chapter overview

Next page

 

© Copyright 1999. mikroElektronika. All Rights Reserved. For any comments contact webmaster.