TIMER substitute for Color BASIC
Posted: Mon Jan 21, 2013 5:29 pm
The following routine can be used to add a TIMER substitute to a CoCo with Color BASIC only. This routine is useful for randomising the RND() function.
Use the following instead of X=RND(-TIMER) to randomise the RND() function.
Code: Select all
10 POKE243,190:POKE244,0:POKE245,254:POKE246,48:POKE247,1:POKE248,191
20 POKE249,0:POKE250,254:POKE251,126:POKE252,169:POKE253,179
30 X=65283:POKE X,PEEK(X)AND254:POKE269,0:POKE270,243:POKE X,PEEK(X)OR1
Code: Select all
X=RND(-(PEEK(254)*256+PEEK(255)))