Advertisement
PT_

Untitled

PT_
Apr 22nd, 2017
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. /* Keep these headers */
  2. #include <stdbool.h>
  3. #include <stddef.h>
  4. #include <stdint.h>
  5. #include <tice.h>
  6.  
  7. /* Standard headers - it's recommended to leave them included */
  8. #include <math.h>
  9. #include <stdio.h>
  10. #include <stdlib.h>
  11. #include <string.h>
  12.  
  13. /* Shared library headers -- depends on which ones you wish to use */
  14. #include <fileioc.h>
  15.  
  16. const char prgmName[] = "ABC";
  17.  
  18. void main() {
  19. ti_var_t myProgram;
  20. uint16_t programSize;
  21. uint8_t *dataPointer;
  22. uint8_t token;
  23.  
  24. /* Close any files that may be open already */
  25. ti_CloseAll();
  26.  
  27. /* Open a new variable; deleting it if it already exists */
  28. myProgram = ti_Open(prgmName,"r",ti_Program);
  29.  
  30. /* Make sure we opened okay */
  31. if (!myProgram) goto err;
  32.  
  33. dataPointer = ti_GetDataPtr( myProgram );
  34. programSize = ti_GetSize( myProgram );
  35.  
  36. token = *dataPointer++;
  37.  
  38. err:
  39. ti_CloseAll();
  40. prgm_CleanUp();
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement