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> CompilerThis may cause misleading results if an assembler routine is calling a specific spot inmemory, therefore page manipulation may be disabled by following the label’s namewith a minus character: -LABEL:- MOVLW 10 ‘ Don’t add page manipulation after this labelNow the same code written without the ASM-ENDASM constructs is: -MOVFW VARSUBLW 1BNZ LABEL2MOVWF VARGOTO LABEL3LABEL2:- MOVLW 2MOVWF VARLABEL3:-As you can see, there is very little difference in pure assembler to assembler writtenwithin the BASIC source.Note: Disabling page manipulation should only be carried out if the asm code resides inthe first page of memory (0-2047).Assembler Literals.The use of literals with assembler mnemonics must follow the same rules as BASICcommands. i.e.% for binary notation$ for hex notation“” for charactersThis differs from the normal notation used within pure assembler, where binary is followedby b, hex is preceded by 0X, and characters are wrapped in single quotes ‘ ’.Pure assembler (i.e. wrapped in ASM-ENDASM or @)MOVLW 01100010bThe same code when used without the ASM-ENDASM: -MOVLW %01100010Complex calculations may also be placed after a literal mnemonic, such as: -MOVLW ( 3 * 30 ) / 10This will place the result of the calculation in the assembler code: -MOVLW 9 ‘ The result of ( 3*30) / 10135Copyright Crownhill 2001

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

Saved successfully!

Ooh no, something went wrong!