[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

6502 Delay Loops using Applesoft



Hi,

Has anyone written a gereral delay loop calculating program in
Applesoft, to calculate the constants required to gererate the
required time delays in 6502 codes?
For example:

ZP1              EQU   $XX      ;ANY UNUSED ZP ADDR
ZP2              EQU   $XX      ;ANY UNUSED ZP ADDR

DELAY         PHA
                    LDA  K1
                    STA  ZP1
LOOP1         LDA  K2
                    STA  ZP2
LOOP2         DEC  ZP2
                    BNE  LOOP2
                    DEC  ZP1
                    BNE  LOOP1
                    PLA
                    RTS

I have searched through google and never found one.  But there are
some written using JAVA for other cpu and mcu.  I ask because I needed
them from time to time doing small projects and if someone has already
written one, I wouldn't have to reinvented the wheel or else........

Thank you.

Allen