Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 10 DEFINT A-Z
- 20 DIM Q(12)
- 25 OUT &H313,&H90:OUT &H311,97:IF INP(&H311)<>97 THEN A=&H210 ELSE A=&H310
- 30 B=A+1:C=A+2:Z=A+3 'define ports A,B,C and Control word address
- 40 OM=&H80:IM=&H90
- 50 H=&H90:R=&HB0:W=&HD0
- 60 REM
- 70 OUT Z,IM
- 75 OUT B,97:TST=INP(B):IF TST <> 97 THEN GOSUB 2000
- 80 REM ENSURE 24 HOUT FORMAT
- 90 OUT B,5:OUT C,R:X=INP(A):OUT Z,OM
- 100 OUT B,5:OUT C,H:OUT A,X AND 3 OR 8
- 110 OUT C,W:OUT Z,IM
- 120 REM ENSURE LEAP BIT SET CORRECTLY
- 130 OUT C,R
- 140 FOR I=9 TO 12:OUT B,I:Q(I)=INP(A)
- 150 NEXT:OUT Z,IM
- 160 L=10*Q(10)+Q(9)>2 AND 1
- 170 L=4 AND (L+10*Q(12)+Q(11) AND 3)=0
- 180 OUT B,8:OUT C,R:X=INP(A):OUT Z,OM
- 190 OUT B,8:OUT C,H:OUT A,X AND 3 OR L
- 200 OUT C,W:OUT Z,IM
- 210 REM
- 220 GOSUB 1000 'READ HCLK & SET STRINGS
- 230 TIME$="0":DATE$=D$:TIME$=T$
- 240 PRINT CHR$(12)+"DATE "+DATE$+", TIME "+TIME$
- 250 SYSTEM
- 1000 OUT C,R:FOR I=0 TO 12:OUT B,I
- 1010 Q(I)=INP(A) AND 15:NEXT:OUT Z,IM
- 1020 Q(5)=Q(5) AND 3:Q(8)=Q(8) AND 3
- 1030 T$="HH:MM:SS"
- 1040 FOR I=0 TO 2:FOR J=0 TO 1
- 1050 MID$(T$,1+J+3*I)=CHR$(Q(5-J-2*I)+48)
- 1060 NEXT J,I
- 1070 X$="MM-DD-YY"
- 1080 Q(6)=Q(12):Q(5)=Q(11)
- 1090 FOR I=0 TO 2:FOR J=0 TO 1
- 1100 MID$(X$,1+J+3*I)=CHR$(Q(10-J-2*I)+48)
- 1110 NEXT J,I
- 1120 Y$="19"
- 1130 IF VAL(MID$(X$,7,2))<80 THEN Y$="20"
- 1140 D$=LEFT$(X$,6)+Y$+RIGHT$(X$,2)
- 1150 RETURN
- 2000 A=&H310:B=A+1:C=A+2:Z=A+3
- 2010 OM=&H80:IM=&H90
- 2030 H=&H90:R=&HB0:W=&HD0
- 2040 OUT Z,IM
- 2050 OUT B,97:TST=INP(B):IF TST <> 97 THEN PRINT"QUADCLOCK NOT INSTALLED":SYSTE
- 2060 RETURN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement