REM > 6502.ProgTips.60to100 REM Multiply by 1.66 - convert 60x to 100x REM Used to convert 1/60th frame counter to 1/100th frame counter : num=&70:add=&74 DIM mcode% 100 FOR P=0 TO 1 P%=mcode% [OPT P*2 \ On entry num+0..num+3 = 1/60th count \ On exit num+0..num+3 = 1/100th count, (input/60*100) +- 1 \ Uses add+0..add+3 LDA num+3:STA add+3 :\ add=num LDA num+2:STA add+2 LDA num+1:STA add+1 LDA num+0:STA add+0 .loop LSR add+3:ROR add+2:ROR add+1:ROR add+0 :\ add=add/2 LDA num+0:ADC add+0:STA num+0 :\ num=num+add LDA num+1:ADC add+1:STA num+1 LDA num+2:ADC add+2:STA num+2 LDA num+3:ADC add+3:STA num+3 LSR add+3:ROR add+2:ROR add+1:ROR add+0 :\ add=add/2 LDA add+3:ORA add+2:ORA add+1:ORA add+0 :\ test add BNE loop :\ loop until add=0 RTS ]NEXT : FOR A=0 TO &222222:!num=A*60:CALL mcode%:PRINT A*60,INT(A*100),!num:NEXT