Page 1 of 1

ASM IN FLOWCODE

Posted: Wed May 14, 2008 7:39 am
by raghavmonga
i got the following errors when i wrote-:

asm
{
bsf 03h,5 ;Go to Bank 1
movlw 00h ;Put 00000 into W
movwf 85h ;Move 00000 onto TRISA – all pins set to output
bcf 03h,5 ;Come back to Bank 0
}

error: error in built-in assembly

i m using FlowcodeV3 for PIC

Re: ASM IN FLOWCODE

Posted: Wed May 14, 2008 10:51 am
by Steve
Hello,

It looks like the compiler must use actual register names, rather than their addresses in RAM. The following code should work fine:

Code: Select all

asm
{
  bsf _status,5   ;Go to bank 1
  movlw 00h       ;Put 00000 into W
  movwf _trisa    ;Move 00000 onto TRISA - all pins set to output
  bcf _status,5   ;Come back to Bank 0
}

Re: ASM IN FLOWCODE

Posted: Wed May 14, 2008 12:38 pm
by raghavmonga
Thanks Steve