Test code for NES. Based on the example from NESHLA