Famicom World

Family Computer => Famicom / Disk System => Topic started by: Jaek_3 on June 19, 2016, 07:28:49 pm

Title: BASIC timer?
Post by: Jaek_3 on June 19, 2016, 07:28:49 pm
Would anyone know how to make a timer in Famicom BASIC which counts down from 1000 to 0?
Title: Re: BASIC timer?
Post by: Wanderer on June 20, 2016, 03:24:41 am
10 A = 1000
20 A =  A - 1
30 IF A > 0 THEN GOTO 20                      // GOTO loop...  :-[

Would be a timer counting from 1000 to 0.

What do you actually need the timer for though? Is the timer supposed to have output? If so what's it supposed to look like?
Title: Re: BASIC timer?
Post by: zmaster18 on June 20, 2016, 06:29:29 am
Quote from: Wanderer on June 20, 2016, 03:24:41 am
10 A = 1000
20 A =  A - 1 :PRINT A;
30 IF A > 0 THEN GOTO 20                      // GOTO loop...  :-[

Would be a timer counting from 1000 to 0.

What do you actually need the timer for though? Is the timer supposed to have output? If so what's it supposed to look like?

This works, just add a PRINT command to see what's going on. You can adjust the speed of your timer if you use a PAUSE