From: SourceForge.net <no...@so...> - 2005-06-27 09:31:58
|
Bugs item #1228110, was opened at 2005-06-27 11:31 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1228110&group_id=599 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: pic14 target Group: None Status: Open Resolution: None Priority: 5 Submitted By: Editor (editorx) Assigned to: Nobody/Anonymous (nobody) Summary: bank selection error Initial Comment: after a function call, it doesn't select the correct bank (i attach file) in this steps: ; putchar(chz = getchar()); CALL _getchar ;; peep 2 - Removed redundant move BANKSEL r0x28 MOVWF r0x28 MOVWF _chz MOVF r0x28,W CALL _putchar ok i call getchar function, select chz registry to assign getchar value and call putchar and here work... ;#CSRC up.c 73 ; putchar(chz); BANKSEL _chz MOVF _chz,W CALL _putchar 2nd call of putchar function works (with banksel) ;#CSRC up.c 74 ; putchar(chz); MOVF _chz,W CALL _putchar here there is the problem, _putchar function alters the bank and it doesnt run, if I insert a BANKSEL _chz before MOVF _chz, W this asm work correctly here i report putchar function _putchar ;Function start ; 2 exit points ;#CSRC up.c 16 ; void putchar(const char ch) { BCF STATUS,5 BCF STATUS,6 MOVWF _TXREG i attach the entire .c file, in the case my solution was wrong ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1228110&group_id=599 |