.WaitForNextNMI LDA nmiCounter ; Set A to the NMI counter, which increments with each ; call to the NMI handler .wfrm1 CMP nmiCounter ; Loop back to wfrm1 until the NMI counter changes, BEQ wfrm1 ; which will happen when the NMI handler has been called ; again (i.e. at the next VBlank) RTS ; Return from the subroutineName: WaitForNextNMI [Show more] Type: Subroutine Category: Utility routines Summary: An unused routine that waits until the NMI counter increments (i.e. the next VBlank)Context: See this subroutine in context in the source code References: No direct references to this subroutine in this source file
[X]
Variable nmiCounter in workspace WP
A counter that increments every VBlank at the start of the NMI handler
[X]
Label wfrm1 is local to this routine