For some Commodore machines hardware modifications are necessary as follows 1) Commodore 8032, Super PET, or "Fat 40" (12" screen, Model 4016-12 or 4032-12). No modification is necessary. 2) Original 4.0 BASIC or older machines with a 4.0 upgrade with graphics keyboard (not the new BASIC 4.0 in item 1). The ROM in page E000 (Commodore part it901447-29) must he renlaced bv the one used in item i'(commoddA part #961499-01j. 3) BASIC 3.0 with eraohics kevhoard. Pane EOOO ROM dletown, WI 53563). 4) BASIC 2.0 or less does not s u m o r t the disk and so can-
the pin assignments on the older ROMs are different. These hardware channes are necessary because a screen scroll generated by the older versions o i the screen editor ROM ( w e e E000) interferes with the IEEE bus. The brigrams being loaded must be modified to prevent disk conflicts and to maintain control s o that n o disk-load commands are entered in immediate mode. Usually a menu program is run that gives a list of the programs that may be loaded from the disk. The student then presses the number of the program to be run, and it is loaded by the computer. When the student is finished, a special key is pressed, and the menu program is reloaded. To prevent IEEE bus conflicts, each program, including the menu program, must execute the following code immediately before trying to load a program. This code causes the computer to cycle until the IEEE bus is free. 9000 K = 200*RND(l) 9010 FOR I = 1TO 450 K: IF PEEK (59242) < 255THEN9010 9020 NEXT: LOAD "program name", 8
+
Line 9010 monitors IEEE bus activ~tyand assures about seven seconds of inactivity before the next program is loaded. The random number generated in line 9000 prevents two computers from becoming synchronized while a third is loading. The value 200 is adequate for nine machines but may need to he increased to accommodate a larger number on the network. Commodore BASIC assumes that programs loaded from within another program will want to preserve variables, and thus the beginning of variables pointer stored in locations 42 and 43 is not updated after a load executed in program mode. These locations will be properly set by the command
mode commands (and prevented from using the CBMs to play games or do programming assignments from computer science courses) by disabling the RUNISTOP key that interrupts program execution. The simplest way to do this is to put the following code in the menu program 2 IF PEEK (64241) = 1THEN POKE 144,49: REM VER. 4.0 3 IF PEEK (64241) = 0 THEN POKE 144,88:REM VER. 3.0
This adds 3 to the pointer to the interrupt-handling routine, bypassing the code that checks to see whether the RUN/ STOP key has been pressed as well as the code that updates the timer. For programs that use the CBM T I function, a more complex method is required for disabling the RUNISTOP key (7). To prevent breaks in program execution caused by responding to an INPUT statement with a carriage return (a null input), GET rather than INPUT statements should be used for all input to either the menu or applications programs. Techniques for doing this are descrihed in a Project SERAP H I M author's module ( 8 ) . self-addressed 9 X 12" envelope with 74a postageto John W. Moore. This work was partially supported by Project SERAPHIM, NSF Development in Science Education, SED 8107568.
CHIMPS-A Thought-Provoker about Multiple Choice Exams H. Bradford Thompson
University of Toledo Toledo, OH 43606 Most of us would feel that a multiple-choice exam is poorly designed if it fails to distinguish between student responses and answers chosen completely a t random. CHIMPS is a short BASIC program that calculates the distribution to be expected for a class of 100 if one legal answer for each question is chosen, completely a t random. There can be up to 100 questions, and questions can have any number of choices, so long as only one is correct. The only required input is the number of questions that have each number of choices. The output consists of a table giving, for each total score, the probability that a given test-taker will achieve this score (by chance), the number of test-takers out of hundred that will make this score, and the number that will score a t least this high. A bar graph for a group of 100 is included. CHIMPS can have dramatic effects on test-writing habits. For a 40-question exam, for example, the "one-chimp score" drops by more than two questions if five choices are offered rather than four. It pays to work out that fifth response. CHIMPS is 65 lines in length. A listing may be obtained by sending the author a self-addressed envelope or label.
1POKE 42, PEEK (201): POKE 43, PEEK (202): CLR
This should be the first line of each program. Locations 201 and 202 contain the length of the program as it has been loaded from disk. Those who modify aprogram containing line 1ahove should note that the values m locations 42 and 43 are
Student Use of Computer in Freshman Chemistry Laboratory Jack G. Roof
"
line 1 must not be executed immediately after a program modification. (If it is. locations 42 and 43 will he restored to their old, incorrect values.) Thus, a modified program should be saved and reloaded before i t is executed. The network can be crashed if a student turns one of the CBMs off, or if an immediate-mode disk load is entered while another CBM is loading a program from the disk. We have no solution to the former problem other than making the on-off switch relatively inaccessible and telling students not to use it. Students can be prevented from entering any immediate100
Galveston College Galveston, TX 77550
"
Journal of Chemical Education
The policy at this college is to have freshmen in the physical sciences use the comwter for laboratory calculations as well as for lecture problem sets and drills. In each of the quantitative laboratory experiments the
.
"
".
a keyboard-CRT terminal located in the laboratory. l hey then
proceed to calculate their results on their own effort and record these on their data sheets. When all students have entered their data into the file. the data are processed by a FORTRAN program written for that particular experiment. When a student turns in his report with his completed data sheet a t the end of the period, he can quickly compare the results of his own calculations with the computer printout and can spot any errors made in arithmetic or logic while the exueriment is fresh in mind. he data sheet fo; each experiment is arranged so the data appears on the upper part of the page, followed hy lines of successive steps in the calculation of results. The right edge of the page has a vertical blank area about two inches wide. The printed output of computer results match line-by-line those items on the student's data sheet. After class, the wrintout is cut into vertical strius and are affixed hv ~" transb e n t tape in the blank area of the student's data sheets. This side-by-side comparison of student's results with computer results is not only a convenience to the grader in evaluating the quality of the results and in checking each step of the computation but is especially a n aid to the student in studying his returned laboratorv"rewort. . Student acceutance of. and enthusiasm for, this approach has been almost unanimous. I n even the more involved experiments there has always been sufficient time for students to enter their data a t the terminal and for the instructor to receive the printout well before the end of the period (2 hr 50 min). The following experiments are handled in this manner during the first semester of general chemistry: reaction of copper with sulfur; analysis of KC103-KC1mixture by heating; formulas of hydrates by heating; analysis of soluble sulfate by Bas04 precipitation; molar volume of oxygen a t STP; molecular weight of a volatile liquid; equivalent weight of an active metal by hydrogen replacement. Persons interested in our approach to freshman use of the computer in the laboratory may obtain gratis from the author a packet containing a printout of FORTRAN programs for entering data into a file and for calculations on one experiment, as well as the data sheet with its stripped-on printout. For copies of programs for all seven.experiments and their relevant instruction and data sheets, include check or money order for $3.00 drawn to Galveston College. The language used in these programs is DEC PDP-11 FORTRAN IV. The DEC-PDP-11170 comuuter and weriuheral euuinment ~
~
A Tutorial Program for pH Calculation Glenn E. Palmer University of Prince Edward Island Charlottetown. PEI, Canada CIA 4P3 One of the perennial problems encountered in our freshman course lies in the calculation of pH. The wide-spread availability of electronic calculators has, to a great extent, solved the problem of handling logarithms, isolating the real difficulty that students have with the basic concepts involved. Because these concepts are encountered again . in suhseuuent courses in biology and chemistry, we feel that it is important that an understanding of them be gained in the first vear. Last year, a t the suggestion of some freshman students, we experimented with a computer program designed to generate typical pH problems for consideration. Reaction to the program was quite positive and the results in terms of student performance, although not conclusive, were encouraging. At the time that this program is described in class, students are made aware that they should bring writing materials and a calculator or logarithm table to the session. The program itself begins with an introductory section that outlines its organization and the form in which answers are to be entered.
I t then proceeds, operating in the following format. The user first chooses among four types of pH problem. These are 1) solutions of strone acids and hases 2) solutions of weakacids and bases 3) solutions of salts 4) buffer solutions
When one of these has been selected. a brief introduction. including the general equations for the equilibria involved in the tvwe, is uresented. A tvwical numerical nroblem is then generated and the user is asked to provide an answer to it. If tkis answer is correct (vide i n f r a ) the program selects and prints one of five positive responses. At that point the user may choose to trv another examule of the same tvoe, ". . or to work on one of the other types listed. If the answer presented is incorrect, then the wrozram al. lows the user to enter an alternatwe answer or to request help with the prohlem a t hand. For the simple cases of strong acids and bases, only one such 'help' is provided. However, for the more complex types, a sequence of 'helps' is available. These are presented in an order that allows the user to become aware of the aspects of the problem that must be considered to reach a solution and the route to that solution. After each 'help,' the user is given the option of presenting a recalculated answer or requesting more aid. When the supply of 'helps'has been exhausted, the program provides the correct answer. The user is then free to try another problem of the same type, one of another variety, or terminate the session. The uropram is able to wrovide a verv. laree number of problems f i r the student toattempt since, except in the case of buffers, both the concentration and the identity of the substrate are randomly selected. In the buffer solution problems, the concentrations of the comwonents are selected
-
(i.e., non-quadratic) mathematical methods will yield acceptable answers for problems involving weak acids and hases and salt solutions. The program allows for some discrepancy between the user's answer and that calculated internally. These allowed differences range from 0.02 pH units in the case of strong acids and bases to 0.10 pH units in problems dealing with salt hydrolyses. The program, written in VAX-11 BASIC V1.2-1, is being executed on a VAX 111750. usineu Decwriter I1 and VT-100 terminals. It contains approximately 350 statements and 25 comments. Copies of the listing and sample executions are available from the author a t the above address for a fee of $5 to cover costs of handling and mailine. should be hv u Pavment " check, made payable to the University of Prince Edwari Island, Account # 1672-382. The author wishes to acknowledge the enthusiastic cooperation of the Chemistry llOA class of 1981-82.
A Pocket Calculator Program for the Solution of pH Problems via the Method of Successive Approximations Wayne C. Guida Eckerd College St. Petersburg, FL 33733 Chemistry students generally encounter pH problems in several of their courses beginning with general chemistry. Calculation of the pH of a solution prepared by dissolving a weak polyprotic acid or any of its salts in water is usually treated in a rigorous fashion in the analytical chemistry course. Since many polyprotic acids occur naturally in the form of amino acids, polycarhoxylic acids, and inorganic acids like phosphoric acid, this type of calculation is also encountered by students of biochemistry. In our analytical chemistry and biochemistry courses our students solve such problems hy Volume 60
Number 2
February 1983
101