There is probably a better way to figure out where in the reset process the code is called, but I don't know what it is, so I devised a system of using a counter which increments every time the code is called. As the code is called during every reset, we can use the odd- or evenness of the counter to decide whether the code is executed before or after the start up banner.