Assembly Language Programming with the PIC18F: Part 2
Mohamed Rafiquzzaman · 2017
This chapter provides the second part of the PIC18F's instruction set. Topics include Jump/branch, test/compare/skip, table read/write, subroutine, and system control instructions. Several assembly language programming examples using most of these instructions are provided. The chapter covers delay routines using PIC18F's instructions. The subroutine instructions automatically use the "hardware stack" implemented by the manufacturer. The programmer can create "software stack" if needed for storing local variables. The PIC18F software stack can be implemented by the programmer using data registers and file select registers (FSR)'s. The PIC18F uses one of the FSR's as the software stack pointer, and supports software stack with the register indirect postincrement and predecrement addressing modes. The PIC18F includes only unsigned multiplication instruction. The PIC18F instruction set does not provide any instructions for signed multiplication, unsigned and signed division instructions. The system control instructions are associated with the operation of the PIC18F.