打印课程表
0 TEXT : DIM C$(30)
5 HOME : PRINT "TOUCH THE CHINESE KEY !";:GET A$:IF ASC(A$)> <13 THEN 510 PRINT : HOME : FOR I=1 TO 28: READ C$(I):NEXT
15 GOSUB 160:PRINT "需打印课程代码吗?(Y/N)";:GET N$:PRINT " IF N$> <" THEN 45
20 POKE 1659,1:PRINT SPC(4)"课程代码":PRINT
25 FOR I=1 TO 20 STEP 2:PRINT I;"=";C$(I);" ";I+1;"=";C$(I+1)
30 NEXT I:POKE 1659,0
45 HOME:PRINT "现在开始输入代码!":FOR I=1 TO 8:FOR J=1 TO 6
50 PRINT"星期";J;"第";I;"节课代码:";:INPUT "";A$:A=VAL(A$):IF A>20 OR A<1 THEN 50
55 B$(I,J)=C$(A):NEXT J:NEXT I:PRINT "要否存盘?(Y/N)";:GET Y$:PRINT Y$: IF Y$="Y"THEN GOSUB 120
60 HOME : INPUT "打印字型(1-15):";M$:M=VAL(M$):IF M>15 OR M<1 THEN 60
65 HOME : INPUT "打印份数?";B$:B=VAL(B$):IF B<0 THEN 65
70 POKE 1659,M:IF N=B THEN POKE 1659,0:N=0:GOTO 170
80 PRINT SPC(14)"课 程 表":PRINT SPC(4)"----------------":PRINT "***********************************"
85 PRINT "┏━━┳━━┳━━┳━━┳━━┳━━┳━━┓":PRINT " ┃日期┃MON┃TUE┃WED┃THU┃FRI┃SAT"┃"
90 PRINT "┣━━┫一┃二┃三┃四┃五┃六┃":PRINT"┃节次┃ ┃ ┃ ┃ ┃ ┃ ┃":PRINT"┣━━╋━━╋━━╋━━╋━━╋━━╋━━┫"
95 FOR I=1 TO 8:PRINT "┃";C$(20+I);"┃";B$(I,1);"┃";B$(I,2);"┃";B$( I,3);"┃"B$(I,4);"┃"B$(I,5);"┃";B$(I,6);"┃"
100 IF I=8 THEN PRINT "┗━━┻━━┻━━┻━━┻━━┻━━┛": PRINT :PRINT"━━━━━━━━━━━━━━━━━━━━━━":POKE 1659, 0: GOTO110105 PRINT "┣━━╋━━╋━━╋━━╋━━╋━━╋━━┫":NEXT I110 PRINT "按一键继续!";:GET Y$:N=N+1:GOTO 70120 INPUT "文件名:";NAME$:D$=CHR$(4):PRINT D$;"OPEN";NAME$ : PRINT D$ ;"WRITE";NAME$125 FOR I=1 TO 8:FOR J=1 TO 6:PRINT B$(I,J):NEXT J: NEXT I: PRINT D$ ;"CLOSE":PRINT "已存盘,按一键继续!";:GET Y$:RETURN
140 INPUT "文件名:";NAME$:D$=CHR$(4):PRINT D$;"OPEN";NAME$ : PRINT D$ ;"READ";NAME$
145 FOR I=1 TO 8:FOR J=1 TO 6:INPUT B$(I,J):NEXT J: NEXT I: PRINT D$ ;"CLOSE":PRINT "已读完,按一键继续!";:GET Y$:GOTO 60
150 DATA 语文,数学,英语,化学,物理,生物,政治,历史,地理,体育,劳技,活动, 团体,自修,图画,音乐,劳动,班会,兴趣,****,一,二,三,四,五,六,七,八
160 HOME:PRINT"磁盘读入按D,键盘输入按任一键!";:GET Y$:HOME :IF Y$ = "D"THEN 140
170 HOME:PRINT "是否还要使用?(Y/N);:GET X$:PRINT X$:IF X$="N" THEN HOME:END
175 IF X$="Y" THEN HOME:GOTO 15
180 IF X$<>"Y" THEN 170