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

Re: 6502 Delay Loops using Applesoft



Allen Bong <allenbsf6502@gmail.com> wrote:
> 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

I've done several projects using such techniques, but each is customized
to its particular usage. 

When I get a chance, I'll provide more detail. 

-michael  -  NadaNet 3.1:  http://home.comcast.net/~mjmahon