COMPUTE! ISSUE 40 / SEPTEMBER 1983 / PAGE 68
GRADEBOOK
FOR ATARI
Stephen Levy,
Assistant Book Editor
This is a valuable organizational
tool for teachers. It handles student lists, grading conversions, grade
averaging, assignments, and much more. Written for an Atari computer
with at least 32K and a disk drive.
"Gradebook" is for teachers. It will keep a record of students' grades
and assignments for up to 45 students on one diskette. In addition, the
program will average grades and display grades and assignments to the
screen or list them to a printer.
SAVE the program on one diskette and use a second
diskette for data. Use the following short program to create a dummy
file on the program diskette to prevent accidentally writing data to
the program diskette:
10 OPEN #1,8,9,"D:CL"
20 DIM A$(4):A$="TEST":PRINT #1;A$
30 CLOSE #1:END
Menu Options
1. Read Grades:
produces a list of the last names of all students previously entered
(option 3) onto this diskette, plus each student's grades and aver age.
You will be prompted for the number (the program will automatically
number the students for you) of the first and last student whose grade
and average you wish to see. However, on each screen display, you are
limited to viewing two to five students' grades at a time.
2. Read
Assignments: prints a list of previously entered (option 5)
assignments on this diskette.
3. Enter Names:
lets you enter and add new students to the names list. Note that only
45 names are allowed on one diskette; first name up to nine characters.
last name up to ten characters; no middle names.
4. Enter Grades:
produces a list of students previously entered (option 3) and asks
which student's grades you wish to enter. The program accepts any one-,
two-, or three-digit number as well as the letters A,B,C,D,E, and F,
with or without a plus or minus. When grades are averaged, letter
grades are converted to numbers as follows:
| A+ =97 |
A=93 |
A- =89 |
| B+ =87 |
B=83 |
B- =79 |
| C+ =77 |
C=73 |
C- =69 |
| D+ =67 |
D=63 |
D- =59 |
| E+ =54 |
E=50 |
E- =46 |
| F+ =54 |
F=50 |
F- =46 |
If desired, these values can be changed in lines
510-590 and lines 1650-1680.
5. Enter
Assignments: results in a list of previously entered assignments
and allows you to add to the list. The assignment length must be no
greater than 28 characters (including blank spaces). You can use this
option for messages or notes also. It functions like a notepad with no
real bearing on students' grades, averaging, etc.
6. Print Grades
or Assignments: prints out all or some of the students' names,
grades, and averages to a printer. It allows you to print a list of
assign ments stored on the diskette.
7. Correction:
permits correcting any student's name or grade.
8. Initializing a
Disk: makes it possible to avoid retyping and re-entering all
the students' names onto a new diskette. This option will automatically
transfer the names of students stored on one diskette to a new diskette
without transferring grades.
9. End:
provides a way to exit the program.
It is imperative that you never end a session by just turning off
the computer or disk drive. Always use option 9.
Gradebook For Atari
90 CLOSE #1:CLR
100 DIM
NAME$(20),FILE$(13),CL$(1),B
Z$(1),CLASS$(361),TASK$(30),6RAD
E$(3),YES$(3)
110 DIM
BYTE(48),SECTOR(48),TEMP$(15
),BL$(37)
120
CL$=CHR$(125):BZ$=CHR$(253):MENU
=200:FILE$="D:STUDENT."
130 BL$="
":BL$(37)=BL$:BL$(2)=BL$:R
=0:HW=0:B=5000:C=5500:D=580:E=58
10
200 LN=200:TRAP B
210 GRAPHICS 0:POKE
201,5:SETCOLOR 4
,3,2:SETCOLOR
2,8,9:SETCOLOR 1,8
,1
215 POKE 752,1:GOSUB E
220 PRINT :PRINT ,"{3
SPACES}GRADEB
OOK":PRINT
:PRINT
230 PRINT :PRINT "YOUR OPTIONS
ARE"
:FOR WAIT=7 TO
22:POSITION WAIT,
6:PRINT
CHR$(13):NEXT WAIT
240 PRINT ,"1. Read Grades":PRINT
,"
2. Read
Assignments":PRINT ,"3.
Enter
Names":PRINT ,"4. Enter Gr
ades"
250 PRINT ,"5. Enter
Assignments":PR
INT ,"6. Print
Grades or Assignm
ents"
260 PRINT ,"7. Make
Correction":PRIN
T "8.
Initialize a Disk":PRINT
,"9. End"
265 POKE 752,0
270 PRINT :PRINT " YOUR CHOICE
PLEAS
E";:INPUT
ANS:ANS=INT(ANS):IF AN
S<1 OR
ANS>9 THEN GOTO B
273 IF ANS=9 THEN GRAPHICS 0:END
275 POKE 752,1
280 PRINT CL$:TRAP 40000:FOR AA=1
TO
10:POSITION 1,10:PRINT " BE SU
RE PROPER DATA
DISK IS IN DRIVE"
290 FOR W=1 TO 20:NEXT W:POSITION
1,
10:PRINT
" {REV}BE SHURE PROPER DATA
DISK IS IN
DRIVE{OFF}":NEXT AA
295 POSITION 15,14:PRINT "THANK
YOU"
297 POSITION 6,16:PRINT "You may
ent
er 'XXX' to
any":POSITION 7,17:P
RINT "prompt
to return to menu"
300 PRINT :PRINT :PRINT " Press
any
key to
begin"
305 IF PEEK(764)=255 THEN 305
308 POKE 764,255:POKE 752,0:TRAP
320
:OPEN
#1,4,0,"D:CL":CLOSE #1
310 PRINT :PRINT
"{REV}PLEASE REMOVE PROG
RAM MASTER
DISK{OFF}":GOSUB E:GOTO
3
00
320 CLOSE #1:GOSUB E:IF ANS=2 OR
ANS
=8 OR ANS=5
THEN 340
330 IF R=0 THEN GOSUB 5100:GOSUB
E
340 ON ANS GOTO
410,810,1210,1600,20
00,2410,2800,3200,350
350 END
410 GOSUB 5310:GOSUB 5400:TRAP
B:LN=
410
420 POSITION 2,19:PRINT "Which
stude
nt's grades do
you want?":POSITI
ON 2,21:PRINT
"First student num
ber";
425 INPUT YES$:GOSUB
5600:FIRST=VAL(
YES$)
430 POSITION 2,22:PRINT "Last
studen
t
number";:INPUT YES$:GOSUB 5600
432 LAST=VAL(YES$):IF
LAST<=FIRST TH
EN GOTO B
433 IF LAST>NUMSTUD-1 THEN
GOTO B
435 IF ANS=6 THEN RETURN
440 IF LAST-FIRST>5 THEN GOSUB
5400:
GOTO 5410
450 GRAPHICS 0:SETCOLOR
2,8,4:SETCOL
OR 4,8,4
460 FOR AA=FIRST TO LAST
470 TRAP
650:LN=700:NUM=0:SCORE=0:AV
ERAGE=0:FILE$(11)=STR$(AA)
480 OPEN #1,4,0,FILE$:INPUT
#1;NAME$
:PRINT :PRINT
NAME$(11,20);NAME$
(1,10)
500 INPUT #1;GRADE$:PRINT
GRADE$;";
";:GOSUB
510:GOTO 500
510 IF GRADE$(1,1)="A" THEN
GRADE=93
:GOTO D
520 IF GRADE$(1,1)="B" THEN
GRADE=83
:GOTO D
530 IF GRADE$(1,1)="C" THEN
GRADE=73
:GOTO D
540 IF GRADE$(1,1)="F" OR
GRADE$(1,1
="E" THEN
GRADE=50:GOTO D
560 IF GRADE$(1,1)="D" THEN
GRADE=63
:GOTO D
570 GRADE=VAL(GRADE$):GOTO 600
580 IF GRADE$(2,2)="+" THEN
GRADE=GR
ADE+4
590 IF GRADE$(2,2)="-" THEN
GRADE=GR
ADE-4
600
SCORE=SCORE+GRADE:NUM=NUM+I:RETU
RN
650 GOSUB E:CLOSE #1:TRAP
40000:IF P
EEK(195)=136
THEN GOTO LN
660 CLOSE #1:PRINT :PRINT "Check
Dis
k and/or Drive"
670 PRINT :PRINT "Press any key
for
MENU":GOSUB E
680 IF PEEK(764)=255 THEN 680
690 POKE 764,255:GOTO MENU
700 CLOSE #1:IF NUM=0 THEN PRINT
"NO
GRADES":GOTO 730
705 IF ANS=6 THEN CLOSE #1:GOTO
2555
710 AVERAGE=SCORE/NUM:PRINT "
AVE.=
";AVERAGE
730 NEXT AA
740 PRINT :PRINT "Press
{REV}START{OFF} for
me
nu":PRINT
:PRINT "Press {REV}SELECT{OFF}t
o see more
grades"
750 AA=PEEK(53279):IF AA>6
THEN 750
770 IF AA=6 THEN GOTO MENU
780 IF AA=5 THEN 410
790 GOTO 750
810 PRINT CL$;"{10
SPACES}{REV}LIST OF ASS
IGNMENTS{OFF}":PRINT
820 TRAP 1100:GOSUB 840:GOTO 670
840 TRAP 1100:CLOSE #1:OPEN
#1,4,0,"
D:ASSIGN"
850 TRAP 650:LN=900
860 INPUT #1;HW:INPUT #1;TASK$
870 IF ANS=6 THEN PRINT
#2;HW;".";TA
SK$:GOTO 860
880 PRINT HW;".";TASK$:GOTO 850
900 RETURN
1100 IF PEEK(195)=170 THEN PRINT
:PR
INT
"{REV}NO ASSIGNMENTS LISTED{OFF}":GOT
O 670
1110 GOTO 660
1210 PRINT CL$:SETCOLOR
4,7,5:SETCOL
OR
2,13,12:SETCOLOR 1,13,2
1220 LN=1210:TRAP B
1230 POSITION 10,3:PRINT
"{REV}ADDING NAM
ES TO
CLASS{OFF}":PRINT
:PRINT "Ther
e are
";NUMSTUD-1;" students in
this class."
1235 IF NUMSTUD=46 THEN PRINT
:PRINT
"{3 SPACES}{REV}CLASS IS FULL NO MO
RE
STUDENTS{OFF}"GOTO
670
1240 POSITION 1,22:PRINT "TYPE
'XXX'
for first name for MENU"
1250 POSITION 3,8:PRINT "STUDENT
NUM
BER
";NUMSTUD;":":PRINT :PRINT
"First
name please:";:INPUT TEM
P$
1252 IF TEMP$="" THEN GOSUB
5800:GOS
UB 1210
1255 AA=LEN(TEMP$):IF AA>9
THEN GOTO
B
1260 IF TEMP$="XXX" THEN GOTO
MENU
1270 GOSUB
1500:NAME$(11,20)=TEMP$
1280 PRINT :PRINT "Last name
please:
";:INPUT
TEMP$
1285 IF TEMP$="" THEN GOSUB
5800:GOT
O 1210
1290 AA=LEN(TEMP$):IF AA>10
THEN GOT
O B
1300 IF TEMP$="XXX" THEN GOTO
MENU
1305 TRAP B:LN=1305:POSITION
2,19:PR
INT
BL$:POSITION 2,16:PRINT BL$
1307 POSITION 2,16:PRINT "IS THIS
CO
RRECT";:INPUT YES$:IF YES$(1,1)
<>"Y" THEN 1210
1310 GOSUB 1500:NAME$(1,10)=TEMP$
1320
CLASS$(NUMSTUD*8-7,NUMSTUD*B)=N
AME$(1,8)
1325 TRAP 660
1330
FILE$(11)=STR$(NUMSTUD):CLOSE #
1:OPEN
#1,8,0,FILE$:PRINT #1;NA
ME$:CLOSE #1
1340 GOSUB
E:NUMSTUD=NUMSTUD+1:GOTO
1210
1500 IF AA=10 THEN RETURN
1510 FOR NUM=AA+1 TO
10:TEMP$(LEN(TE
MP$)+1)=" ":NEXT NUM
1530 RETURN
1600 PRINT CL$:SETCOLOR
2,11,12:SETC
OLOR
4,5,12:SETCOLOR 1,11,0
1610 POSITION 9,2:PRINT
"{REV}ENTER STUDE
NTS'
GRADES{OFF}":PRINT
:PRINT "Inst
ructions"
1630 PRINT :PRINT "Grades may be
any
number from xero{4 SPACES}to 1
00 or
any letter from A to F."
1640 PRINT "Letter grades may
includ
e a plus
or{3 SPACES}minus. Let
ter
grades are averaged
{5
SPACES}as follows:"
1650 PRINT
,"A+=97","A=93","A-=89":P
RINT
,"B+=87","B=83':,"B-=79":PR
INT
,"C+=77","C=73","C-=69"
1680 PRINT
,"D+=67","D=63","D-=59":P
RINT
,"E+=54","E=50","E-=46":PR
INT
,"F+=54","F=50","F-=46"
1690 PRINT :PRINT "Type 'xxx' for
gr
ade when
you have{4 SPACES}fini
shed
with that student."
1720 PRINT :PRINT "Press any key
to
begin"
1730 IF PEEK(764)=255 THEN 1730
1740 POKE 764,255
1745 TRAP B:LN=1720:PRINT
CL$:GOSUB
5315
1750 POSITION 2,20:PRINT "Enter
stud
ent
number";:INPUT YES$:GOSUB 5
600
1760 NUM=VAL(YES$):IF NUM<l OR
NUM>N
UMSTUD-1
THEN GOTO B
1780 CLOSE
#1:FILE$(11)=STR$(NUM):PO
SITION
2,20:PRINT BL$:TRAP 650:
OPEN
#1,4,0,FILE$.
1790 INPUT #1;NAME$:CLOSE #1
1800 CLOSE #1:OPEN #1,9,0,FILE$
1805 TRAP B:LN=1805:PRINT
CL$:GOSUB E
1810 POSITION 4,20:PRINT "Type
'XXX'
when
finished"
1812 POSITION 9,2:PRINT
"{REV}ENTER STUDE
NT GRADES{OFF}":POSITION 1,7:PRINT "
Grade
for ";NAME$(11,20);NAME$(
1,10);:INPUT GRADE$
1815 IF GRADE$="XXX" THEN CLOSE
#I:G
OTO 1890
1818 IF GRADE$="" THEN GOSUB
5800:GO
TO 1805
1820 AA=ASC(GRADE$(1,1)):IF
AA<58 AN
D
AA>48 THEN GOSUB 1850:GOTO 18
80
1830 IF AA<71 AND AA>64
THEN GOSUB 1
850:GOTO
1880
1835 IF GRADE$="" THEN GOSUB
5800:GO
TO 1805
1840 GOTO B
1850 AA=LEN(GRADE$):IF AA=3 THEN
RET
URN
1860 IF AA=2 THEN GRADE$(3,3)="
":RE
TURN
1870 IF AA=1 THEN GRADE$(2,3)="
":R
ETURN
1875 IF AA>3 THEN POP :GOSUB
5400:GO
TO B
1880 TRAP 650:PRINT
#1;GRADE$:GOTO 1
805
1890 GOSUB 5400:TRAP
B:LN=1690:POSIT
ION
2,20:PRINT "Do you wish to
enter
grades for{7 SPACES}anoth
er
student";:INPUT YES$
1910 IF YES$(1,1)="Y" THEN 1745
1920 GOTO MENU
2000 PRINT CL$:SETCOLOR
4,12,8:SETCO
LOR
1,9,2:SETCOLOR 2,9,8
2010 PRINT ,,"{REV}LIST OF
ASSIGNMENTS{OFF}":T
RAP
2020:PRINT
2015 CLOSE #1:OPEN
#1,4,0,"D:ASSIGN"
:GOSUB
860:GOTO 2040
2020 CLOSE #1:GOSUB E:IF
PEEK(195)=1
70 THEN
PRINT ,"{4 SPACES}{REV}No as
signments listed{OFF}":POP
:GOTO 204
0
2025 CLOSE #1:GOSUB E:IF
PEEK(195)=1
36 THEN
RETURN
2030 GOTO 660
2035 FOR AA=20 TO 22:POSITION
2,AA:P
RINT
BL$:NEXT AA
2040 HW=HW+1:TRAP
B:LN=2035:POSITION
2,20:PRINT "Enter assignment #
";HW:INPUT TASK$:AA=LEN(TASK$)
2045 IF TASK$="XXX" THEN GOTO
MENU
2050 IF AA>28 THEN POSITION
2,21:PRI
NT BL$;"
":POSITION 2,21:PRINT
"{REV}Too many characters{OFF}"
2055 IF AA>26 THEN GOSUB
C:HW=HW-1:G
OTO 2035
2057 IF TASK$="" THEN
HW=HW-1:POSITI
ON
2,21:PRINT BL$:POSITION 2,21
:PRINT
"{REV} YOU MUST ENTER A LETTER{OFF}
"
2058 IF TASK$=-"" THEN
GOSUB
C:GOTO 2
035
2060 CLOSE #1:TRAP 660
2070 IF HW<>1 THEN XIO
36,#1,0,0,"D:
ASSIGN":OPEN #1,9,0,"D:ASSIGN":
GOTO 2090
2080 CLOSE #1:IF HW=1 THEN OPEN
#1,8
,0,"D:ASSIGN"
2090 PRINT #1;HW:PRINT #1;TASK$
2100 CLOSE #1:XIO
35,#1,0,0,"D:ASSIG
N":TRAP
B:LN=2110
2110 GOSUB E:FOR AA=20 TO
22:POSITIO
N
2,AA:PRINT BL$:NEXT AA
2120 POSITION 2,20:PRINT "Add
anoth
er
assignment";:INPUT YES$:IF Y
ES$(1,1)="Y" THEN 2035
2130 GOTO MENU
2410 PRINT CL$:SETCOLOR
1,9,4:SETCOL
OR
2,9,14:SETCOLOR 4,13,13:CLOS
E
#1:CLOSE #2
2420 TRAP B:LN=2410
2430 POSITION 5,7:PRINT "Do you
want
to print
grades";:INPUT YES$:I
F
YES$(1,1)="Y" THEN 2500
2435 IF YES$="XXX" THEN GOTO MENU
2440 POSITION 5,11:PRINT "Would
you
like to
have a":PRINT "
{3
SPACES}list of assignments p
rinted";
2445 INPUT YES$:IF YES$(1,1)="Y"
THE
N 2710
2450 GOTO MENU
2500 GOSUB 410:TRAP 2600:OPEN
#2,8,0
,"P:"
2510 FOR AA=FIRST TO LAST
2520 TRAP
650:LN=705:NUM=0:SCORE=0:A
VERAGE=0:FILE$(11)=STR$(AA)
2530 CLOSE #1:OPEN
#1,4,0,FILE$:INPU
T
#1;NAME$:PRINT #2;NAME$(11,20
);NAME$(1,10)
2540 INPUT #1;GRADE$:PRINT
#2;GRADE$
;";
";:GOSUB 510
2550 GOTO 2540
2555 IF NUM=0 THEN PRINT #2;"NO
GRAD
ES":PRINT #2:GOTO 2570
2560 AVERAGE=SCORE/NUM:PRINT #2;"
A
VE.=";AVERAGE:PRINT #2
2570 NEXT AA
2580 GOTO 670
2600 CLOSE #2:PRINT :PRINT
"{REV}TURN ON
PRINTER
PLEASE{OFF}":GOSUB
C:GOTO LN
2710 CLOSE #2:TRAP 2600:OPEN
#2,8,0,
"P:"
2720 PRINT #2,"LIST OF
ASSIGNMENTS":
PRINT #2
2730 GOSUB 840:CLOSE #1:CLOSE
#2:TRA
P
40000:GOTO 670
2800 PRINT CL$:SETCOLOR
2,7,6:SETCOL
OR
1,7,14:SETCOLOR 4,5,10:GOSUB
E:TRAP B:LN=2800
2810 POSITION 5,5:PRINT
"CORRECT":PR
INT
:PRINT :PRINT ,"1. STUDENT
NAME":PRINT :PRINT ,"2. STUDENT
GRADE"
2815 PRINT :PRINT ,"3. RETURN TO
MEN
U"
2820 PRINT :PRINT :PRINT "Press
the
number
of your pick" ;:INPUT YES
$:GOSUB
5600:W=VAL(YES$):W=INT(
W)
2830 IF W<1 OR W>3 THEN
GOTO B
2840 PRINT CL$:SETCOLOR
2,12,6:SETCO
LOR
1,12,14:SETCOLOR 4,14,14:ON
W
GOTO 2860,2980,MENU
2860 PRINT CL$:GOSUB 5315:GOSUB
5400
:POSITION 2,20:PRINT "Type the
of the
student"
2865 POSITION 2,21:PRINT "whose
name
needs correcting";:TRAP B:LN=2
860:AA=100:GOSUB 2870:GOTO 2890
2870 INPUT YES$:GOSUB
5600:W=VAL(YES
$):W=INT(W):IF W>NUMSTUD-1 THEN
GOTO B
2880 FILE$(11)=STR$(W):TRAP
650:CLOS
E
#1:OPEN #1,12,0,FILE#:RETURN
2890 NOTE #1,SECTOR,BYTE:INPUT
#1;NA
ME$
2895 PRINT CL$:POSITION 2,6:PRINT
"S
tudent #
";W;" IS ";NAME$(11,20
);NAME$(1,10):TRAP 2915:AA=0:GO
SUB E
2900 POSITION 2,10:PRINT "Enter
'XXX
' if no
correction needed":PRIN
T :PRINT
"First name";:INPUT TE
MP$
2905 AA=LEN(TEMP$):IF AA>10 OR
TEMP$
="" THEN
2915
2910 IF TEMP$="XXX" THEN CLOSE
#1:GO
TO MENU
2912 GOTO 2920
2915 PRINT :PRINT "YOU MUST ENTER
A
LETTER-10 MAX.":GOSUB C:GOTO 28
95
2920 GOSUB
1500:NAME$(11,20)=TEMP$:P
RINT
:PRINT "Last name";:INPUT
TEMP$
2930 AA=LEN(TEMP$):IF AA>10 OR
TEMP$
="" THEN
2915
2935 IF TEMP$="XXX" THEN CLOSE
#1:GO
TO MENU
2950 GOSUB
1500:NAME$(1,10)=TEMP$:TR
AP 660
2960 PRINT :PRINT "{7
SPACES}CORRECT
ING":POINT #1,SECTOR,BYTE:PRINT
#1;NAME$:CLOSE #1:E=0:GOTO 280
0
2980 PRINT CL$:GOSUB 5315:GOSUB
5400
:POSITION 2,20:PRINT "Type the
of the
student whose"
2985 POSITION 2,21:PRINT "grade
need
s
correcting";:TRAP B:LN=2980:A
A=100:NUM=0
2990 GOSUB 2870:TRAP 3050
2995 INPUT #1;NAME$:PRINT
CL$:PRINT
NAME$(11,20);NAME$(1,10);"GRADE
S"
3000 NOTE
#1,SECTOR,BYTE:NUM=NUM+1:S
ECTOR(NUM)=SECTOR:BYTE(NUM)=BYT
E:INPUT
#1;GRADE$
3010 IF NUM<13 THEN POSITION
1,NUM+1
3015 IF NUM<25 AND NUM>12
THEN POSIT
ION
11,NUM-11
3020 IF NUM<49 AND NUM>36
THEN POSIT
ION
31,NUM-35
3025 IF NUM<37 AND NUM>24
THEN POSIT
ION
21,NUM-23
3030 IF NUM=48 THEN 3050
3040 PRINT NUM;". ";GRADE$:GOTO
3000
3050 IF NUM=1 THEN CLOSE #1:PRINT
"N
O GRADES
LISTED":GOSUB C:GOTO 2
800
3055 GOSUB E:GOSUB 5400:TRAP
B:LN=30
50:POSITION 2,19:PRINT "The {REV}NUM
BER{OFF}of the
grade to change";:IN
PUT YES$
3060 GOSUB 5600:W=VAL(YES$):IF
W>NUM
-1 THEN
GOTO B
3065 W=INT(W):GOSUB 5400:POSITION
2,
19:PRINT
"Enter new grade #";W;
:INPUT
GRADE$:IF GRADE$='- THEN
GOSUB 5800:GOTO 3050
3070 IF GRADE$="XXX" THEN CLOSE
#1:G
OTO 2600
3075 AA=ASC(GRADE$(1,1)):IF
AA<58 AN
D
AA>48 THEN GOSUB 1850:GOTO 30
90
3080 IF AA<71 AND AA>64
THEN GOSUB 1
850:GOTO
3090
3085 GOTO B
3090 TRAP 650:POINT
#1,SECTOR(W),BYT
E(W):PRINT #1;GRADE$:CLOSE #1:G
OTO 2800
3200 PRINT CL$:SETCOLOR
1,15,2:SETCO
LOR
2,15,12:SETCOLOR 4,8,8
3210 POSITION 17,5:PRINT
"{REV}WARNING{OFF}"
3220 PRINT :PRINT "This section
will
create
new files.":PRINT " Be
sure a
new formatted disk is"
3230 PRINT "{4 SPACES}available
befo
re
beginning.{16 SPACES}Press 'Y
'-{REV}RETURN{OFF}"
3240 PRINT :PRINT "Type 'XXX' if
you
are not ready{7 SPACES}to crea
te new
files on a new disk."
3250 TRAP B:LN=3200:INPUT YES$:IF
YE
S$(1,1)="Y" THEN 3280
3260 IF YES$="XXX" THEN GOTO MENU
3270 GOTO B
3280 PRINT CL$:POSITION
2,10:PRINT "
Please
insert SOURCE disk, with
{8
SPACES}student records"
3285 PRINT :PRINT "PRESS ANY KEY
WHE
N READY"
3290 IF PEEK(764)=255 THEN 3290
3292 POKE 764,255:PRINT
CL$:POSITION
2,10:PRINT "This will take som
e time.
Please be{3 SPACES}pati
ent. BYE
for now"
3295 GOSUB C
3298 POKE 559,0:TRAP 3330:CLR
:DIM C
LASS$(900),NAME$(20),YES$(3),FI
LE$(13):NUMSTUD=I:FILE$="D:STUD
ENT.":E=5810
3300
FILE$(11)=STR$(NUMSTUD):CLOSE #
1:OPEN
#1,4,0,FILE$:INPUT #1;NA
ME$:CLASS$(NUMSTUD*20-19,NUMSTU
D*20)=NAME$
3320 CLOSE
#1:NUMSTUD=NUMSTUD+1:GOTO
3300
3330 POKE 559,34:GOSUB E
3332 IF PEEK(195)=170 AND
NUMSTUD=1
THEN
PRINT :PRINT "THERE ARE NO
RECORDS ON THIS DISK":CLOSE #1
:GOTO
3350
3335 IF PEEK(195)=170 THEN 3380
3340 POKE 559,34:PRINT :PRINT
"Check
Disk and/or Drive":CLOSE #1:GO
SUB E
3350 PRINT :PRINT "Press any key
for
menu"
3360 IF PEEK(764)=255 THEN 3360
3370 POKE 764,255:GOTO 90
3380 CLOSE #1:GOSUB E:PRINT
:PRINT "
Please
insert new formatted dis
k":PRINT
:PRINT "Press 'Y'-{REV}RETU
RN{OFF}when
ready"
3390 TRAP 3500:INPUT YES$:IF
YES$="Y
" THEN
3420
3410 IF YES$="XXX" THEN 90
3415 GOTO 3500
3420 TRAP 3450:CLOSE #1:OPEN
#1,4,0,
"D:STUDENT.*":CLOSE #1
3430 PRINT
CHR$(253);CHR$(125):POSIT
ION
2,10:PRINT "This disk conta
ins
student grade.{5 SPACES}Ple
ase use
new formatted disk"
3440 GOTO 3380
3450 CLOSE #1:TRAP 3340:GOSUB E
3460 FOR W=1 TO
NUMSTUD-1:NAME$=CLAS
S$(W*20-19,W*20):FILE$(11)=STR$
(W)
3470 CLOSE #1:OPEN
#1,8,0,FILE$:PRIN
T
#1;NAME$:CLOSE #1:NEXT W
3480 POKE 559,34:GRAPHICS
0:POSITION
2,10:PRINT "THANK YOU FOR WAIT
ING":FOR
W=1 TO 200:NEXT W:GOTO
90
3500 PRINT :PRINT "{9
SPACES}IMPROPE
R
INPUT":GOTO 3380
5000 POKE 752,1:PRINT BZ$
5010 PRINT :PRINT
,"{REV}INCORRECT INPUT{OFF},
try again":GOSUB C:POKE 752,0:
GOTO LN
5100 PRINT CL$:POSITION
17,10:PRINT
"WORKING":PRINT :PRINT ,"PLEAS
E BE
PATIENT":NUMSTUD=1:TRAP 52
00:R=1
5110 FILE$(11)=STR$(NUMSTUD)
5120 CLOSE #1:OPEN #1,4,0,FILE$
5130 INPUT
#1;NAME$:CLASS$(NUMSTUD*B
-7,NUMSTUD*8)=NAME$(1,8)
5140 NUMSTUD=NUMSTUD+1:CLOSE
#1:GOTO
5110
5200 CLOSE #1:GOSUB E:IF
NUMSTUD=1 T
HEN
RETURN
5210 TRAP 40000:IF PEEK(195)=170
THE
N RETURN
5220 GOTO 660
5310 PRINT CL$:SETCOLOR
4,6,10:SETCO
LOR
1,8,12:SETCOLOR 2,8,3
5315 PRINT ,,"{REV}NAMES OF STUDENTS{OFF}"
5317 IF NUMSTUD=1 THEN POP :PRINT
:P
RINT
"{REV}There are no students on
this
disk{OFF}":GOTO
670
5320 NN=2
5330 FOR AA=1 TO NUMSTUD-1
5340 IF AA<16 THEN POSITION
2,NN:PRI
NT
AA;".";CLASS$(AA*8-7,AA*(3):G
OTO 5380
5350 IF AA>15 AND AA<31
THEN POSITIO
N
15,NN:PRINT AA;".";CLASS$(AA*
8-7,AA*B):GOTO 5380
5360 IF AA>30 THEN POSITION
28,NN:PR
INT
AA;".";CLASS$(AA*8-7,AA*8)
5380 NN=NN+1:IF NN=17 THEN NN=2
5390 NEXT AA:RETURN
5400 POSITION 2,19:PRINT
BL$:POSITIO
N
2,21:PRINT BL$:POSITION 2,22:
PRINT
BL$:RETURN
5410 PRINT CL$:POKE 752,1
5415 PRINT BZ$:POSITION 8,9:PRINT
"O
NLY FIVE
STUDENTS GRADES":POSIT
ION
10,12:PRINT "CAN BE LISTED
AT ONCE"
5420 GOSUB C:POKE 752,0:GOTO LN
5500 FOR WAIT=1 TO 150:NEXT
WAIT:RET
URN
5600 IF YES$="XXX" THEN POP :GOTO
ME
NU
5610 AA=ASC(YES$(1,1)):IF
AA<49 OR A
A>57
THEN POP :GOTO B
5620 RETURN
5800 PRINT "You must enter at
least
one
character":GOSUB C:RETURN
5810 W=PEEK(16):IF W>127 THEN
W=W-12
8 :POKE
16,W:POKE 53774,W
5820 RETURN