fork download
  1. #include <stdio.h>
  2.  
  3. #define V_MEMROM1_FAR
  4. #define V_MEMROM2_FAR const
  5. typedef unsigned short vuint16;
  6. typedef V_MEMROM1_FAR unsigned long V_MEMROM2_FAR* tWdFuncCpyPtr;
  7. typedef tWdFuncCpyPtr tWdFuncCpyPtrCast;
  8. #define V_API_NEAR
  9. #define V_API_NEAR
  10. #define GetFblLookForWatchdogEnd() (FblLookForWatchdogEnd)
  11. #define GetFblLookForWatchdogStart()(FblLookForWatchdog)
  12.  
  13. unsigned char V_API_NEAR FblLookForWatchdog( void )
  14. {
  15. unsigned char retValue = 0x00u;
  16. int a;
  17. if(a)
  18. {
  19. retValue |= 0x02u;
  20. if(a>100)
  21. {
  22. retValue |= 0x03u;
  23. }
  24. return retValue;
  25. }
  26. }
  27.  
  28. void V_API_NEAR FblLookForWatchdogEnd( void )
  29. {
  30. }
  31.  
  32.  
  33.  
  34.  
  35. unsigned long WDTriggerBuffer[65];
  36.  
  37. int main()
  38. {
  39. unsigned short index = 0x00u;
  40. tWdFuncCpyPtr WdFuncCpyPtr;
  41. printf("%d",(tWdFuncCpyPtrCast)GetFblLookForWatchdogEnd());
  42. for( WdFuncCpyPtr = (tWdFuncCpyPtrCast)GetFblLookForWatchdogStart(); /*lint !e740 !e611 */
  43. WdFuncCpyPtr < (tWdFuncCpyPtrCast)GetFblLookForWatchdogEnd();
  44. WdFuncCpyPtr++)
  45. {
  46. ((vuint16*)WDTriggerBuffer)[index*2u] = *((vuint16*)WdFuncCpyPtr);
  47. ((vuint16*)WDTriggerBuffer)[index*2u+1u] = *(((vuint16*)WdFuncCpyPtr)+1);
  48. index++;
  49. }
  50. }
Success #stdin #stdout 0s 5280KB
stdin
Standard input is empty
stdout
452026832