We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
When I use the new update C51 compiler C51 v620c to translate the following file with SRC directive, the result seems not correct,would keil surport please check it.
#pragma SRC unsigned int ui_MixedParms(unsigned char ucA,bit btCheck, unsigned int uiB){ if (btCheck) return(ucA + uiB); return(uiB - ucA); }
; TST_C_Func2.SRC generated from: TST_C_Func2.c NAME TST_C_FUNC2 ?PR?_ui_MixedParms?TST_C_FUNC2 SEGMENT CODE ?DT?_ui_MixedParms?TST_C_FUNC2 SEGMENT DATA OVERLAYABLE ?BI?_ui_MixedParms?TST_C_FUNC2 SEGMENT BIT OVERLAYABLE PUBLIC ?_ui_MixedParms?BIT PUBLIC ?_ui_MixedParms?BYTE PUBLIC _ui_MixedParms RSEG ?DT?_ui_MixedParms?TST_C_FUNC2 ?_ui_MixedParms?BYTE: uiB?042: DS 2 RSEG ?BI?_ui_MixedParms?TST_C_FUNC2 ?_ui_MixedParms?BIT: btCheck?041: DBIT 1 ; ; unsigned int ui_MixedParms(unsigned char ucA,bit btCheck, unsigned int uiB){ RSEG ?PR?_ui_MixedParms?TST_C_FUNC2 _ui_MixedParms: USING 0 ; SOURCE LINE # 2 ;---- Variable 'ucA?040' assigned to Register 'R5' ---- MOV R5,AR7 ; if (btCheck) ; SOURCE LINE # 4 JNB btCheck?041,?C0001 ; return(ucA + uiB); ; SOURCE LINE # 5 MOV A,R5 MOV R6,#00H ADD A,uiB?042+01H MOV R7,A MOV A,R6 ADDC A,uiB?042 MOV R6,A RET ?C0001: ; return(uiB - ucA); ; SOURCE LINE # 6 CLR C MOV A,uiB?042+01H SUBB A,R5 MOV R7,A MOV A,uiB?042 SUBB A,#00H MOV R6,A ; } ; SOURCE LINE # 7 ?C0002: RET ; END OF _ui_MixedParms END
?_ui_MixedParms?BYTE: uiB?042: DS 2
?_ui_MixedParms?BYTE: ucA?040: DS 1 uiB?042: DS 2