The run_end_of_sim_sequence()
assembly function is called at the end of the simulation. It contains code to cause the simulator to terminate running the diag and exit with the PASS/FAIL status as it's error code.
This function can be updated to add support for additional simulators.