11.07.2015 Views

PICBASIC PLUS LITE Manual - Profe Saul

PICBASIC PLUS LITE Manual - Profe Saul

PICBASIC PLUS LITE Manual - Profe Saul

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>PICBASIC</strong> <strong>PLUS</strong> CompilerSpecial instruction mnemonics.MPASM has some extra commands known as SPECIAL INSTRUCTION MNEMONICS.They are simply built in macros, but can make coding a lot easier. The more useful ofthese have also been incorporated into the compiler as BASIC commands, just thesame as the standard mnemonics. The special instructions are listed below: -Mnemonic Description Equivalent OperationsBK label Branch GOTO labelBC label Branch on CARRYBTFSC 3,0GOTO labelBDC label Branch on DIGIT CARRYBTFSC 3,1GOTO labelBNC label Branch on NO CARRYBTFSS 3,0GOTO labelBNDC label Branch on NO DIGIT CARRYBTFSS 3,1GOTO labelBZ label Branch on ZEROBTFSC 3,2GOTO labelBNZ label Branch on NO ZEROBTFSS 3,2GOTO labelCLRC Clear CARRY BCF 3,0CLRDC Clear DIGIT CARRY BCF 3,1CLRZ Clear ZERO BCF 3,2MOVFW file Move File to WREG MOVF file,WSETC Set CARRY BSF 3,0SETDC Set DIGIT CARRY BSF 3,1SETZ Set ZERO BSF 3,2SKPC Skip on CARRY BTFSS 3,0SKPNC Skip on NO CARRY BTFSC 3,0SKPDC Skip on DIGIT CARRY BTFSS 3,1SKPNDC Skip on NO DIGIT CARRY BTFSC 3,1SKPZ Skip on ZERO BTFSS 3,2SKPNZ Skip on NO ZERO BTFSC 3,2There are also some special mnemonics unique to the compiler, these are all for jumpingaround in the code. Because the mnemonic GOTO is also a BASIC command, itinvariably manipulates page boundaries, however, in an assembler routine, this is oftenundesirable, therefore several commands have been added to allow jumps with or withoutpage manipulation. These are: -JUMP labelLJUMP labelLGOTO label‘ Jumps to a specified label without manipulating any pages‘ Jumps to a specified label with page manipulation‘ Same as BASIC GOTO but allows $ or address as label137Copyright Crownhill 2001

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!