Access_v2n1 Access V2n1
User Manual: access_v2n1
Open the PDF directly: View PDF .
Page Count: 31
Download | |
Open PDF In Browser | View PDF |
A Letter From The [Outgoing] Editor "Alas poor Yorick, for I knew him well." Willie the Shake For those of you who don't already know, this is to inform you of my departure from PTC and my abdication of the editorship of ACCESS. The reason for this change is fairly simple: I'm going to work for myself as an independent consultant (free-lance technician in plebian terminology). Sorry I can't provide any scandalous gossip about my reasons for leaving. But, if you really must ask, well, let me tell you . . . Obviously I couldn't have gotten to the position of being my own boss if it hadn't been for the training, experience and contacts (not to mention confidence) I gained at PTC. Leaving definitely creates an empty spot in my life, having grown with the company (2 years). I feel like a teenager leaving home for the first time (sob, sob!). But enough being maudlin and on to the corn. I think old Ralph should be able to take the helm and steer the ship-of-state through the uncharted waters of the future, in a manner and style befitting one of this stature. My God! Somebody shut this fool up. He sounds like journalistic Muzak!! Why should I shut up, dammitt. I'm the Editor. I can say anything. Not anymore you can't. You're just the Outgoing Editor. You don't count any more! Well, as you can see, there are good reasons for me being locked up in this place. And, what the hell, the food's OK. I guess it's time to go, so I'll close this chapter of history with a sentimental goodbye to y'all. And expecially to Les Solomon who could be a guru. But whoever heard of a Jewish guru? Love and kisses to all, Aram Attarian II (415) 534-6628 1924-10th Ave. Oakland, CA 94606 Volume Two, Number One March 1978 Publisher Processor Technology Corp. Editor Ralph I. Palsson Staff Writers Lee Felsenstein Drew Rogge Design/ Production Wible/Rampton Advertising ACCESS is published approximately every six weeks. Subscription rate: $4 per year, from Processor Technology Corp., 7100 Johnson Industrial Way, Pleasanton, CA 94566. ACCESS Copyright C March 1978 by Processor Technology Corp. All Rights Reserved. Material in this publication may not be reproduced in any form without permission from Processor Technology Corp. Table of Contents Reader Feedback................................................................................................ page 3 A review of our Extended Cassette BASIC, now available.................................. page 6 The Sol Users' Society grows and wants you! ..................................................... page 6 Adjusting BASIC/5 for the new Extended Cassette BASIC................................. page 7 Lee Felsenstein elucidates interfacing to Sol's parallel port ................................. page 9 Having trouble with your 16KRA? Check this.................................................... page 11 Vectored interrupt capability for Sol................................................................... page 11 Interfacing the OP80A Paper Tape Reader to your Sol-20................................... page 13 A selection of programs and applications contributed by our illustrious readers... page 14 Have YOU Moved? Please notify us of your change of address. Here's a handy form: NAME ______________________________ NEW ADDRESS ______________________ _____________________________________ _____________________________________ A Letter From The [New] Editor That's me, Ralph Palsson. Remember me from One-to-One Communication? I'm changing hats because Aram Attarian II, former ACCESS editor, lead Warranty Repair Applications Engineer, customer interfacer, and all-round good guy, has succumbed to the siren song of "making it" freelance. He's setting up an independent systems consultant and repair technician, and we're going to miss his red suspenders around here. He devoted a lot of creative energy and talent to making ACCESS what it is today, so I'll do my best to keep up the good work. For Aram's last words of wisdom to us, see his outgoing editorial on p. 2. Now that I have this column to sound off in, we'll probably discontinue One-to-One Communication as separate feature. The original idea behind ACCESS was to make it a vehicle for one-to-one communication in its entirety, and that's beginning to happen, as you'll see from the many excellent reader contributions in this issue. I'll be laying it pretty heavy on you readers to keep up the good work-send us your program listings, letters, hardware modifications, applications, anything you think is worthwhile and would like to share. The main change I initially hope to make in ACCESS is getting it on a somewhat more regular publication schedule, aiming at every 6 (±2) weeks. And I promise that everyone who had paid $4.00 for a year's subscription will actually receive 8 issues, regardless of how many leaves get torn off the calendar. As for the new format- well, you people seem to be as enthusiastic about it as we are, and we'll keep adding whatever improvements we think of. Again, your suggestions are valuable, like the punched-hole idea several readers have mentioned. I like to think of ACCESS as one proof of the pride Processor Technology takes in providing customer support. So far, we have a pretty good track record, but we aim to make it even better. We have a very user-oriented Customer Service Dept., plus the more technically inclined applications and product support engineers regularly available to help you with debugging and troubleshooting your kits. They're also good with advice on how to interface a Sol or 3P+S to a peripheral device. And we even have a customer service software consultant available for phone discussions. But there's one thing none of these people can do, and that's help you with support for XYZ company's floppy disk or ABC's 16K board. No matter how expert they are, our engineers can't know the personal design quirks of a product they may never have seen, and really your guess is as good as theirs many times. We'll do as much "hand-holding" as we can by phone or letter, but please understand the distinction between help with interfacing and help with someone else's product. Our Customer Service technicians are currently available daily from 1:30 to 4:00 p. m. PST for phone consultation. The number again is (415) 829-2600. We'll increase the hours as soon as we can add more trained personnel who can give you straight answers you deserve. I'll end with my usual plug for Processor Technology dealers. These guys can provide you with a wealth of information and assistance without running up your phone bill. Our intentions are good, and we back them up with action as much as possible, but it's a fact of life that we're way out here in Pleasanton, CA. And if you're in Manhattan, Bloomington, or even Lompoc, you will probably get more personal service from the dealer who's helped you plan your system in the first place than you can get from a voice on the phone. The idea is to give you the best support possible, wherever it comes from. Well, hope you enjoy ACCESS # 5, and in the words of AA II, y'all have a good time, y'heah?! Ralph I. Palsson Dear Editor: HISTOGRAMS IN BASIC (Or how to display multiple cursors) Attempting to use Basic 5 for plotting the results of stock analysis, I wanted to plot a graph of the derived results. An approach has been developed, using the TAB function to start a plot, and a calculated value of a variable to end the plot. I also wanted to use reverse video to highlight data or to plot a bar made up of (a0 hex) "cursors:" Initially this was difficult, since many 7F masks were used in the VDM driver within CUTER to maintain a clean display. Therefore the VDM driver cannot be entered with a CALL to its entry address, since bit 7 is cleanly stripped off. The solution to this problem lies in addressing that portion of the VDM driver starting at location C0BB after having put the A0 into register B. That can be done as an immediate move in machine code necessitating a call from Basic to your machine code which in turn calls the driver, or by using the ARG command in basic before the call to the driver. This latter approach has an advantage in that the value of the ARG can also be calculated thus giving you control over the character chosen for the plot. (Incidentally, the 7F, delete character makes a nice chart due to the spacing between bars.) These ARG and CALL functions are used within a FOR-Next loop which is set up as described in the beginning of this description. That looping puts out the desired number of repeated characters and leaves VDM screen management control within the Basic/Cuter/VDM driver software management system. In closing, let me send my praise and thanks for your product quality and utility. The PTCO additions have really enhanced my IMSAI. Donald F. Petrie 831 Ponderosa Dr. So. Daytona, Fla. 32019 Donald also enclosed a carbon of a letter he wrote in response to Dave Wrobel's query in the last ACCESS: January 10, 1978 Dear Dave: Don't despair! Inverse video is attainable. I noticed your letter and Mr. Attarian's response in issue number four of Processor Technology ACCESS. I too was interested in the use of inverse video with my IMSAI/ VDM/CUTER configuration and was frustrated when using the SOUT entry point of the VDM driver. When I use an ANI 7F in the code, a cleanup, stripping off of the parity bit (in our case the VDM inverse video bit) is performed. There is a simple solution to the problem, however, if you will use a machine language subroutine (callable from Basic, if desired) which calls the VDM driver after the housekeeping stripping referred to above. This driver routine, identified as "OCHAR," is at CUTER location C0BBH and in SOLOS at location C098H. Calling the driver at OCHAR with bit 7 high will result in the desired inverse video display. You have a number of options in approaching this problem. In machine code, put the character into Register B, with bit 7 high and then call OCHAR. In BASIC/5, establish the character as the value of an ARG function and use the Basic ARG/CALL routines to call OCHAR. And if you want keyboard on-off toggling control of this feature, a simple custom output driver invoked by the SOLOS/CUTER pseudo-port 3 routine can be written to sense your command choice; then either add or strip-off bit 7 as appropriate and put the character in register B before calling OCHAR and returning to your system. I hope one of these suggestions will be of use to you if you haven't already found a solution to your desire for inverse video display. D. F Petrie cc: Mr. Aram Attarian Editor, Processor Technology Access Dear Donald, Yes, Virginia, Inverse Video is attainable in Sol BASIC/5, thanks to your information. Reader Tom Digate has also sent us a contribution on this subject, a cassette written in BASIC15 demonstrating the uses of SOLO's VDM driver escape sequence. A printout of his program appears in the ACCESS to Software: section of this issue. Many thanks to you, too, Tom. Aram is passionately hardware oriented and doesn't always realize that anything's possible with software! Ralph Dear Editor: Enclosed you will find a check for $4.00 for my 1-year subscription to ACCESS. I was at my local computer store, (Itty Bitty Machine Company, Lombard, ILL), and they gave me a copy of ACCESS to look at. I thoroughly enjoyed reading the articles in the November issue. Congratulations on your fine publication. I have a question that you or maybe your readers could help me on. I have a IMSAI 8080 Micro Computer with the following boards: a 16K Processor Tech. Memory, VDM board by PTC, and my problem, 1 Tarbell Cassette interface board. I am going to purchase your (Sol) Basic Computer and I would like to know if there is a program to convert the CUTS format to Tarbell format for my cassette interface. I would like my IMSAI to run Sol software. If anyone can help, please do. Thank you. Robert Bennett 2046 Louis Street Melrose Park, ILL 60164 Dear Bob, Thanks for your letter; an ACCESS subscription has been entered for you and hopefully you're now reading this in your first copy. Note that Sol BASIC/5 is an interpreter, not a compiler. If you're feeling any confusion about it, I'm sure your dealer can help. About the CUTS/Tarbell matter. PTC doesn't support the Tarbell cassette interface with hardware or software, because we feel that CUTS is a superior system for several reasons. The CUTS (Computer Users Tape Systems) recording method was derived from and is compatible with the Byte (Kansas City) standard recording method, a system that PTC helped develop at the 1975 Kansas City meeting. We believe strongly in promoting software standardization and have put a lot of effort into the cause. CUTS was especially designed to permit widespread dissemination and exchange of low cost software. To that end, CUTS tapes are less expensive and easier to produce than Tarbell; PTC has shipped over 30,000 of them to date with less 1 % failure rate-not bad, if we do say so ourselves! And although CUTS is slightly slower than Tarbell, it requires less adjustment to work with a greater variety of tapes: and cassette recorders-again facilitating standardization and exchange. So while we can't be too encouraging about your conversion project, we hope you will continue your interest in CUTS and Sol software. We think you'll end up very happy with it. Ralph Gentlemen, I am enclosing a listing of a game written in BASIC called Hammurabi. I found it in one of the hobbyist magazines, Personal Computing, I think. I modified it to run in Basic/5 and I and my two boys have enjoyed playing it. I thought perhaps other Sol owners might also enjoy it. It will run in 8K and I run it on the CRT. I have enclosed a printout of a typical "year" of the game ending with a deliberate error which ends the game with a loss of kingdom. The entire successful game would have been too long a printout and I think the short example will give anyone looking at it the idea of how it's played. I enjoyed the first issue of the new format of Access. Keep up the good work. I visited your booth at the New York Coliseum and was very taken with the Sol set up to record a mailing list on tape which was open to public entry. If a copy of this program is available, I would very much like to obtain one. Best wishes for your continuing success. John Dowd Lynn's Hair Fashions New Road, Central Ave. Linwood, N.J. 08221 Dear John, Thanks for your comments and contributions. The mailing list program you saw in New York was just a demo version and not availavailable in its present form. However, our software development is now shifting to an emphasis on applications, and you'll find many exciting programs forthcoming in the near future. To our readers, Besides the Hammurabi program, John also sent us two others, PAROL and COMM. All three appear in the ACCESS to Software section-try them out! Ralph RE: So120 Gentlemen: I purchased my So120 mid December 1977. After several hours of building (72) the Sol, to explicit and well defined hardware assembly instructions, I had a letter perfect "turn on:" My compliments to all connected with this portion of the manual and hardware parts staff. I have encountered one problem which I have since corrected. This was a very heavy smearing and unstable effect on my video monitor Distortion severe enough to force shut down manually and of course interrupting work in process. I could still "SAVE" etc. But it was very difficult to read monitor and inputs, when instability occurred. Being more familiar with R.F., video and communications equipment than logic, I found a quick and normal solution to the problem, one which is a standard practice in the R.F. field. Solution: The clock generator at "14.31818 MHz" is fairly open to external field excitation, by nearby C.B. and other transmitter frequencies. This unprotected portion of your circuit tends to wander if excited by an external signal and does not settle down. The reason is the XTAL can itself, floating above ground. A short jumper between the can and ground corrected the problem immediately. I hope this assists other Sol users. Now the bad news. I realize most people purchasing Sol's are probably more software oriented than I am. Therefore, your company did a painstaking task on the hardware. But your software writeup for a beginner (28 years communications) in computer talk and functions is very poor. I know it is difficult and a lot of self study must be done, which I am now doing, but! Might I suggest you acquire some unsuspecting person with no software knowledge, sit him/her in front of the machine, hand him "Console Manual" and "Solos Manual" and watch the confusion. If it is me, I apologize. But after showing your book to 3 top software experts, they agreed, it was written by a software expert. Example: After 10 hours of reading, re-reading, 1 trip to vendor (80 miles), no luck, re-reading, etc., trying to work out the CRC computation. Nowhere could I see it written. "When you desire to save a file. Input SAVE (title) 5 words and press "RETURN:" N.B. "Making sure recorder is in record mode:" But most important, "File header is then automatic:" I guess I'm saying try to use layman's language, if possible. If you re-read "SOLOS" I am sure you will agree. I am very satisfied with the unit and want to congratulate those who worked hard on design and appearance. Well done. B. W. Poste 17 Lonsdale Place, Barrie, Ontario Dear B. W., Thanks for the compliments, and for the hardware fix. Many of our readers will find your contribution from the RF/analog world extremely useful. Your critical points on documentation and software are very worthwhile. PTC's Technical Documentation Dept. is always looking for input that will help future publications be more clearly presented, on the appropriate level of expertise. Meanwhile, we'll try to provide some concrete follow through in the next issue of ACCESS. Ralph Gentlemen: Loved the new ACCESS format, but tell me, will my one-year subscription be extended to cover the first 8 issues (since you nominally publish every 6 weeks)? You haven't quite been able to keep up with the announced schedule for either ACCESS or ALS-8 users notes, (though the latter are not officially a product of P.T.). Also, (this may sound like a dumb question), is there any chance of re-publishing the 1st 3 issues in the new format? Even if it costs $2-$3 per copy? The new format is so much better, especially for my only good source of a CUTTER (or SOLOS) listing* Thanks. Barry Watzman 2330 Millenium Lane Reston, VA 22091 *Besides, then I could keep a complete collection of ACCESS in a 3-ring binder! Dear Barry; Yes. We'll make sure you (and other ACCESS subscribers) receive 8 issues before you come up for second year billing. Also, we aim to put the journal back onto a more reasonable schedule. As you might guess, costs of republishing out-of-print ACCESS issues are prohibitive. However, I'm thinking of possibly doing a collection of the "Best of ACCESS" as a separate issue or reprinting the most requested articles from past issues. How do you other readers feel? (NOTE. We still have a lot of our 2nd issue on hand; numbers 1 and 3 are out of print.) Ralph Extended Cassette BASIC Is Here! Our long-promised Extended Cassette BASIC has been released and is now at your local PTC dealer. It's a powerful language, and we'll be publishing assorted program listings in future ACCESS issues to stimulate your imagination on its applications. Just for starters, note that Extended Cassette BASIC features complete string functions and matrix operations. And the documentation is excellent. It's rumored there may be some bootleg copies floating around. Assure yourself of getting a quality tape and complete package by buying only if the cassette and manual are identical to those shown in the photograph here. There's one slight bug we've discovered in using manual FOR/NEXT loops. The bug occurs when there is a FOR/NEXT loop within a FOR/NEXT loop which will not allow the execution of the inner loop. The squasher allows the execution of the internal loop rather than searching for a loop elsewhere in the program. It's easily fixed by following this 5-step procedure: 1) GET BASIC from the tape. Note the load address and length. 2) Type EN B3E in SOLOS. (CR) 3) Type the following numbers, separated by a space: C1 CA 2E 0B/(CR) 4) SAVE BASIC (refer to Section 3.4 in the BASIC User's Manual). Let the tape run in the RECORD mode for 10-15 seconds before re-recording. You can use a new tape if you wish, but the original one will work just as well. Use the load address and length information you obtained in Step 1 of this procedure, and make the auto start address 0 and ending address 3F84. If you're using the original cassette, affix scotch tape over the two holes on the back of the cartridge. Remove tape when finished; this will afford you "write protection." The Sol Users' Society Is Up And Running Last issue we reported on the formation and first meeting of SOLUS, the Sol Users' Society. It's an organization for owners of Sol computers or of Sol-type computers compatible with other PTC products. Specifically, if you have an 8080 or Z-80 microcomputer you're using with SOLOS, CUTER, SOL/ CUTS cassette interface, or any functionally equivalent operating system, you might like to join. The membership is world-wide. Currently, SOLUS has several good services going, beginning with their own bi-monthly (approximately!) newsletter to keep members informed on hardware, software, new products, bugs, local chapter meetings, and other items of interest. They maintain a Software Library which collects and distributes public domain programs for a nominal charge. Local chapters hold meetings to exchange software and ideas, and the club headquarters, in convenient proximity to PTC, keeps a close communication link going with us. Finally, qualified SOLUS volunteers are testing products for Sol compatibility and reporting their experiences in the newsletter. To refresh you on the club's goal and organization: The stated goals are to facilitate communication among SOLUS members, to provide a mechanism of exchange for Sol-compatible software, to give PTC feedback from SOLUS members, and to encourage the development and testing of Sol-compatible hardware and software produced by independent sources. Their relationship with PTC and other manufacturers is co-operative but independent. SOLUS is primarily a personal computer users' group, but special interest groups can be formed within the club on subjects like commercial use, health care, education, scientific applications, etc. The society is supported by dues and volunteer efforts. To join SOLUS: If you live in the U.S., Canada or Mexico, send $10.00 in check or money order to SOLUS, P.O. Box 23471, San Jose, CA 95153. If you live anywhere else, send $15.00. Dealers and manufacturers of Sol-compatible equipment or software should contact SOLUS at the above address for details on special memberships. What To Do With Your BASIC/5 Programs Now That You Have Extended Cassette BASIC Unfortunately, programs written in Sol BASIC/5 won't run with the new Extended Cassette (formerly called 8K) BASIC interpreter. But you can save yourself several thousand tedious keystrokes by using the following assembly language program to save your BASIC/5 programs in text form on CUTS cassette. Then it will be easy to get and run a text file on the new interpreter whenever you wish. The program uses the byte access tape routines in the SOLOS/ CUTER monitor. CLIST is written to be used as custom output diver in conjunction with pseudo port 3. When you use the program, load the machine code at the addresses indicated in the assembly listing below. Set the custom output port address to the beginning address of this program. Get and execute BASIC/5. Get the program you want to write to the tape. From BASIC/5, set the output port to 3 and type LIST. After your program has been saved, this routine will set the current output port back to 0. 000D 000A C01C C007 CODA C010 C807 CB00 CB00 CB01 CB02 CB00 C5 D5 E5 CB03 78 CB04 CB06 FE OD C2 26 CB CB09 CB0C CB0D CB0F CB12 CB13 CB14 CB15 21 7E FE C2 23 7E B7 C2 73 CB 0D 26 CB 4B CB CR EQU 0DH ASCII carriage return LF EQU 0AH ASCII line feed * * Solos equates * ROUT EQU 0C01CH FOPEN EQU 0C007H FCLOS EQU 0C00AH WRBYT EQU 0C010H OPORT EQU 0C807H * * The program starts here. * This is also the entry point. * ORG 0CB00H CLIST EQU $ PUSH B Save registers PUSH D PUSH H * MOV A,B get character * CPI CR Carriage return? JNZ CL2 * LXI H,LCHAR MOV A,M Get last character CPI CR If not two carriage returns in JNZ CL2 ... in a row then nothing special INX H Else check if first set MOV A,M ...of carriage returns ORA A If not then close file and JNZ CLOOP reset program CB18 CB19 CB1A CB1D CB20 CB23 CB26 CB27 CB29 CB2C 3D 77 3A 21 CD C3 78 FE DA 32 CB2F CB31 3E 00 CD 1C C0 CB34 CB37 CB38 3A 74 CB B7 CA 47 CB CB3B CB3C CB3E 78 FE 0B DA 47 CB CB41 CB44 3A 62 CB CD 10 C0 CB47 CB48 CB49 E1 D1 C1 CB4A C9 CB4B CB4B CB4E CB51 CB52 CB55 CB58 CB5B 3A CD AF 32 32 32 C3 62 63 5E 47 CB CB CB CB CL2 0B 2F CB 73 CB * CL3 DCR MOV LDA LXI CALL JMP MOV CPI JC STA A Else say we already M,A had first time through UNIT Get unit to write to H,HEADR Point to tape header OPNOP Open the tile GBACK A,B LF+1 CL3 LCHAR MVI CALL A,0 AOUT LDA ORA JZ FIRST Check if writing yet A GBACK Return if not MOV CPI JC A,B LF+1 GBACK LDA CALL UNIT Get unit to write to WRBYT Write the byte Reflect character to screen * * * 62 CB 0A C0 73 74 07 47 CB CB C8 CB CB5E CB5E CB61 CD 07 C0 C9 CB62 01 CB63 CB68 CB69 CB6A CB6C CB6E CB70 CB72 43 54 00 54 00 00 00 00 00 CB73 CB74 00 00 4C 49 53 01 00 00 00 * GBACK POP POP POP * RET CLOOP EQU * LDA CALL XRA STA STA STA JMP * * OPNOP EQU * CALL RET * UNIT DB * HEADR ASC DB DB DW DW DW DW DB * LCHAR DB FIRST DB H D B Restore registers . $ ...to Basic/5 UNIT FCLOS A LCHAR FIRST OPORT GBACK Close file Reset program for next ...time through Change output port to 0 $ FOPEN 1 Change to 2 to use tape unit 2 'CLIST' 0 'T' for TEXT 256 Length of block 0 0 0 Three spares 0 0 0 CB75 00 INFLG DB * 0 Interfacing To The Sol's Parallel Port by Lee Felsenstein The parallel input/output port on the Sol, J2, is intended to allow highspeed transfer of data between the CPU and outside devices. The circuitry was designed to be symmetrical, so that two devices having identical interfaces can communicate with each other. I n contrast, the 3P+S circuit puts out a positive-going data strobe pulse but requires either a negative-going data strobe pulse or a steady level in the return direction. As a result, two 3P+S boards cannot communicate without additional circuitry, while two Sols can communicate through their parallel ports with nothing but wires between them. Data is transferred on eight-bit-wide paths into and out of the Sol, through the pins of J2 labelled PID0-7 (data into the CPU) and POD0-7 (data out of the processor). Polarity of the data on these pins is positive---that is, a "high" logical level is equivalent to a binary "1." Data is latched at the output side of the interface and is not latched at the input side. This means that after an output instruction to the parallel port (port FD) is issued, the new data remains present at the output pins of the connector indefinitely, until the next output instruction is issued. Similarly, the external device which provides data to the Sol through J2 must keep its data present on the PID pins long enough for it to be "picked up" by the Sol CPU. Supervisory signals, known as "handshaking" signals, are provided in both directions to allow the devices on each side of the interface to know when data has been accepted and when each may present the next eight bits of data. Each side issues a negative-going "strobe pulse" when its data is ready and latched. In the direction going out from the Sol, this signal is called POL, for Parallel Output Load. The line over the signal name signifies that the signal is "active low." All of the handshaking signals are active low, so that a disconnected plug automatically results in a "not ready" condition. Resistors connected from the in-coming handshaking signals to +5 volts will "pull up" these pins to a high level automatically when this happens. Due to the pecularities of TTL logic, it is almost impossible to "pull down" a disconnected input. The external device sees the POL signal and immediately acknowledges it with a high level on the PXDR pin, (Parallel External Device Ready). The Sol CPU will test the level of this signal before issuing a new POL. The external device sets the PXDR low again as soon as it has accepted the data and no longer requires its presence on the POD pins. Fig. 1 shows the sequence relationship between these signals. In the incoming direction to the Sol CPU, the signals and the sequence are the same, with only the names and pin numbers changed. The data strobe fed to the Sol is PDR, (Parallel Data Ready). The Sol circuitry immediately responds with a high level on its PIAK pin (Parallel Input Acknowledge), which continues until the CPU has accepted the data presented at the PID pins. Fig. 2 shows a suggested circuit for providing the handshaking signals from an external device. Note the provision for an "Initialize" pulse. This prevents the circuit from starting up in a "not ready" condition and "hanging up" the Sol CPU. Some external devices will not require this signal, but as an interface designer or troubleshooter, you should understand the possible pitfall. 74LS series logic is shown, but any TTL logic may be used. Each input of the parallel interface should present no more than one standard TTL equivalent load (1.6 maximum current source). Three signals remain unexplained so far. These are PIE (Parallel Input Enable), POE (Parallel Output Enable), and PUS (Parallel Unit Select). These are direction-control signals to allow sharing of data lines among several devices. The latches in the Sol have "tri-state" output drivers, which can be "turned off" so that another device can take over the same data lines with its own tri-state drivers. The signal which turns off the Sol drivers is POE (Parallel Output Enable). This signal is high-active, so that a low level on this pin will cause the output drivers to release. It will therefore keep the output drivers on when no connection is made to that pin of J2. The Sol provides a signal which is intended to control the output-enable signal of an external device. This is PIE, a latched bit which is initialized to a logical "high" level and which can be set be setting bit 3 of output port FA. (The remaining bits of FA control other things, so care must be taken to keep them in the proper pattern when such an output is performed.) PIE may be used as a "direction control" bit if you want to share the data lines in both directions: for example, if you need to save wire or to use the interleaving wires of a ribbon cable for grounds to provide shielding on long runs. PIE would then be connected to POE of the Sol and to a similar signal on the external device which recognized a "low" level as its output-enable signal. The PID and the POD lines may now use the same eight wires. Note that the layout of the pins on E revision Sols and above (F, etc.) is such that the PID 0 and POD 0 lines are physically adjacent. This allows easy cross-connection of these lines in parallel when using a ribbon cable. If a 25-wire ribbon cable is used, the interleaving wires are free for use as grounds, helping to reduce the problems of "glitches" which often plague high-speed parallel interfaces. The PUS (Parallel Unit Select) pin is another latched bit, bit 4 of output port FA, which is initialized to a logical "low" level. It may be used to select two different external devices to receive or transmit data. These devices may share the same PID lines if their outputs are tri-state. Together with the PIE bit, the PUS bit allows the CPU to select four external devices, providing that appropriate decoding and response circuitry is included in the external device. Like all logic-level signals, the parallel interface signals should be kept away from high voltages such as AC and static electricity. Cables longer than 10 feet should not be used; or if they are, precautions should be taken to accommodate the "ringing" effects which will result during signal transitions. The most typical such precaution is "terminating" the line with a resistor, usually about 120 ohms connected to +5 volts. The output circuits of the Sol parallel port cannot drive a load of less than 330 ohms, so additional drivers may be necessary for such terminated lines. It is also a poor practice to connect edge-sensitive inputs such as the clock or trigger input of a flip-flop to the cable directly. Use an inverter or a Schmitt trigger circuit such as the 74LS14, 8837, or 8836 (8T380). Edge effects can be impossible to see on an oscilloscope, so precautions are usually advisable when attempting to "debug" a cranky interface. The Sol parallel interface provides many opportunities for imaginatvie and economical interfacing. we would be interested in hearing your results in applications which you consider noteworthy. Good luck! Important Notice To 16KRA Owners We're currently up to Revision Level J on the 16KRA memory board in our tireless quest to improve the reliability of the circuit. Most of the earlier boards work fine, and if yours isn't exhibiting any intermittent failures, you can stop reading now. We don't recommend making the modification unless you are having trouble. However, here's the modification procedure for those of you who need it. The assembly in question is Number 203000, shown on page VI-1 of the 16KRA manual. The portion of the drawing reproduced here, Detail A, shows the modification to increase reliability. Five jumper wires have been added to the trace side of the board, all at ground potential, in order to improve ground return paths. U30 is shown as a 75365-the alternate part 3207 should not be used at this location. To make the changes: 1) Connect pin 5 of U28 to pin 9 of U29. 2) Connect pin 9 of U29 to pin 9 of U30. 3) Connect pin 9 of U30 to pin 9 of U31. 4) Connect pin 9 of U31 to pin 5 of U32. 5) Connect pin 8 of U28 to pin 1 of U32. These changes don't require any change in the schematic shown on page VI-2, or in the Theory of Operation, Section V. Vectored Interrupt Capability For Sol Although the 8080A microprocessor used in the Sol provides vectored interrupt capability, neither Sol nor Processor Technology's other S100 modules require use of this capability. However, Sol does provide a means for implementing vectored interrupt if the interrupt signal is made available by a circuit board inserted in the S100 bus. This board is connected to S100 bus pin 96, SINTA. If you want this board to generate interrupts, you'll need to add two jumpers, shown below, to the Sol P.C. These jumpers enable the SINTA signal to reach the memory decoder circuit; they can be added after assembling the Sol P.C., or even after the entire Sol has been assembled and tested. The jumpers should be made from #24 solid insulated wire (not provided). Their electrical effects can be seen in Drawing X-16. They can be left in place even if no S100 board generates interrupts. and S100 bus pin 96 may float with no interference. The necessary modifications for both Revision D and Revision E level circuit boards are as follows: Modification to Revision E board. Sol-PCB: 1) Strip .1" of insulation from one end of two 8" lengths of wire. Insert the stripped ends into pads AC and AB (near U58), from the component side of the board. Solder and check for solder bridges. 2) Dress the wires as shown in the accompanying diagram, trim to the correct length, and strip .1" from the loose ends. Insert the wire from pad AB into pad AD, and the wire from pad AC into pad AE. Again, solder and inspect for solder bridges. 3) Attach the long runs of wire to the board with silicone compound or tape. Modification to Revision D Board, Sol-PCB: 1) Strip.1" insulation from each end of a 6.25" length of wire. Connect one end to pin 96 of J10 (S100 connector); the other end goes to pin 9 of U57. 2) Strip .1" of insulation from each end of a 4" wire. Connect pin 8 of U57 to pin 6 of U34. 3) Attach the long runs of wire to the board with silicone compound or tape. The Sol-20 And The OP-80A Paper Tape Reader by Drew Rogge Oliver Audio Engineering's excellent and inexpensive OP-80A Paper Tape reader is one of the most popular peripherals in use with the Sol-20 and Sol User's Manual does contain some information about interfacing it. However, there's an error in the manual, and hardware interfacing can be a tricky chore in any case. Especially when it comes to using the Sol's 8-bit parallel output port. (See Lee Felsenstein's article on the parallel port else where in this issue.) So here's what to do about the manual error, and also some other useful tidbits. Section VII (Operating Procedures) of the Sol Users' Manual discusses the OP-80A. The error is on page 31: pin 5 of J2 (Sol PDI connector) should be labeled IAK, not IAK. Therefore, the "input Acknowledge" jumper on the paper tape reader should be connected to ACK, not ACK. The intensity of the light source is also an important consideration in bringing the OP-80A up. You can allow just enough brightness to operate the tape reader, yet avoid saturating the tape, if you start by placing the light source far enough above the reader so that the SP LED indicator remains off. Then lower the light source just far enough to activate the LED, and keep it there. Pat Tuell, of the San Jose Byte Shop, has contributed a driver routine for using the OP-80A, which we've included along with this article. OP-80/ Sol Driver by Pat Tuell Enter the routine from keyboard or cassette; hook up the reader as specified. Execute C900, and start pulling the tape through. Intel-formatted paper tapes will automatically be loaded into the correct memory locations and control will automatically return to SOLOS. Have fun getting your data loaded! Note: In case you haven't already made the correction, please note that in ACCESS #4 there is a routine to load Intel-formatted tapes from a teletype connected to the serial port. Memory location 1F0A should be "3A" instead of "3B." C900 C900 C900 C900 C900 C900 C900 C902 C904 C907 C907 C909 C90B C90E C910 C912 C914 C916 C918 C91A C918 C91B C91D C91F C920 C922 C923 C923 C926 C929 C92C C92D C930 C933 C934 C935 C935 C936 C937 C938 C939 C93A C93A C93D C93E C93F C942 C943 3E 10 D3 FA CD 93 C9 DB E6 C2 3E D3 3E D3 DB E6 C9 FA 02 07 C9 00 FA 10 FA FD 7F D6 30 FE OA D8 D6 07 C9 CD CD CD 5F CD CD 83 C9 07 C9 1B C9 35 C9 07 C9 1B C9 07 17 17 17 C9 CD 07 C9 F5 47 CD 19 C0 F1 CD 1B C9 0010 0020 0030 0040 0050 0060 0070 0080 0090 0100 0110 0120 0130 0140 0150 0160 0170 0180 0190 0200 0210 0220 0230 0240 0250 0260 0270 0280 0290 0300 0310 0320 0330 0340 0350 0360 0370 0380 0390 0400 0410 0420 0430 0440 0450 0460 0470 0480 * * THIS WILL LOAD INTEL FORMAT PAPER TAPE *INTO SOL THRU OP80 READER CONNECTED TO SOL *PARALLEL DATA INTERFACE * * START MVI A,010H STARTUP OUT 0FAH CALL DAZL * PTIN IN 0FAH INPUT FROM OP80 ASC. ANI 002H JNZ PTIN MVI A,000H OUT 0FAH TOGGLE ACK MVI A,010H OUT 0FAH IN 0FDH ANI 07FH RET * HEX SUI 030H CONVERT ASC TO HEX CPI 00AH RC SUI 007H RET * CHAR CALL PTIN ASSEMBLE BYTE CALL HEX CALL ROLL MOV E,A CALL PTIN CALL HEX ADD E RET * ROLL RLC RAL RAL RAL RET * CARD CALL PTIN ASSM BYTE, DISPLAY PUSH 006H MOV B,A CALL SOUT POP 006H CALL HEX C946 C949 C94A C94D C94E C94F C952 C953 C956 C957 C958 C958 C95B C95C C95D C95E C961 C964 C964 C967 C969 C96C C96E C971 C973 C976 C979 C97A C97B C97D C980 C982 C985 C988 C989 C98C C98D C990 C993 C993 C996 C998 C99B C99E C99F C9A2 C9A5 C9A5 C9A5 C9A5 C9A5 C9A5 C9A5 C9A5 C9A5 C9A5 C9A5 C9A5 C9A5 C9A5 CD 5F CD F5 47 CD F1 CD 83 C9 35 C9 07 C9 19 CO 1B C9 CD 23 C9 77 23 15 C2 58 C9 C3 64 C9 CD FE C2 06 CD 06 CD CD 57 C8 06 CD 06 CD CD 67 CD 6F CD C3 07 3A 64 OA 19 OD 19 3A C9 CD FE C2 C3 47 CD C3 07 C9 3A 9E C9 6C C9 C9 C0 C0 C9 OA 19 C0 0D 19 CO 3A C9 3A C9 23 C9 58 C9 19 CO 93 C9 0490 0500 0510 0520 0530 0540 0550 0560 0570 0580 0590 0600 0610 0620 0630 0640 0650 0660 0670 0680 0690 0700 0710 0720 0730 0740 0750 0760 0770 0780 0790 0800 0810 0820 0830 0840 0850 0860 0870 0880 0890 0900 0910 0920 0930 0940 0950 0960 0970 0980 0990 1000 1010 1020 1030 1040 1050 1060 1070 1080 * LOOP * READ RD1 * DAZL WAIT CALL MOV CALL PUSH MOV CALL POP CALL ADD RET ROLL E,A PTIN 006H B,A SOUT 006H HEX E CALL MOV INX DCR JNZ JMP CHAR M,A H D LOOP READ INPUT DATA CALL CPI JNZ MVI CALL MVI CALL CALL MOV RZ MVI CALL MVI CALL CALL MOV CALL MOV CALL JMP PTIN 03AH READ B,00AH SOUT B,00DH SOUT CARD D,A LOOK FOR A BLOCK CALL CPI JNZ JMP MOV CALL JMP PTIN 03AH WAIT RD1 B,A SOUT DAZL B,00AH SOUT B,00DH SOUT CARD H,A CARD L,A CHAR LOOP * SOUT EQU 0C019H * * * * CABLE PINOUT * * SOL OP80 *REV D REV E PIN SIGNAL * 6 13 1 ID0 * 7 12 16 ID1 * 8 11 2 ID2 * 9 10 15 ID3 *10 9 3 ID4 C9A5 C9A5 C9A5 C9A5 C9A5 C9A5 C9A5 C9A5 C9A5 C9A5 C9A5 C9A5 C9A5 1090 1100 1110 1120 1130 1140 1150 1160 1170 1180 1190 1200 1210 *11 8 *12 7 *13 6 * *14 14 * 4 4 * 2 2 * * * * * THE SOL SURVIVOR * 14 4 13 ID5 ID6 ID7 5 6 8 9 ACKRDAGND +5V We hope this section is going to become a regular feature of ACCESS, and we hope that you're going to write it! All of the programs in this issue were contributed by readers, many of them as submissions to the Applications Contest described last issue. Naturally, they're all very much in the running we're just printing them now because they seemed too good to keep to ourselves. Keep your contributions coming---if this selection is a fair sample of the quality we can expect, ACCESS to Software may prove the most popular part of the magazine. You'll note the miniscule size of the listings. Well, the less space they take, the more we can run, and the more space we can devote to meatier prose in other sections. We're thinking that most users will only have to read the programs in once, and hoping that you'll become resigned to squinting your eyes as a one-time (per program), character-building experience, worth it for the rewards of acquiring the program. Also check the reader feedback section of this issue for additional comments by the authors of these programs. Again, you're encouraged to submit any and all programs you have. For purposes of accuracy and the suppression of typos, we encourage you to send either a cassette or photo-reproducible printout of the listing. If you send a cassette, we'll replace it with a blank one so you don't lose on the deal. Also try to provide as much support information as you can, like your uses for the program, where it originated, etc. It's a nice way to get your name in print! Contributions to this issue: Hammurabi (game, modified for BASIC/5).............................John Dowd PAROL (payroll records) ........................................................John Dowd COMM (weekly sales/payroll computations)...........................John Dowd Inverse Video in BASIC/5 (just that!)......................................Tom Digate BASIC VDM driver fix (to work with MITS 4.0 BASIC) ........Warren Saunders Thanks, fellows! BASIC VDM Driver Fix to Work with MITS 4.0 BASIC This useful emendation was contributed by ACCESS reader Warren Saunders of Oakton, Virginia. Add the following statements to BASIC and you'll be in the running! 0106 0154 0156 0158 0160 0233 FOR Y=L TO L+416 DATA 195,4000,5000,241,245,230,127,254,32,210,154 DATA 1001,254,7,202,6,1000,254,13,202,47,1000 DATA 254,1,202,47,1000,254,26,202,47,1000,241 DATA 201,0,0,245,229,213,197 DATA 254,127,194,47,1000,241,201 Note: BASIC VDM DRIVER with these changes remains compatible with previous versions of MITS BASIC. PAROL and COMM John Dowd told us he adapted this program to work with Sol BASIC/5 from a version found in Some Common BASIC Programs, a book by Lon Poole and Mary Borcher. No data is stored on cassette --- only the programs. John uses them with a printer to keep records of beauty shop income (Lynne's Carrousel of Hair Fashions in Linwood, NJ), sales analysis, employee commission and payroll. Previous balances and sales totals are entered by keyboard from cash register tapes and payroll records. He says that using Sol has cut the time required for these jobs from 4 hours to 45 minutes! LIST 10 30 40 50 60 70 90 100 110 120 130 140 150 160 170 180 190 195 200 210 220 230 240 250 260 270 280 290 300 310 311 312 313 319 320 330 PRINT "PAYROLL PROGRAM" DATA 16,33,18,76,22,143,24,182,28,220,32,297,36,355 DATA 15,61,18,105,22,223,25,278,28,355,32,432,36,500 F1=.0605 W2=19.2 W1=14.4 DIM F1(28) FOR I=1 TO 28 READ F1(I) NEXT I PRINT %Z2% PRINT "MARITAL STATUS (1=SINGLE, 2=MARRIED)" INPUT S PRINT "WITHHOLDING TAX EXEMPTIONS" INPUT W INPUT "REGULAR PAY ",R INPUT "COMMISSION ",C P=R+C PRINT "YTD GROSS PAY" INPUT Y PRINT "YTD FICA" INPUT Y2 PRINT "YTD FED. W/T" INPUT Y1 PRINT "YTD N.J. W/T" INPUT Y3 PRINT "YTD SUI" INPUT Y4 PRINT "YTD NET" INPUT Y5 O=Y-Y1-Y2-Y3-Y4 IF O=Y5 THEN 319 GOTO 130 P1=P1+P PRINT "OPERATOR NUMBER" INPUT O 340 350 360 370 380 390 400 410 420 430 440 450 460 470 480 481 482 483 489 490 495 500 510 520 530 540 550 560 570 571 580 590 600 610 620 630 631 632 633 634 635 636 640 642 644 646 648 650 652 654 656 658 660 670 680 690 700 710 720 730 O=P-W1*W T1=0 FOR I=2 TO 7 X=2*I+14*(S-1)-1 IF G<=F1(X-1) THEN 460 IF G>F1(X+1) THEN 420 T1=T1+(G-F1(X-1))*F1(X-2)/100 GOTO 460 T1-T1+(F1(X+1)-F1(X-1))*F1(X-2)/120 NEXT I T1=T1+(G-F1(X+1))*F1(X)/100 T1=T1+(G-F1(X+1))*F1(X)/100 T2=0 T2=INT((P*F1)*100+.5)/100 T3=0 T3=INT((P-W*W2)*2.2+.5)/100 IF T3>=0 THEN 489 T3=0 T4=0 T4=INT(P+.5)/100 T1=INT((T1*100)+.5)/100 N=P-T1-T2-T3-T4 PRINT "OPERATOR NUMBER",O PRINT "GROSS PAY",P PRINT "FICA",T2 PRINT "FED W/T",T1 PRINT "N.J. W/T",T3 PRINT "SUI",T4 PRINT "NET PAY",N T6=T6+T1: T5=T5+T2: T7=T7+T3: T8=T8+T4: N1=N1+N Y2=Y2+T2 Y1=Y1+T1 Y3=Y3+T3 Y4=Y4+T4 Y5=Y5+N Y=Y+P PRINT "YTD GROSS",Y PRINT "YTD FICA",Y2 PRINT "YTD FED W/T",Y1 PRINT "YTD N.J. W/T",Y3 PRINT "YTD SUI",Y4 PRINT "YTD NET PAY",Y5 SET 0=2 PRINT TAB(5);"REGULAR PAY";TAB(25);R This section prints out a PRINT TAB(5);"COMMISSION";TAB(25);C slip for each operator showing PRINT TAB(5);"GROSS PAY";TAB(25);P reg pay, commission, gross pay, PRINT TAB(5);"FICA";TAB(25);T2 deductions, net pay. PRINT TAB(5);"FEDERAL W/T";TAB(25);T1 PRINT TAB(5);"NEW JERSEY W/T";TAB(25);T3 PRINT TAB(5);"SUI";TAB(25);T4 PRINT : PRINT PRINT TAB(5);"NET PAY";TAB(25);N PRINT : PRINT : SET O=0 INPUT "AGAIN? (1=YES 0=NO)",A, IF A=1 THEN 130 PRINT "TOTAL GROSS PAY",P1 PRINT "TOTAL FICA",T5 This section gives payroll totals PRINT "TOTAL FED W/T",T6 for week and computes amount to PRINT "TOTAL N.J. W/T",T7 be reserved for payment of payroll PRINT "TOTAL SUI",T8 taxes, state & federal. 740 750 760 PRINT "TOTAL NET PAY",N1 R=INT((P1*2*F1)+(P1*.05)+1+T6+T7) PRINT "RESERVE FOR WEEK",R Comm LIST 50 75 100 110 120 130 150 160 200 300 312 320 330 400 500 600 610 620 630 700 800 900 910 920 930 1000 1100 1200 1210 1220 1230 1300 1400 1500 1510 1520 1530 1600 1700 1800 1810 1820 1830 1900 2000 2100 2200 2300 2400 2500 2600 2700 2800 INPUT "YTD SALES",G INPUT "YTD SALARIES",P9 INPUT "MONDAY TOTALS ",M1,M2,M3,M4,M5,M6 -- Cash register totals for day. PRINT "ENTRY ERROR? ( 1,YES 0,NO )" INPUT E IF E=1 THEN 100 M=M1+M2+M3+M4+M5+M6 PRINT %Z2% PRINT M1;M2;M3;M4;M5;M6,M INPUT "TUESDAY TOTALS ",T1,T2,T3,T4,T5,T6 PRINT "ENTRY ERROR? (1,YES 0,NO )" INPUT E IF E=1 THEN 300 T=T1+T2+T3+T4+T5+t6 PRINT T1;T2;T3;T4;T5;T6,T INPUT "WEDNESDAY TOTALS ",W1,W2,W3,W4,W5,W6 PRINT "ENTRY ERROR? (1,YES 0,NO )" INPUT E IF E=1 THEN 600 W=W1+W2+W3+W4+W5+W6 PRINT W1;W2;W3;W4;W5;W6,W INPUT "THURSDAY TOTALS ",H1,H2,H3,H4,H5,H6 PRINT "ENTRY ERROR? (1,YES 0,NO )" INPUT E IF E=1 THEN 900 H=H1+H2+H3+h4+H5+H6 PRINT H1;H2;H3;H4;H5;H6,H INPUT "FRIDAY TOTALS ",F1,F2,F3,F4,F5,F6 PRINT "ENTRY ERROR? (1,YES 0,NO )" INPUT E IF E=1 THEN 1200 F=F1+F2+F3+F4+F5+F6 PRINT F1;F2;F3;F4;F5;F6,F INPUT "SATURDAY TOTALS "S1,S2,S3,S4,S5,S6 PRINT "ENTRY ERROR? ( 1,YES 0,NO )" INPUT E IF E=1 THEN 1500 S=S1+S2+S3+S4+S5+S6 PRINT S1;S2;S3;S4;S5;S6,S INPUT "DAYS WORKED ",D1,D2,D3,D4,D5,D6 PRINT "ENTRY ERROR? ( 1,YES 0,NO )" INPUT IF E=1 THEN 1800 PRINT "DAYS WORKED ";D1;D2;D2;D4;D5;D6 B1=M1+T1+W1+H1+F1+S1 B2=M2+T2+W2+H2+F2+S2 -- Each operator's weekly sales total computed B3=M3+T3+W3+H3+F3+S3 B4=M4+T4+W4+H4+F4+S4 B5=M5+T5+W5+H5+F5+S5 B6=M6+T6+W6+H6+F6+S6 B=B1+B2+B3+B4+b5+B6 -- Overall weekly total G=G+B -- New YTD total C1=INT(((B1-(D)*44))*100)/4)/100 C1-C6-Operator's Commission 2810 2820 2900 2910 2920 3000 3010 3020 3100 3110 3120 3200 3210 3220 3300 3310 3320 3400 3500 3689 3708 3800 3900 4000 4100 4200 4300 4400 4500 4600 4700 4800 4900 5100 5200 5300 5400 5600 5700 5800 5900 5940 5950 6000 6005 6006 6010 6015 6016 6020 6025 6026 6030 6035 6036 6040 6045 6046 6050 6100 IF C1>=0 THEN 290O C1=0 C2=INT(((B2-(D2*40))*100)/4)/100 IF C2>=0 THEN 3000 C2=0 C3=INT(((B3-(D3*44))*100)/4)/100 IF C3>=0 THEN 3100 C3=0 C4=INT(((B4-(D4*44))*100)/4)/100 IF C4>=4 THEN 3200 C4=0 C5=INT(((B5-(D5*44))*100)/4)/100 IF C5>=0 THEN 3300 C5=0 C6=INT(((B6-(D6*44))*100/4)/100 IF C6>=0 THEN 3400 C6=0 C=C1+C2+C3+C4+C5+C6 P1=C1+(D1*22) P2=C2+(D2*20) P3=C3+(D3*20) -- Each operator's pay for week P4=C4+(D4*22) P5=C5+(D5*22) P6=C6+(D6*22) P0=P2+P3+P4+P5+P6 -- Total pay for week excluding operator#1--my wife P=P0+(.12*P0) -- Total pay & employer taxes (approximate) R=INT((P/B)*100) R1=INT((B1/B)*100) R2=INT((B2/B)*100) R3=INT((B3/B)*100) R4=INT((B4/B)*100) -- % of total sales done by each operator R5=INT((B5/B)*100) R6=INT((B6/B)*100) PRINT "ENTER CUSTOMER COUNT (I-VI)" Enter # of customers served by each INPUT L1,L2,L3,L4,L5,L6 operator PRINT L1;L2;L3;L4;L5;L6 K1=K1+L1: K2=K2+L2: K3=K3+L3: K4=K4+L4: K5=K5+L5: K6=K6+L6 K=K1+K2+K3+K4+K5+K6 -- Total customers Ll=INT((K1/K)*100): L2=INT((K2/K)*100): L3=INT((K3/K)*100) % of customers L4=INT((K4/K)*100): L5=INT((K5/K)*100): L6=INT((K6/K)*100) served by each A=INT((B/K)*100)/100 Average $ val. of sale per customer operator. IF K1>0 THEN 6000 A1=0: GOTO 6005 A1=INT((Bl/K1)*100)/100 IF K2>0 THEN 6010 A2=0: GOTO 6015 A2=INT((B2/K2)*100)/100 IF K3>0 THEN 6020 Each operator's average S val. of sale A3=0: GOTO 6025 per customer A3=INT((B3/K3)*100)/100 IF K4>0 THEN 6030 A4=0: GOTO 6035 A4=INT((B4/K4)*100)/100 IF K5>0 THEN 6040 A5=0: GOTO 6045 A5=INT((B5/K5)*100)/100 IF K6>0 THEN 6050 A6=0: GOTO 6055 A6=INT((B6/K6)*100)/100 SET 0=2 Output to expandor printer by parallel port 6200 6300 6400 6500 6600 6700 6800 6800 7000 7100 7200 7300 7400 7450 7500 7600 7700 7800 7820 7830 7840 7900 7950 8000 8100 8200 8300 8400 8500 8600 8700 8710 8715 8716 8720 8721 8722 8725 8726 8727 8730 8731 8732 8735 8736 8737 8740 8741 8742 8745 8750 9000 9100 9200 9300 9400 9500 9550 9600 PRINT " I II III IV V VI TOT" PRINT TAB(1);M1;TAB(8);M2;TAB(17);M3;TAB(28);M4;TAB(38);M5;TAB(46);M6, PRINT TAB(55);M PRINT TAB(1);T1;TAB(8);T2;TAB(17);T3;TAB(28);T4;TAB(38);T5;TAB(46);T6, PRINT TAB(55);T PRINT TAB(1);W1;TAB(8);W2;TAB(17);W3;TAB(28);W4;TAB(38);W5;TAB(46);W6, PRINT TAB(55);W PRINT TAB(1);H1;TAB(8);H2;TAB(17);H3;TAB(28);H4;TAB(38);H5;TAB(46);H6, PRINT TAB(55);H PRINT TAB(1);F1;TAB(8);F2;TAB(17);F3;TAB(28);F4;TAB(38);F5;TAB(46);F6, PRINT TAB(55);F PRINT TAB(1);S1;TAB(8);S2;TAB(17);S3;TAB(28);S4;TAB(38);S5;TAB(46);S6, PRINT TAB(55);S PRINT PRINT TAB(0);B1;TAB(8);B2;TAB(17);B3;TAB(28);B4;TAB(38);B5;TAB(46);B6, PRINT TAB(55);B PRINT "COMMISSIONS" PRINT TAB(0);C1;TAB(8);C2;TAB(17);C3;TAB(28);C4;TAB(38);C5;TAB(46);C6 PRINT " INDIVIDUAL SALARIES INCLUDING COMMISSION." PRINT TAB(0);P1;TAB(8);P2;TAB(17);P3;TAB(28);P4:TAB(38);P5;TAB(46);P6 PRINT " TOTAL PAY INCLUDING TAXES PERCENT OF INCOME" PRINT TAB(30);P,: PRINT TAB(55);R;"%" PRINT "PERCENTAGE OF TOTAL BUSINESS DONE BY EACH OPERATOR." PRINT TAB(0);R1;TAB(8);R2;TAB(17);R3;TAB(28);R4;TAB(38);R5;TAB(46);R6 PRINT " I II III IV V VI " PRINT "PERCENTAGE OF WEEK'S CUSTOMERS SERVED BY EACH OPERATOR." PRINT TAB(0);L1;TAB(8);L2;TAB(17);L3;TAB(28);L4;TAB(38);L5;TAB(46);L6 PRINT "OPERATOR'S AVERAGE SALE PER CUSTOMER" PRINT TAB(0);A1;TAB(8);A2;TAB(17);A3;TAB(28);A4;TAB(38);A5;TAB(46);A6 PRINT "SHOP'S AVERAGE SALE PER CUSTOMER" PRINT TAB(8);A PRINT "OPERATOR'S % OF SALARY TO SALES" IF Bl>0 THEN 8720 V1=0: GOTO 8721 V1=INT(((P1+(.12*P1))/B1)*100): IF B2>0 THEN 8725 Compute each operator's % of salary V2=0: GOTO 8730 paid to sales for week. V2=INT(((P2+(.12*P2))/B2)*100) IF B3>0 THEN 8730 V3=0: GOTO 8731 V3=INT(((P3+(.12*P3))/B3)*100): IF B4>0 THEN 8735 V4=0: GOTO 8736 V4=INT(((P4+(.12*P4))/B4)*100) IF B5>0 THEN 8740 V5=0: GOTO 8741 V5=INT(((P5+(.12*P5))/B5)*100): IF B6>0 THEN 8745 V6=0: GOTO 8750 V6=INT(((P6+(.12*P6))/B6)*100) PRINT TAB(0);V1;TAB(8);V2;TAB(17);V3;TAB(28);V4;TAB(38);V5;TAB(46);V6 PRINT : PRINT : PRINT P9=P9+P R0=INT(((P9/6)*100)+.5) %salaries/sales YTD PRINT "YTD SALES",G PRINT "YTD SALARIES",P9 PRINT "YTD PERCENT OF SALARIES/SALES",RO;"%" SET O=0 END Hammurabi LIST 80 85 90 100 110 210 215 217 218 227 228 229 230 232 235 250 253 270 310 312 320 321 322 323 324 330 331 334 340 341 342 343 344 350 400 410 411 412 420 421 422 430 440 441 442 445 446 447 450 452 453 455 460 470 PRINT "TRY YOUR HAND AT GOVERNING ANCIENT SUMERIA" PRINT "SUCCESSFULLY FOR A 10 YEAR TERM OF OFFICE.": PRINT LET D1=0: LET P1=0 LET Z=0: LET P=95: LET S=2800: LET H=3000: LET E=H-S LET Y=3: LET A=H/Y: LET I=5: LET Q=1 LET D=0 PRINT : PRINT : PRINT "HAMURABI: I BEG TO REPORT TO YOU,": LET Z=Z+1 PRINT "IN YEAR";Z;",";D;" PEOPLE STARVED,";I;" CAME TO THE CITY." LET P=P+I IF Q>0 THEN 230 LET P=INT(P/2) PRINT "A HORRIBLE PLAGUE STRUCK! HALF THE PEOPLE DIED." PRINT "POPULATION IS NOW",P, PRINT "THE CITY NOW OWNS";A;" ACRES." PRINT "YOU HARVESTED";Y;" BUSHELS PER ACRE." PRINT "RATS ATE";E;" BUSHELS." PRINT "YOU NOW HAVE";S;" BUSHELS IN STORE.": PRINT IF Z=11 THEN 860 LET C=INT(10*RND(0)): LET Y=C+17 PRINT "LAND IS TRADING AT";Y;" BUSHELS PER ACRE." PRINT "HOW MANY ACRES DO YOU WISH TO BUY?"; INPUT Q: IF Q<0 THEN 850 IF Y*Q<=S THEN 330 GOSUB 710 GOTO 320 IF Q=0 THEN 340 LET A=A+Q: LET S=S-Y*Q: LET C=0 GOTO 400 PRINT "HOW MANY ACRES DO YOU WISH TO SELL?"; INPUT Q: IF Q<0 THEN 350 IF QC/2 THEN 530 LET E=INT(S/C) LET S=S-E+H GOSUB 800 LET I=INT(C*(20*A+S)/P/100+1) LET C=INT(Q/20) LET D=INT(10*(2*RND(0)-.3)) IF P.45*P THEN 560 LET Pl=((Z-1)*P1+D*100/P)/Z LET P=C: LET D1=D1+D: GOTO 215 PRINT :PRINT "YOU STARVED";D" PEOPLE IN ONE YEAR!!!" PRINT "DUE TO YOUR EXTREME MISMANAGEMENT YOU HAVE NOT ONLY" PRINT "BEEN IMPEACHED AND THROWN OUT OF OFFICE, BUT YOU HAVE" PRINT "ALSO SEEN DECLARED 'NATIONAL FINK!!": GOTO 990 PRINT "HAMURABI, THINK AGAIN. YOU HAVE ONLY" PRINT S;" BUSHELS OF GRAIN. NOW THEN," RETURN PRINT "HAMURABI: THINK AGAIN. YOU OWN ONLY";A;" ACRES. NOW THEN," RETURN LET C=INT(RND(0)*5)+1 RETURN PRINT : PRINT "HAMURABI: I CANNOT DO WHAT YOU WISH." PRINT "GET YOURSELF ANOTHER FLUNKY!!!!" GOTO 880 PRINT "IN YOUR 10 YEAR TERM OF OFFICE,";P1;" PERCENT OF THE" PRINT "POPULATION STARVED PER YEAR ON AVERAGE, I.E., A TOTAL OF" PRINT D1;" PEOPLE DIED!!": LET L=A/P PRINT "YOU STARTED WITH 10 ACRES PER PERSON AND ENDED WITH" PRINT L;" ACRES PER PERSON.": PRINT IF P1>33 THEN 565 IF L<7 THEN 565 IF P1>10 THEN 940 IF L<9 THEN 940 IF P1>3 THEN 960 IF L<10 THEN 960 PRINT "A FANTASTIC PERFORMANCE!!! CHARLEMAGNE, DISRAELI, AND" PRINT "JEFFERSON COMBINED COULD NOT HAVE DONE BETTER!": GOTO 990 PRINT "YOUR HEAVY-HANDED PERFORMANCE SMACKS OF NERO AND IVAN IV." PRINT "THE PEOPLE (REMAINING) FIND YOU AN UNPLEASANT RULER, AND," PRINT "FRANKLY, HATE YOUR GUTS!": GOTO 990 PRINT "YOUR PERFORMANCE COULD HAVE BEEN SOMEWHAT BETTER, BUT" PRINT "REALLY WASN'T BAD AT ALL.";INT(P*.8*RND(0));" PEOPLE WOULD" PRINT "DEARLY LIKE TO SEE YOU ASSASSINATED BUT WE ALL HAVE OUR" PRINT "TRIVIAL PROBLEMS." GOTO 995 PRINT "SO LONG FOR NOW.": PRINT END PRINT %F% RUN TRY YOUR HAND AT GOVERNING ANCIENT SUMERIA SUCCESSFULLY FOR A 10 YEAR TERM OF OFFICE. HAMURABI: I BEG TO REPORT TO YOU. IN YEAR 1, 0 PEOPLE STARVED, 5 CAME TO THE CITY. POPULATION IS NOW 100 THE CITY N0W OWNS 1000 ACRES. YOU HARVESTED 3 BUSHESLS PER ACRE. RATS ATE 200 BUSHELS. YOU NOW HAVE 2000 BUSHELS IN STORE. LAND IS TRADING AT 21 BUSHELS PER ACRE. HOW MANY ACRES DO YOU WISH TO BUY? ?10 HOW MANY BUSHELS DO YOU WISH T0 FEED YOUR PEOPLE? ?2000 HOW MANY ACRES D0 YOU WISH TO PLANT WITH SEED? ? 999 HAMURABI: I BEG TO REPORT TO YOU. IN YEAR 2, 0 PEOPLE STARVED, 3 CAME TO THE CITY. A HORRIBLE PLAGUE STRUCK! HALF THE PEOPLE DIED. POPULATION IS NOW 51 THE CITY NOW OWNS 1010 ACRES. YOU HARVESTED 1 BUSHELS PER ACRE. RATS ATE 45 BUSHELS. YOU NOW HAVE 1045 BUSHELS IN STORE. LAND IS TRADING AT 23 BUSHELS PER ACRE. HOW MANY ACRES DO YOU WISH TO BUY? ?0 HOW MANY ACRES DO YOU WISH TO SELL? ?10 HOW MANY BUSHELS D0 YOU WISH TO FEED YOUR PEOPLE? ?500 HOW MANY ACRES DO YOU WISH TO PLANT WITH SEED? ?1010 HAMURABI: THINK AGAIN. YOU OWN ONLY 1000 ACRES. NOW THEN, HOW MANY ACRES D0 YOU WISH TO PLANT WITH SEED? ?1000 BUT YOU HAVE ONLY 51 PEOPLE TO TEND THE FIELDS. NOW THEN, HOW MANY ACRES D0 YOU WISH TO PLANT WITH SEED? ?500 YOU STARVED 26 PEOPLE IN ONE YEAR!!! DUE TO YOUR EXTREME MISMANAGEMENT YOU HAVE NOT ONLY BEEN IMPEACHED AND THROWN OUT OF OFFICE, BUT YOU HAVE ALSO BEEN DECLARED 'NATIONAL FINK'!! SO LONG FOR NOW. SOL BASIC5 READY Inverse Video in BASIC 5 10 20 30 40 50 55 60 7J 80 90 91 92 93 95 100 110 120 130 135 140 150 160 170 180 190 200 205 210 220 230 240 250 260 270 280 285 290 300 301 302 303 304 305 306 307 310 320 330 335 340 350 355 360 370 400 410 420 REM * SOL VDM DEMONSTRATION PROGRAM REM * THIS PROGRAM WILL DEMONSTRATE REM * HOW TO USE THE ESCAPE SEQUENCES IN REM * THE SOLOS VDM DRIVER. REM * WRITTEN BY TOM DIGATE REM * DECEMBER, 1977 REM REM * INITIALIZE THE MESSAGE DATA TABLE DATA 201,238,246,229,242,244,229,228 DATA 160,214,233,228,229,239 REM * INITIALIZE VDMOUT DRIVER ADDRESS AND REM * SHIFT VARIABLE FOR ESCAPE CODES. V0=49177: V1=256: V2=27: V3=5 DIM J(30) REM * CLEAR SCREEN PRINT "&K": SET S=0 PRINT "This is a demonstration of the capabilities of" PRINT "Sol Basic5 output display formatting." PRINT : PRINT FOR I=1 TO 14: READ J(I): NEXT REM * PRINT INVERTED MESSAGE PRINT "The Sol can print in upper and lower case and" PRINT "can even print "; FOR I=1 TO 14 C=J(I): GOSUB 65010 NEXT I PRINT "." REM * GET CURSOR BACK AT COLUMN 1 PRINT "&[&A&A" PRINT : PRINT : PRINT REM * DEMONSTRATE SPEED CONTROL PRINT "The Sol can even change display"; SET S=10: PRINT " speeds";: SET S=75: PRINT " dynamically!" SET S=0 PRINT : PRINT "Pretty neat, huh!" SET S=15 REM * FINISH UP DEMONSTRATION REM * BY SHOWING SPECIAL CHARACTER SET PRINT : PRINT : PRINT "The Sol also has a special set of limited" PRINT "graphics characters. They are shown below in both" PRINT "regular and inverted video. This gives a Basic programmer" PRINT "very good flexibility when designing display formats." PRINT REM * PRINT SPECIAL CHARACTER SET FOR VDM SET S=0 FOR I=0 TO 31 C=I GOSUB 65010 PRINT " "; NEXT I PRINT : PRINT REM * PRINT SPECIAL CHARACTER SET FOR VDM IN INVERTED VIDEO FOR I=0 TO 31 C=I+128: GOSUB 65010: C=160: GOSUB 65010 NEXT PRINT SET S=18 430 440 450 460 PRINT "This concludes my demonstration of special display" PRINT "features available in BASIC5. Happy computing!!!" PRINT : PRINT : PRINT : SET S=0 END 64998 64999 65000 65001 65003 65004 65005 65006 65010 65020 65025 65030 65040 65050 65060 65070 65080 REM **************************************************** REM * REM * OUTPUT INVERSE VIDEO SUBROUTINE USING SOLOS VDM REM * PASS DECIMAL VALUE OF CHARACTER REM * IN VARIABLE 'C'. NOTE- 'B' IS DESTROYED. REM * REM **************************************************** REM * B=ARG(V2*V1): B=CALL(V0): B=ARG(V3*V1): B=CALL(V0) B=ARG(C*V1): B=CALL(VO): RETURN REM * REM * THE ROUTINE ABOVE USES THE FOLLOWING VARIABLES REM * V0 =ADDRESS OF VDM DRIVER IN SOLOS REM * V1 =256 TO SHIFT CHARACTER INTO B REGISTER REM * V2 =27 FOR ESCAPE CHARACTER REM * V3 =05 FOR ESCAPE CODE TO SEND CHAR. TO SCREEN REM * WITHOUT CHANGING HIGH ORDER BIT. Star Ship, by Brian Marsh, age 6 7100 Johnson Industrial Drive Pleasanton, CA 94566 Bulk Rate U. S. Postage PAID Permit No. 54 Pleasanton, CA 94566
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.2 Linearized : No Page Count : 31 Creator : Microsoft Word Create Date : Tuesday, April 18, 2000 1:57:05 AM Title : access_v2n1.PDF Author : OCR'd and formatted by Jim Battle Producer : Acrobat PDFWriter 3.02 for Windows Subject : Processor Tech Access Vol 2, Num 1EXIF Metadata provided by EXIF.tools