mirror of
https://github.com/nathanriggs/AppleIIAsm-Collection.git
synced 2024-12-11 09:49:17 +00:00
12a0b19398
- added some error control - added initial jump table - fixed a few minor bugs - separated common library into separate subroutine files
30 lines
849 B
Plaintext
30 lines
849 B
Plaintext
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
|