The main loop is located in the "EDIT.c" file and it starts on line 418.
This is what line 416-421 looks like:
//Main loop
iExit=0;
do{
//Inititializations
iRefresh=0;
As you can see, there is a comment at the top stating that it is the main loop, it is a do-while loop instead of a while loop, they are basically the same except do-while loops will always run once first and then check whether the statement evaluates to true or not. e.g
int c = 0;
do{
c = -1;
}while(c > 1);
The above code will only run once and then stop because -1 is not bigger than 1. If it was a while loop instead, it wouldn't even run once as it will check if (c > 1) before the code within the while loop is run.
You will need to add your code before line 418.
Edited by Viliami, 20 March 2016 - 06:57 AM.