3/1/1982 Basic Solution a Month LaterPer your request in the December issue of Softalk, I am taking the time to write and tell you that I really enjoyed your column. In fact, I enjoyed it to such an extent that I typed in the short program submitted by Brad Stone for a "Hello" program. Anything to make life easier and more tricky, right? Well, in this case, tricky it was, as I was not able to detect any typos with my inexperienced eye, something I was specifically looking for as my abilities as a programmer are limited. And we have all seen the corrections to programs that have been listed in magazines run in the next month's issue, right? Well, right at the end of the listing, on line 320, there is a lower-case b. Then right on line 1000 there is a symbol that I cannot find on my Apple keyboard. So I saved the program to disk until such time as I can fix it or read in your column next month how to do it. It is not all that bad, however, for in the process of trying to fix the program I learned some more about Basic and a couple of other items of interest about the Apple, so I consider the time well spent anyway. But just in case I can't fix it, you will print the corrections, right? I have, as you have undoubtedly gathered, an Apple, with two drives, a monitor, and a C.ITOH M-85 printer.
I am stationed in Tokyo, Japan, with the U.S. government and was able to get the monitor and printer at really nice prices as they are manufactured here. The M-85 is the counterpart of the Epson MX-80. There is quite a lot of activity in the area, with both Japanese and Americans getting together for talk and demonstrations, really an exciting atmosphere. Some of the Japanese are really talented at hardware fabrication and machine language, a real joy for a neophyte like me to be around. By the way, Softalk, Softside, Nibble, and C.A.L.L. Apple seem to be the most popular English language magazines here, but the Japanese have a whole slew of publications with quite technical articles. Well, this was just a short note to say "Keep up the good work," but as usual this is so much fun that I got carried away. Oh, the types of programs that I like are the ones that make life easier, like the one in the December issue. Again, enjoyed your column and hope to see more programs like the above. But I think I will wait until the corrections come out next time, at least until I find out more about programming. Brant Shockly, Camp Zama, Japan - V2N7 1/1/1982 The Address ControversyPlease send me the address of Shakti Systems, manufacturer of the Pegasus DBMS for Apple Pascal, as mentioned in Marketalk of your Augtist 1981 issue. I, like Mr. Peter Wagner (letter, September issue), would like you to give the addresses of the manufacturers listed in Marketalk and other columns in Softalk. I understand your wish that readers patronize their local Apple dealer and sincerely wish that I could. I am sure that there are many other Softalk readers who either do not have a local Apple dealer or whose dealer has no knowledge of recent products for the Apple. We, and the manufacturers, your advertisers, would benefit by being able to contact one another.
Gerald Perkins, APO San Francisco, CA - V2N5 1/1/1982 Toward Easy ConversionI have been reading Softalk for the past few years now and I must say that it has come a long way in that time. I have found that among the most helpful articles in Softalk are Basic Solution and Assembly Lines. One difficulty some of us have is converting hex numbers to decimal and decimal to hex. To that end, I submit a program, which I think will help my fellow Apple users. Here is how it works:
10 REM **THIS PROGRAM IS DESIGNED TO CONVERT HEX ADDRESSES TO DECIMAL OR DECIMAL TO HEX . 20 DIM A%(4,1),D$(4,1) 30 CLEAR 40 PRINT "ENTER INPUT NUMBER FORMAT 'H' = HEX, 'D' = DECIMAL?": GET 0$ 50 IF 0$ = "D" THEN GOTO 220 60 IF ASC (0$) = 13 THEN PRINT "BYE": END 70 IF 0$ < > "H" THEN PRINT "INVALID OPTION ENTER 'H' OR "D"': GOTO 40 80 PRINT : INPUT "ENTER HEX NUMBER TO BE CONVERTED? "; A$ 90 L = LEN (A$): IF L = 0 OR L > 4 THEN PRINT "INVALID ENTRY, REENTER": GOTO 30 100 FOR J = 1 TO L:N = L - (J - 1) 110 FOR I = 0 TO 15 120 READ B$ 130 IF B$ = MID$ (A$,N,1) THEN A%(J,1) = I: GOTO 170 140 NEXT I 150 PRINT "AN ILLEGAL CHARACTER WAS DETECTED IN THE INPUT STRING. IT IS -" MID$ (A$,J,1): RESTORE : GOTO 30 160 GOTO 30 170 RESTORE : NEXT J 180 D = A%(1,1) -I- (16 (A%(2,1) ) ) -I- (256 *(A%(3,1) ) ) + ( (16*16*16) * (A%(4,1) )) 190 PRINT "THE DECIMAL EQUIVALENT OF'"AS" ' IS "D200 PRINT 210 GOTO 30 220 PRINT : INPUT "ENTER DEC NUMBER TO BE CONVERTED? ";R 230 IF R = 0 OR R > 65535 THEN PRINT "INVALID DECIMAL ENTRYI": GOTO 220 240 C = R 250 A%(1,1) = R / 4096 260 R = R - (4096 * (A%(1,1) ) ) 270 A%(2,1) = R / 256280 R = R - (256 * (A%(2,1) ) ) 290 A%(3,1) = R / 16 300 A%(4,1) = R - (16 * (A%(3,1) ) ) 310 FOR J = 1 TO 4 320 FOR I = 0 TO 15 330 READ B$ 340 IF I = A%(J,1) THEN D$(J,1) = Bl GOTO 370 350 NEXT I 360 PRINT "DECIMAL NUMBER OUT OF RANGE FOR 4 HEX BYTES": GOTO 30 370 RESTORE : NEXT J 380 E$ = D$(1,l) -I- D$(2,1) + D$(3,1) -I- D$(4,1) 390 PRINT : PRINT "THEN HEX EQUIVALENT OF' "C" ' IS "E$ 400 PRINT 410 GOTO 30 420 DATA 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F430 REM ***** THIS PROGRAM DONATED BY RICHARD A. PAHON, 362 HASTINGS BLVD., BROOMALL, PA 19008 Lines 40 to 70 are used to select and validate the option "H" or "D." Line 80 requests the hex address as a string variable. Line 90 validates the input. Line 100 establishes the for-next loop used to check each input character, the N variable is created to invert the J sequence since the mid$ step in line 130 reads characters from left to right (left justification for characters). The for-next loop of lines 110 to 140 is used to check each input character against the data statement in line 420. Then use the value of I (which corresponds to the match of "B$" to input character J) to load the array A%, J. Line 150 detects an illegal character. Line 170 resets the data pointer to entry #1.Line 180 is the heart of the hex-dec conversion; it raises each variable in the array A% to the appropriate power of sixteen and then sums the results into variable D. Line 190 prints the results. Line 220 is used when dec to hex conversion is requested. The input is stored as a real number since Apple will not accept an integer number larger than 32767 and $FFFF is 65535 in decimal. Line 230 validates the input. Line 240 saves the input in variable C for later display. Lines 250 to 300 convert the input "R" into an equivalent integer variable A%. Each A% variable is loaded with the appropriate number of times that the power of 16 (4096, 256, 16, 1) will divide into R, the input. Each time a division occurs, the product of sixteen raised to the appropriate power and the integer value A% is subtracted from the input variable R. Thus the remainder is paussed on to the next lower power of sixteen for division. Line 310 starts the for-next loop that will load the output variables. Lines 320 and 350 match the integer loaded in A%,J against I; when a match is found the corresponding B$ variable represents the hex equivalent of the integer A%,J. The appropriate B$ variable is then loaded into the string array D$, J. Line 360 is printed when no hex match can be found. Line 370 restores the data pointer as above. Line 380 is used to concatenate all of the D$ variables into the output variable E$. Line 390 prints the result of the conversion. Line 420 is the data statement that represents all the possible hex designations. I hope you will accept this as my thanks for the good work you folks are doing. Richard A. Patton, Broomall, PA - V2N5 1/1/1982 International ApplesMr. Gregory Enos asked for names of Apple computer users' groups in foreign countries (October 1981, page 9). While I am unaware of any official group here in Rio, I do know many of the Apple owners. Perhaps if he were to contact me for whatever help he wants, a "users' group" would appear.
John D. Trotter, Rio de Janeiro, Brazil - V2N5 From Each According to His Ability, to Each According to His Whim Let's End The War Right now the Apple users are in a state of confusion. Looking at all the new software that is on the market, with the boom in home computers, and seeing the prices on programs makes us wonder what's going on. We have to make a decision between saving our hard earned cash and paying the ridiculous high prices for these programs or being illegal and getting black market programs at a more affordable price; neither is a good choice. I have noticed in recent ads in other computer magazines that certain companies have more or less declared war on those that are making these copies. Granted software companies should #a S ( U I A I V make a profit on the work and effort of what they have done. But how much of a profit and for how long? That's what it gets down to. Most companies need at the most 6 percent profit to put back into the company. The prices we see have to be more than that, figuring they can't be paying over $2 for the diskette, and that leaves the remainder for the printed matter, which can't be more than $5 (basing this on the price of similar material on the market), which comes to a total of $7. Most software listed in Softalk sells from $26.95 on up. If these manufacturers would bring the price down, these so-called pirates couldn't afford to buy the copy programs, take the time to copy, and still figure that they are coming out ahead I am not for copying copyrighted programs because these companies have earned the rights to them and it is against the law. However if these same companies would wake up to the fact that they Could all but eliminate these pirates by cutting their prices (in some cases by more than half) , it would make a simple compromise.
Steven Straughn, Omaha, NE - V2N5 12/1/1981 TTL Logic LevelsContained in the article, "The Controller Even You Can Make" {Softalk, October 1981) by Silas Warner, there are two paragraphs under the label TTL Logic Levels that contain some misinformation. Perhaps the following may help. A TTL logic low level can be anywhere from 0 volts to 0.8 volts but usually is 0.4 volts or less. A TTL logic high level can be anywhere from 2.0 volts to 5.0 volts but usually is 2.4 volts or higher. There is a big difference between an output that is grounded and an output that is in the low state. When TTL parts are tested by the manufacturers an output short circuit current test is usually performed but the output is grounded for only a few hundred microseconds to prevent damaging the device. It is not a good practice to literally ground an output. Mr. Warner also discusses the differences between the output current that flows in the TTL device when high and low. It is true that TTL devices do most of their work when in the low state. This is because of the great difference between the current sinking capability (low) and current sourcing capability (high). Current flows into an output pin when it is low and out of an output when it is high.
Three-state parts are different but not considered here. The 7400 (pronounced seventy-four hundred) series TTL logic family can sink 16 milliamps (mA) and source 800 microamps (uA) in many but not all cases. Just as there are different "standard" configurations for the Apple computer, there are different "standard" TTL logic families. For instance, a 7410 TTL device and a 74LS10 (LS stands for low power Schottky) perform the same logical function but have different operating speeds, power consumption, and output drive capability. The LS part in this case can sink 8mA and source 400uA which is one half of the ratings for the 7410. There are differences between parts in the same family. A person who is putting together a circuit that uses TTL devices should refer to one of the many available TTL data books for the specifics. Kenny Lloyd, Falmouth, ME - V2N4 12/1/1981 A True GentlemanI recently wrote to you concerning the fact that Maromaty and Scotto's Corp. would not produce an independently executable Applesoft program on my machine. The letter appeared in your October Open Discussion. Frankly, it appears that there is a problem with one of my disk drives and that indeed the program will produce an independently executable Applesoft program. Maromaty and Scotto were kind enough to refund my purchase price before I had located the error. My apologies to Maromaty and Scotto for maligning their software.
William Kirtz, Kyotoshi, Japan - V2N4 10/1/1981 An Apple in Any Language . . .I am trying to locate all the Apple computer users' groups in foreign countries, especially in non-English-speaking countries. Do you have a list, or can you help me?
Gregory Enos, Dallas, TX - V2N2 12/1/1980 how do we make our own backups?Good job on "Pirate, Thief." Added cost not brought up is the cost to make a disk or tape not copiable. How do we make our own backup?
D. L. Ames, Winchendon, MA - V1N4 11/1/1980 my name in lightsI just received my first issue of your magazine. The article entitled "The Basic Con Job" really hit the mark as I am being paid to write a CAI program (in Integer), and I wanted to insert my name in the credits without someone erasing it. I had searched all the documentation I had and had almost given up hope when your magazine arrived. Now, I can have my name in lights indelibly!
Jay Riddell, Hayward, CA - V1N3 |