Guest Leon Posted May 15, 2009 Report Share Posted May 15, 2009 (edited) Below is a suggested bug report format: Bug description: CALL function in ASM does not seem to work Steps to reproduce: CODE: #include <system.h> void main() { asm { CLRW MOVWF _portc MOVWF _trisc CALL ROUTINE MOVLW 0xFF MOVWF _portc GOTO LABELEND ROUTINE : MOVLW 0x03 MOVWF _portc RETURN LABELEND : } } Expected behaviour: How a fixed program should behave it should not give an error. Is the problem 100% reproduceable: this problem happens every time IDE version: SourceBoost IDE 6.95 Compiler: Compiler BoostC Compiler version: 6.95 Target device: PIC16F877A OS: Windows XP Profesional SP3 Dutch Comments: If you replace the "CALL" with "GOTO" compiling is not a problem, of course the GOTO is not the same as the call. replacing is just to check spelling and to check if the software works. Regards, Leon Edited May 16, 2009 by Leon Quote Link to post Share on other sites
Reynard 0 Posted May 16, 2009 Report Share Posted May 16, 2009 Hi Leon, You may have to put your ROUTINE into a separate function like this: void MyFunc(void) { asm { MOVLW 0x03 MOVWF _portc RETURN } } Cheers Reynard Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.