Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Keep these headers */
- #include <stdbool.h>
- #include <stddef.h>
- #include <stdint.h>
- #include <tice.h>
- /* Standard headers - it's recommended to leave them included */
- #include <math.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- /* Shared library headers -- depends on which ones you wish to use */
- #include <fileioc.h>
- const char prgmName[] = "ABC";
- void main() {
- ti_var_t myProgram;
- uint16_t programSize;
- uint8_t *dataPointer;
- uint8_t token;
- /* Close any files that may be open already */
- ti_CloseAll();
- /* Open a new variable; deleting it if it already exists */
- myProgram = ti_Open(prgmName,"r",ti_Program);
- /* Make sure we opened okay */
- if (!myProgram) goto err;
- dataPointer = ti_GetDataPtr( myProgram );
- programSize = ti_GetSize( myProgram );
- token = *dataPointer++;
- err:
- ti_CloseAll();
- prgm_CleanUp();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement