home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nibble Magazine
/
nib27b.dsk
/
TIMEHELLO.bas
< prev
next >
Wrap
BASIC Source File
|
2023-02-26
|
2KB
|
47 lines
10 REM ***********************
20 REM * TIMEHELLO *
30 REM * BY PHILIP CHIEN *
40 REM * COPYRIGHT (C) 1986 *
50 REM * MICROSPARC, INC. *
60 REM * CONCORD, MA 01742 *
70 REM ***********************
80 D$ = CHR$(4)
90 REM PUT YOUR SET UP ARRAYS & INIT ROUTINES HERE
100 GOSUB 30000: REM FIND CLOCK & UPDATE LASTBOOT
110 REM FIND CLOCK, AND PATCH DOS CATALOG ROUTINE
120 FOR SL = 7 TO 1 STEP -1
130 IF PEEK( -16384 +SL *256 +7) = 5 AND PEEK( -16384 +SL *256 +5) = 255 THEN 160
140 NEXT SL
150 PRINT "NO CLOCK FOUND.": GOTO 230
160 HEX$ = "BCDF:20 2F AE A9 BE 20 0B C5 20 08 C5 8E FF BC A2 00 BD 00 02 20 ED FD E8 8A CD FF BC D0 F3 4C 2F AE N ADC6:20 DF BC"
170 HEX$ = HEX$ +" N F328G"
180 FOR T = 1 TO LEN(HEX$)
190 POKE 511 +T, ASC( MID$ (HEX$,T,1)) +128
200 NEXT
210 POKE 72,0: POKE 223, PEEK(248): CALL -144
220 POKE 48358,SL +128: POKE 48361,SL +192
230 REM PUT YOUR HELLO PROGRAM HERE
29999 END
30000 FOR SL = 7 TO 1 STEP -1
30010 IF PEEK( -16384 +SL *256 +7) = 5 AND PEEK( -16384 +SL *256 +5) = 255 THEN 30040
30020 NEXT SL
30030 IF SL = 0 THEN RETURN : REM NO CLOCK!
30040 PRINT D$;"PR#";SL
30050 IF PEEK( -8192) = 32 THEN PRINT ">": REM INTEGER BASIC
30060 IF PEEK( -8192) = 76 THEN PRINT " ": REM APPLESOFT
30070 PRINT D$;"IN#";SL
30080 INPUT A$
30090 PRINT D$;"PR#0"
30100 PRINT D$;"IN#0"
30110 PRINT D$;"OPEN LASTBOOT"
30120 PRINT D$;"READ LASTBOOT"
30130 INPUT B$
30140 PRINT D$;"CLOSE"
30150 POKE 50,63
30160 TEXT : CALL -936: PRINT " LAST BOOT -";B$;" PRESENT TIME -";A$;" "
30170 POKE 50,255
30180 PRINT D$;"OPEN LASTBOOT"
30190 PRINT D$;"WRITE LASTBOOT"
30200 PRINT A$
30210 PRINT D$;"CLOSE"
30220 RETURN