Assembler
You can embed PIC® assembler code in subroutines and functions, as well as your main program code, by using an asm… end asm block. You can also declare local variables inside your subroutine or function and use them in you assembler code. For example,
Function AddTen(value As uinteger) As Byte Dim localVar As uinteger = 10 Asm mov localVar, WREG ; local variable into WREG add value ; add param variable mov WREG, AddTen ; move WREG result into function result End Asm End Function


