1 File I/O Exercise
The file I/O exercise shows how to use standard ANSI C I/O features within the current tools suite.
Hands On
1.Create a new text file called io.c.
2.Within the io.c file, write code using the ANSI C printf function to display Welcome to StarCore SC140 Tools on the screen (remember to include the header file stdio.h),
3.Compile the file using ccsc100 io.c
The
4.Run the executable runsc100 io.eld to display Welcome to StarCore SC140 Tools.
The runsc100 executable is a
Congratulations, you have completed Exercise 1.
Good To Know
The SC140 core supports both Big Endian and Little Endian data representations. Therefore, the SC140 tools support both modes. By default, ccsc100 and runsc100 use Little Endian mode.
Big Endian mode can be selected by:
•specifying the
•specifying the
If the code is built using Big Endian mode, it must be run using Big
Endian mode.
Reminder: (memory storage of a = 0x12345678)
Big Endian Mode | Little Endian Mode | ||
p:00 | 1234 | p:00 | 7856 |
p:02 | 5678 | p:02 | 3412 |
4 | Introduction to the SC140 Tools |