Atari's Cinderella, OS tutorial (CINDER4.BAS)

Atari's Cinderella, OS tutorial by Fred Pinho, 18

Description

Atari's Cinderella, OS tutorial by Fred Pinho, 18

From the Antic disk of March 1984 (Vol. 2 No. 12).

The magazine article

From the Antic Software Archive at atarimagazines.com. The program remains the property of its author and publisher.

What is in this file

Atari BASIC program · 1.2 KB

Dialect
Atari BASIC
Lines
21
Variables
T, JF, TS, HRS, MINS, SECS, STJF, COUNT, X
BASIC listing (21 lines)
500 GRAPHICS 3:POKE 752,1
510 ? "COUNT-UP TIMER";:GOSUB 690
520 POKE 18,0:POKE 19,0:POKE 20,0:REM SET CLOCK TO 0
530 FOR T=1 TO 700:JF=PEEK(18)*65536+PEEK(19)*256+PEEK(20):REM TOTAL JIFFIES
540 TS=JF/59.92:REM TOTAL SECONDS
550 HRS=INT(TS/3600):MINS=INT((TS-(HRS*3600))/60):SECS=INT((TS-MINS*60)+0.5)
560 POKE 656,2:POKE 657,2:? HRS;"  HRS    ";MINS;"  MINS    ";SECS;"  SECS";"  ";
570 NEXT T:POKE 656,3:POKE 657,2:? "COMPLETED! PLEASE WAIT!":GOSUB 690:GOSUB 690
580 ? CHR$(125);:REM CLEAR SCREEN
590 ? "COUNT-DOWN TIMER"
600 ? "NUMBER MINUTES DESIRED";:INPUT MINS
610 ? "NUMBER SECONDS DESIRED";:INPUT SECS
620 STJF=MINS*3600+SECS*60:REM TOTAL JIFFIES TO COUNT DOWN
625 POKE 18,0:POKE 19,0:POKE 20,0:REM SET CLOCK TO 0
630 COUNT=PEEK(18)*65536+PEEK(19)*256+PEEK(20)
640 JF=STJF-COUNT
650 TS=JF/59.92:HRS=INT(TS/3600):MINS=INT((TS-(HRS*3600))/60):SECS=INT((TS-MINS*60)+0.5)
660 POKE 656,3:POKE 657,2:? HRS;"  HRS    ";MINS;"  MINS    ";SECS;"  SECS";"  ";
670 IF JF>0 THEN 630
680 ? :? "TIMED OUT!":END
690 FOR X=1 TO 500:NEXT X:RETURN