DELAYMS MSCNT EQU $0CA ; 202 TIMES THROUGH DELAY1 ; SPECIFIC TO 1.23 MHZ ; SPEED OF APPLE II :DELAY CPY #0 ; 2 CYCLES BEQ :EXIT ; 2C (EXIT IF DEL=0) NOP ; 2 CYCLES (MAKE OVERHEAD=25C) CPY #1 ; 2 CYCLES BNE :DELAYA ; 3C IF TAKEN, ELSE 2C JMP :LAST1 ; 3C :DELAYA DEY ; 2C (PREDEC Y) :DELAY0 LDX #MSCNT ; 2C :DELAY1 DEX ; 2C BNE :DELAY1 ; 3C NOP ; 2C NOP ; 2C DEY ; 2C BNE :DELAY0 ; 3C :LAST1 LDX #MSCNT-3 ; 2C :DELAY2 DEX ; 2C BNE :DELAY2 ; 3C :EXIT RTS ; 6C