home *** CD-ROM | disk | FTP | other *** search
-
- ' Subprogram to place a 24 hour clock on screen. This uses
- ' FastPrt() from Dave Evers' BASWIND2 to write to the screen,
- ' hence it does not effect the cursor or the current COLOR
- ' statement.
-
- SUB ScrnClk(CFore%, CBack%, CLoc$) STATIC
-
- IF INSTR(CLoc$,":") THEN
- Row% = VAL(LEFT$(CLoc$,2))
- Col% = VAL(RIGHT$(CLoc$,2))
- IF Col% > 70 THEN
- Col% = 70
- END IF
- ELSE
- CLoc% = VAL(Cloc$)
- SELECT CASE CLoc%
- CASE 1, 2, 3
- Row% = 1
- CASE 4, 5, 6
- Row% = 25
- CLoc% = CLoc% - 3
- CASE ELSE
- Row% = 25
- Cloc% = 2
- END SELECT
- Col% = (CLoc% * 35) - 35
- IF Col% = 0 THEN
- Col% = 1
- END IF
- END IF
- Attr% = (CBack% AND 7) * 16 + CFore%
- Clock$ = CHR$(32) + TIME$ + CHR$(32)
- CALL FastPrt(Clock$, Row%, Col%, Attr%)
-
- END SUB
-
- ' Initialize timer to 1 second intervals for GOSUB to occur.
- ' Must use Check Between Statements option when compiling for
- ' best result.
- ON TIMER (1) GOSUB CallClock
- TIMER ON
-
- ' This is the GOSUB routine used to call the subprogram.
- CallClock:
- CALL SCRCLK(15,1,"02:65")
- RETURN
-
-