~Hie San Francisco APPLE CORE presents

-fHt 6EST Of vB.0Ui THE DATA BASE YOUR APPLE HAS BEEN WAITING FOR! Available September 1980 48K/ROM APPLESOFT/DISK at the computer store near you.

"HUMAN ENGINEERED" FOR EASE OF DATA PACKING FOR INCREASED USE BY NON PROGRAMMERS DISK CAPACITY • No complex "menu trees" Integers stored in one or 2 bytes, real numbers in 5 bytes • Easy-to-follow prompting Recurring characters and un-used portions of alphanumeric • Formats displayed on screen as you create them fields packed into 2 bytes • Easy . .. Convenient editing for all inputs Special code fields store short codes, but print full descrip­ • 10 data types, including auto-formatting for dates, phone tions on reports numbers, social security numbers • Calculator style right to left input for $ fields POWERFUL REPORT GENERATOR LARGE CAPACITY Up to 100 columns on 1 to 9 lines Up to 24 computed fields—compute with record values, • Up to 100 fields (items) per record constants or other computed fields • Record size to 1020 bytes Up to 5 horizontal subtotals (assign any field to any subtotal) • 1-4f ields in primary keys and grand total • Any number of secondary keys Up to 6 sort and control break fields—column sub totals at • 1 to 9 user formatted screen pages or "masks" per record, control breaks and page breaks and 1 - 24 fields per "mask" Control break or compute on printing and non-printing fields • Special "update masks" for rapid editing Comment lines and fields, auto page numbering and report dating, number formatting, and much more! FAST ISAM FILING SYSTEM Retrieve ANY RECORD from a FULL DISK, IN LESS • Records are sorted by primary and secondary keys AS THAN 3 SECONDS THEY ARE ENTERED Search for records by any combination of range, wild cards, • Three levels of password protection partial strings, and relational, etc. All specifications are preliminary and subject to change. Also Available: r,Aristotle'S c-Apple by Scot Kamins A computerized tutor for ANY subject, at ANY level. by Arthur Wells $34.95 48K/Disk/ Applesoft Finally . . . The Hi-res Baseball that's as good as the Apple! $24.95 32K/Disk Applesoft or Integer ELECTRONIC PRICE'SHEET by Scot Kamins by Bill B udge, creator of Trilogy and Penny A rcade A sales tool for retailers. $100 48K/Disk/Applesoft $29.95 32K/Disk/Applesoft or Integer

by Barney Stone 6y Arthur Wells $39.95 48K/D1SK $19.95 48K/Disk Integer A powerful, easy to use appointment calendar. A 2-player knife fight—rated "R" for violence!

Calif. Res. Add 6% Sales Tax. No COD'S. Add $2.00 for Shipping & Handling. Use Check, Money Order, VISA or MASTERCARD (add Exp.). APPLE 0 is a TM of Apple Computer, Inc. DEALER INQUIRIES INVITED. 1930 Fourth Street, San Rafael, CA 94901<: (415) 454-6500 BEST OF THE 'CIDER PRESS

INTRODUCTION

The SAN FRANCISCO A PPLE C ORE star ted in Airil of 1978 because I couldn't figure out how t o use my Apple II. While the people in the store where I bought my machine weren't ex actl y d isd ainful of my approaches for help, it became c lear fairl y quickl y that they knew very 1i ttl e more than I d id about the beast.

My ba ckground is in the humanities and de cidedly not in the hard sciences. But I did seem t o have a t alent for organizing born out of my work in the various freedom and peace movements of the 60's. "Let's see", I fool ishl y though t. "If I write to a few magazines and contact a store or two, maybe I can get a few guys together once a month to rap..."

Sure, kid .

The Apple Core's membership is now hovering around 800. We have over 400 working programs in the library. There are around six active committees and about a dozen highly active volunteers running things.

There are at least four (count them) meetings per month, including one g eneral, one political/organizational and one b eginners's and one new sletter.

We had two publications - APPLE PEELING f or input and the CIDER PRESS fo r ouput.

Personally, I think things have gotten somewhat out of hand.

Be t hat as it may, the APPLE C ORE had its roots in the concept of mutual aid The idea was for people who did't know much t o get together and share what knowledge they had, and I supposed, that the little pieces of knowing vould mate and reproduce) .

It is to our credit (pat-pat-pat) that the spirit continues. The APPLE C ORE is still a place where beginners can come and get help. But we no w have a fair contingent of heavies who share arcane know ledge i n the dark of the night, too. A bunch of us run computer stores or write contract programs or work at the source itsel f (Gaw-lee!) .

Of course, aside from the above, we have our strange sorts, too.

There's John Scr ibbl emonger , our somewhat competent, crude-but-effective first publications editor. At last report, he had sold his mansion high above Mil pitas and has moved to Three M ile Island.

J. Alfred Glitch needs no introduction - so we'll skip him. There's the nefarious Dr. Qwan W. Min and his counterpart, Professor Schmuch the good , both of whom ca rry out a c lassic good-and-ev il struggle via modems.

Aid, of course, there's the Commodore's Pet DOS, Tige.

I could go on an d on, but HIMEM's being approached.

This edition of the Best of the Cider Press represents our various attempts to pull our computers and our sanity together.

We ho pe you enj oy reading the articles and applying the suggestions as much as we enjo yed devising and writing them. Keep on coding.

SCOT KAMINS - ONE OF THE FOUNDERS OF APPLE CO RE TABLE OF CONTENTS

GENERAL FEATURES PQ. 4-0

HOW TO SELECT A PRINTER 11-14

APPLE DOS ARTICLES 10-17

PRODUCT REVIEWS 19-23

LANGUAGES 26-34

SOUND AND MUSIC 36-37

MODIFICATIONS 30-43

GRAPHIC INFORMATION 46-46

UTILITIES 40-62

APPLE CORE LIBRARY 64-67

CHECKBOOK-DISK V87.4 69-02

CHARTS AND TABLES 03-08

PEEKS, POKES, AND CALLS 09-71 SFj^APPLE CORE

BEST OF APPLE CORE "THE CIDER PRESS" The APPLE CORE OF SAN FRANCISCO is a non-profit SECOND PRINTING 8/80 organization comprised of, and supported by, Apple II Computer owners. The Apple Core is run entirely by volunteer officers and committees. The club endeavors to aid other APPLE owners. All members are individuals STAFF (and their families), and NO shops, stores, or corporations are directly registered. (However, any shop may register an employee c/o that shop). EDITOR/PUBLISHER KEN SILVERMAN

ASSISTANT TO EDITOR KATHY STARK LEROY LARSEN MEETINGS MONTHLY MEETINGS are held at Fort Mason and is ASSISTANT EDITORS PHIL BERNHEIM RANDY FIELDS located in San Francisco at Laguna and Marina Blvd. General meetings start at 10 AM. The GLEN HOAG building is C and the room number is 300. GENE WILSON Meetings are held on the first Saturday of each month. Anyone interested in the Apple Computer is ADVERTISING MARTY COHEN welcome to attend. PETER WEIGLIN CIDER PRESS POLICY CALLIGRAPHY JIM LINHART

All manuscripts, photography, and other materials are GRAPHICS JIM LINHART submitted free and released for publication. They PEGGY HUGHES become the property of the Apple Core and the Cider EMILIE HANCE Press. Authors should clearly mark all material submitted for publication so that credit may be given.

The publishers/editors do not necessarily agree with, nor stand responsible for, opinons expressed or implied 1979 OFFICERS by others than themselves in this publication.

FRED WILKINSON All articles appearing in the CIDER PRESS not PRESIDENT copyrighted by the author may be reprinted so long as proper credit is given to both the Cider Press and the BRUCE TOGNAZZINI author. Proper credit is defined as article title, VICE PRESIDENT author, and the words "Printed from VOL x, NO y of the Cider Press. GOEFF BALDWIN TREASURER Permission to reprint an article may be gained by writing to the author c/o the APPLE CORE.

BILL NEFF SECRETARY ADVERTISER'S INDEX

9 AMREX CAP 1N SOFTWARE 24 18 COMPUTERLAND OF SAN FRANCISCO COMPUTERLAND OF THE CASTRO 15 1980 OFFICERS COMPUTERLAND OF MARIN 58 INFORMATION UNLIMITED SOFTWARE, INC IBC INTERNATIONAL APPLE CORE 53 38 M & R ENTERPRISES SAN FRANCISCO APPLE CORE 53 STONEWARE IFC RANDY FIELDS 10 PRESIDENT SOUTHWESTERN DATA SYSTEMS WYMAN ASSOCIATES 44

KAREN WEISS VICE PRESIDENT

PHIL BERNHEIM TREASURER

BILL NEFF SECRETARY G ENERAL FEATURES

ROM-Read Only Memory. Memory with Starting with the first element of an TERMINOLOGY permanent instructions that cannot be array (the sort shown here is for an erased. array of real numbers but applies to Integer and String arrays as well) the BY KEN 8ILVERMAN S0FTWARE-A11 programs including array is searched to find the smallest systems or applications programs. element (assuming we want to sort into ascending order) and that element is There are a great deal more terms used placed in position 1 of the array. Just as in any other speciality, the by computer persons today. If you Next, we start with element number 2 people involved in data processing wish to know the definition of some and find the smallest element left in equipment have developed their own term, just write to the Cider Press, the array and place it in position terminology. Some of these terms are c/o Ken Silverman, and I will try to number 2. We continue this way with defined in the following list. The answer them for you. positions 3,A,5, etc. until we reach definitions are not rigorous and the the last element in the array. Thus list is far from complete. when we are finished, the smallest element in the array is in position 1, ALPHANUMERIC-Having characters only. the second smallest in position 2, and A CRT that is an alphanumeric CRT APPLE BEEPS so on. displays only characters and cannot draw lines, etc. for graphic The following example shows how to pictures. The characters displayed TRANSLATED sort an array named "D" of dimension are usually those specified by ASCII. "N" (assume that all the elements of BY ANDY HERTZFELD "D" have already been put into the ASCII-Acronym for American Standard array). Code for Information Interchange. 800 FOR I = 1 TO N-1 : REM LOOP FOR ASSEMBLER-Program that translates You may have wondered why the APPLE N-1 TIMES, THE LAST ELEMENT WILL assembly language to machine language. beeps twice when loading a BASIC AUTOMATICALLY BE IN THE RIGHT PLACE. program from tape (once at the 801 FOR J = 1+1 TO N : REM LOOP AND ASSEMBLY LANGUAGE-Symbolic codes beginning, once at the end), but only CHECK THE I'TH ELEMENT WITH ALL representing CPU instructions. once (at the end) when loading a REMAINING ELEMENTS IN THE ARRAY. machine language program. The answer 802 IF D (I D(J) THEN 806 BYTE-A group of 8 bits. Usually one byte is used to represent a character Thus we have a very easy way to find in ASCII code. out the length of a BASIC program without even reading the whole thing -A program to translate from in! Get into the monitor (one way is RAM? higher level language such as Pascal to hit reset) and type 300.301R (you to machine language. can actually use any two adjacent addresses) and start the tape BY TONY HUQHE8 CPU-Central Processing Unit, such as recorder. This will load the length the 6502 in the Apple. of the program into the specified You may have the impression now that memory locations, low-order byte we have an official animal, or pound DOS-. first. Then all you need do is read on the APPLE keyboard with more than those addresses from the monitor and usual force, but in reality, RAM i s an FIRMWARE-Program built into the convert them from hex to decimal - and acronym that means Random Access. system, in ROM or RAM. there you have it!! Memory. The APPLE can hold several thousand letters, numbers, and special HARDWARE-The physical components of characters in its memory and can look the system. at them in any order (i.e. the first one, then the tenth, then the 1024th, HEXIDECIMAL-A numbering system based SORTING etc.), unlike a tape recorder that on powers of 16. must read from the beginning of a tape to the end. I/0-Input/Output of information to or BY ART MACK from the computer. There is another meaning to RAM. It can be erased and written over like a OCTAL-A numbering system based on One of the things that every magnetic tape. Unlike a tape, RAM is powers of 8. programmer has to do eventually is to impermanent; when you turn the APPLE sort some data. Described here is one off, your program goes away. You turn RAM-Random Access Memory that can be way to write a sort routine in BASIC it on again and you have to reload both written on and read from. as follows. your favorite game. 4 turn into a one once in a while. This RAM (CO NT.) has to do with the correct delay time between the two address strobe signals There is another kind of memory, (during the memory access cycle). In called ROM, or Read Only Memory. Like addition the Apple timing doesn't RAM, the APPLE can begin reading its allow long enough precharge or row characters from any point in memory. address hold time for the slow 300ns Unlike RAM, ROM is permanent, like a parts. phonograph record; its characters are engraved at the factory and can never Find out what the manufacturer's be changed. specifications are for the RAM you R&R DEC DUMPS plan to purchase before you buy. Why does the APPLE have both RAM and Write first or deal with suppliers who BY MAX J. NAREF F ROM? Well, any of the hundreds or will specify the speed. thousands of programs we might want to run will fit into the same area of RAM. Just like erasing and reusing a SCREENPAUSE Calculations in Applesoft usually blackboard. But a computer like the result in long multidecimal numbers. APPLE also needs a special program While the accuracy of the numbers is that occasionally takes over to do • VSCOT KAMINS commendable, long mantissas are often some mundane housekeeping task. When not necessary; frequently they are you press Control and G simultaneously disruptive of the three - columns - (on the keyboard) you will hear a It is always a good idea to include via - commas screen format the Apple beep. Now the APPLE isn't complete documentation as to how a provides. electronically wired to produce that program works within the body of a beep, like a doorbell, but must program. Quite often, however, that Following is a simple function for manufacture it by performing dozens of information takes up more than a full reducing post-decimal numbers and for steps within itself. Then you hear screen (i.e., more than 24 lines) to rounding off the residuals (R&R). it. The program that produces beeps, display. Thus the programmer needs as well as others that perform similar some device to allow him/her to stop Of the many functions preprogrammed in functions are all down in ROM the screen from scrolling before the Applesoft, Integer is used to drop the somewhere. user is done reading the information fractional part of a number. The being shown on the screen. One way to excision is sharp and clear. RAM for the APPLE is in the form of an accomplish this goal is the delay electronic component called a chip. loop. All you need to do is insert Y=INT(3.4729): PRINT Y The chip has the size and appearance "FOR STALL=1 TO 2000:NEXT STALL" in of a black, rectangular caterpillar. some appropriate place in the printout Will result in "3". It doesn't round off; it truncates. Thus: A 4k chip will have 4096 pigeonholes, subroutine. each and any of which can hold one bit of information; that bit will either While that method will halt scrolling Z=INT(6.87563): PRINT Z be yes or no, off or on. If the APPLE for a few seconds, it is not the most Yields "6", with everything to the looks at pigeonhole 1234, for example, desirable way to do things. Slow right of the decimal ignored. In it may find the bit there to be set readers will still have trouble order to retain numbers to the right on, but we're still a long way from keeping up, and speed readers will get of the decimal and to "round them finding a number or letter. If we bored. use, for example, 8 bits in tandem, we off", we must define a function can represent up to 256 possible A less primitive method is here-in ourselves. We create this special characters, and in fact this is done. offered, making use of "PEEK (37)" action by means of the DEF(ined) The APPLE will look at pigeonhole 1234 (absolute vertical position of the F(unctio)N command. in 8 chips; the first chip is off at cursor) and "PEEK (-16384)" (read The function reads DEF FNA(X)=INT(X) that location, the second on, and so keyboard strobe). Applesoft users forth. So just like Morse code, we've will note that the "GET" function can where FN indicates function and the spelled out a letter or number be substituted for the following letter can be any alphabetic (actually, a unique character) at that "keyboard-strobe and-clear" peeks and character merely serving to define address. pokes in lines 1030 thru 1050. that particular function at the time of its use. The (X) is the value to be acted upon. So a row of 8 4k chips give the APPLE 0 CALL -936 a memory of 4096 characters. The 10 FOR EXAMPLE = 1 TO 1000 APPLE will hold UD to 3 rows of 4k or 20 PRINT EXAMPLE The following simple program tells the 16k chips, so its memory could be as 30 IF PEEK (37) = 20 THEN G0SUB story: high as 49152 characters. There can 1000: REM THIS CHECKS IF be 12288 characters in ROM. The rest CURSOR I S AT TEXT LINE 20 20 DATA 3.4678,19.2062,11.562,1 is taken up by some electronic 40 NEXT EXAMPLE 41.45917,1000 functions. 50 END 30 Read x 40 IF X=1000 THEN 7 0 50 PRINT X, INT(X) MEMORY CELLS 1000 REM SCREENPAUSE BEGINS HERE 60 GOTO 30 1010 VTAB 23: TAB 1 5: REM FORMATS 70 END THE SCREEN FOR THE PROMPTER PRINTOUT NOTE THAT THE STANDARD INTEGER 1020 PRINT "PRESS ANY KEY TO CONTINUE" FUNCTION, INT(X), DROPS THE DECIMALS. The 16K dynamic RAM, used in your 1030 Z=PEEK (-16384): REM CHECKS TO NOW ADD - Apple, is getting cheaper all the SEE I F ANY KEY HAS BEEN PRESSED time. In fact some mail order houses 1040 POKE -16368,0: REM RESETS THE 5 DEF F NA(X)=INT(X*100 +.5)/100 are advertising 16K bytes (8 units) as KEYBOARD "CHECKER" low as $65. 1050 IF Z>127 THEN 1070: REM IF A KEY AND REWRITE LINE 50 TO REA D HAS BEEN PRESSED THEN GOTO 1 070 Installing your own RAM is not a 1060 GOTO 1 030: REM KEEP CHECKING 50 PRINT X, INT(X), FNA (X) problem; it is all explained on pages 1070 CALL -936: REM CLE AR THE SCREEN 133 - 135 of your red manual. However 1080 RETURN: REM GO PUT MORE Note how the DEF FNA(X) limits the there can be a potential problem to INFORMATION ON THE SCREEN post-decimal numbers to two and the purchaser of these chips, i.e. "rounds them off". The latter is due speed. After talking to the Engineers to the addition of .5, which increases at Apple Computer I was told that by 1 those decimal numbers .5 or more; 200ns chips exceed Apple's anything less is not propelled over specifications, 250ns are the standard the carry-over cliff. When dealing speed and that 300ns or slower chips with several variables (X,Y,Z), just should not be used. It seems when plug them between the parentheses. 300ns or slower are used a zero will 6 100 D=LEN (A$):L=L+1:C(L)=D There, now that wasn't difficult to 120 FOR K=1 TO D ALGORHYTHMS understand, now was it (Hey, Scot, 130 A(K)=ASC

FORMAT is a simple, easy to u se word proce ssor, designed with the beginner in mind. Featuring:

LINE ORIENTED EDITOR GLOBAL SEARCH AND REPLACE The routine works by replacing the FILE SORTING CAPABILITY address of the MONITOR get-a-character UP TO 132 CHARACTER PRINT WIDTH routine with its own address (the address goes into hex location SINGLE PAGE OR CO NTINUOUS FORMS OPTION $38-$39). users should MULTIPLE COPY OP TION beware, though, since the DOS will put AUTO PRINTER SE LECT its own address into this location. USES NO APPLE" CONTROL CHARACTERS It will also overlay that part of memory where our keytone routine resides. If you want to relocate it, you can put it anywhere you want as FORMAT supports standard features found on word processors long as the last two bytes point to costing up to 10 times as much. The best buy in word processing your load address + 11 bytes. It will for the APPLE® . (Requires m inimum 20k and 3,2 DOS.) even work with DOS if you load it before you load DOS.

Only $20.00 (Virginia residents add 4% sales tax) AMREX Box 754 Vienna VA 22180 a t>e °°®v \\ cO°

so^e l°l(VoW

«tsp°' cow noQ( Vt& o«® 1 (o\\- s/e^ sc' ro1 d os' e os®' t> e „nC^°*' v8° *lde^ 0

se ,e ^ o< cO ' rtjlxos^'-d rn° xovJe' „lc.OP""\,~n oo<5 o^° ^ ed^c \oQ-^ X&A r eosv j' ^es O*

Z^rZ>«&*r,i

ro'\Oe' £%0' oe ,\\\oQ eS W ^no\ sc^o ( \e^ :"^rV\oo d\-^eC **£$£

to* s Resde^ ROW\ CO'

0\S^

_ tne corresponcJent So^et TCkpttei^

WRITE OR CALL FOR MORE INFORMATION:

P.O. BOX 582-S • SANTEE, OA 92071 • 714/562-3670 PERMISSION TO REPRINT MUS T BE OBTAI NED FROM TALLY CORPORATION HOW TO SELECT THE PRINTER YOU NEED.

CHOOSING A PRINTER LINE vs. SERIAL Picking the printer best suited to your appl ication is easier once The choice between selecting a line printer or a serial printer you isolate the basics. This report will tell you what type of generally pivots around speed needs and purchase price. printers are available, how they differ from one another, and Serial printers, which produce one character at a time, are how to evaluate their value in terms of cost to you. typically less expensive than line printers, which produce an Since they represent the most popular and fastest growing entire line of text at a time. Some of the better-constructed segment of the printer market, our discussion will be limited to serial printers can comfortably print up to 160 characters per low- to medium-speed printers. They encompass those second (about 100 lines per minute) while line printer speeds applications using minicomputers and microcomputers, can attain whatever range one is willing to pay for. process control, small business systems, data acquisition, data However, with the recent advent of the microprocessor, entry and data communications. Printing speeds can range serial printers are achieving increased throughput efficiencies. from 15 characters per second (8 lines per minute) up to An example is "optimized bi-directional" printing, whereby the 600 lines per minute. print head moves left to right or right to left, thus eliminating the wasted time of carriage returns. This technique also "searches" WHAT SPEED DO YOU NEED? for the shortest path to pick up the closest character on the next The proper printer speed can be influenced by factors such print line. A printer equipped with optimized bi-directional as the average amount of data to be printed, available system printing can typically double or triple throughput. It's an time or the minimization of communications line charges. important bonus to look for. For continuous output, a rule of thumb technique for determining speed needs is multiplying the number of forms MATRIX vs. FORMED CHARACTER required each day by the average number of lines per form. The Another major distinction between printer types is shaped total is the number of lines to be printed per day. Hence, the characters vs. matrix image formation. The shaped character number of printed lines required per day divided by printer (such as found on the office typewriter) is contained on print speed equals the number of minutes per day of actual printing. mechanism devices such as drums, chains, belts, bands, daisy The above is greatly simplified because it doesn't account for wheels or type balls. However, there is the drawback of higher line length, carriage return time factors, slew speed in skipping purchase price and mechanical complexity. The latter has a over blank space, etc. Finer calculations need to be equated bearing on maintenance costs and the probability of downtime. for each given situation. Matrix printers form a character from an array of closely spaced dots. The foremost advantage of matrix printers is PRICE vs. PERFORMANCE mechanical simplicity which translates into a low-cost device While it is typically true that the lower the speed the less ex­ capable of highly reliable operation. Good matrix printers pensive the machine, this simplistic approach can lead to produce characters that achieve a formed character look. Also downstream headaches. To save money, a user with a heavy print quality is more consistent from matrix printers because workload often buys a printer designed for light duty. While the alignment seldom wavers and character density is uniform. printer may produce the desired output, it does so at the ex­ Formed characters have atend ency to get out of alignm ent and pense of being overworked. The cost of replacing prematurely character density can vary. (The user should pay particular worn out parts soon offsets any initial savings. Plus, the lost heed to the quality of printed output when comparing time of downtime can be even more costly. matrix printers.) So, in addition to rated speed, the astute printer purchaser Another advantage of matrix printers is the ability to obtain looks at duty cycle limitations, MTBF specifications, main­ different type styles—condensed, expanded, double width, tenance requirements, and, most importantly, the mechanical upper/lower case, negative print, OCR, bar code—from a structure of the machine. Always remember, with mechanical single mechanical system. Because the matrix array is devices, simplicity is a forerunner of reliability. Inherent design contained in aRea d-Only-Memory (ROM), asim ple electronics simplicity and a minimum number of stress and wear points swap changes the type face or even the language, e.g., means a superior mechanical system. There is more to printer cost than initial purchase price. The 130 total cost of all expenses over the life of the printer must be factored. Often, the printer with the lowest purchase price ends up being the most expensive buy. In the price performance category, the purchaser should also 110 look to seewhat basic features are standard and what features are "options)' and hence, add-on costs. THE PITFALLS OF SPEED RATINGS While manufacturers quote serial printer speeds in characters IV 90 per second and line printer speeds in lines per minute, the z -J 80 figures can often be misleading. Some specs don't account for tc. the length of a printed line or the number of control characters LU 70 in a stream of text. Hence, speed ratings are given for full lines, (/) or only partial lines, or for 64-character sets or 48-character cc p 60 I sets. To properly assess the true speed of a printer, ask the 0 manufacturer or vendor for athr oughput curve as shown here. < 5 50 I IMPACT vs. NONIMPACT 1 Simply stated, an impact printer transfers ink to the paper ° 40 / forcefully by a hammer assembly such as the common office typewriter. Non-impact printers use sensitized papers that 30 / respond to thermal or electrostatic stimuli to form an image. Hence, the basic advantage of impact printers is multiple 20 / copies using low-cost, standard paper and inked ribbons. The advantage of non-impact printers is quiet operation, and,ofte n, 10 speed. However, they produce only single-page output, and the special paper can be expensive (2 to 3 times the cost of standard paper) and not readily available. Also, use of o o in m pre-printed forms is impractical. C\J i- Since most data processing applications require multiple LINES PER MINUTE copies, and cheap copies, the remainder of the discussion will TALLY 1612 THROUGHPUT deal only with impact printers. 160 cps bi-directional printer 1 1 PRINT MECHANISM TYPES HORIZONTAL MATRIX PRINTING The heart of a printer is the print mechanism which imparts the NEEDLE ACTUATORS character image to the paper. A thoughtful examination of ^MATRIX NEEDLES impact technique is important from the standpoint of long-term ' PAPER reliability and consistent print quality. DRUM PRINTER (fig. 2) A complete set of formed characters is embossed around the circumference of a cylindrical drum. The drum rotates at a constant speed and a hammer, located at each print position, strikes the desired character at each print position each time the drum rotates on its axis. As is readily apparent, timing is critical to maintain print MOVING MATRIX HEAD- quality. As such, there is the need for periodic hammer flight Figure 4 Figure 5 time adjustments. Other disadvantages include a limited choice of character fonts and the constant possibility of COMB MATRIX PRINTER (fig. 6) vertical misregistration of characters. A unique variation of matrix printing, the print combte chnique, On the plus side, operation is generally reliable, print speeds prints a line of data at a time rather than a character at a time from 300 to 2000 lines per minute can be achieved, and as as is common with most matrix printers. A single piece print such, drum printers offer a good cost/performance ratio for comb has 132 fingers, each with a steel ball impact face. Each higher duty cycle applications. finger corresponds to a character position, thus there is a CHAIN OR TRAIN PRINTER (fig. 3) hammer for each print position. Character slugs move horizontally past hammers located at Each finger is pulled back by its own electromagnet and each print position. The characters pass each hammer in then released forward to create a dot. A slight horizontal sequence. In chain printers, the slugs are not connected and movement of the comb locates the adjacent dot position and they push themselves around the track. With both methods, the finger is released again. This is repeated until one dot row several complete character sets revolve past the hammer is completed. The paper advances vertically to the next dot positions at acon stant speed. The hammer is fired at the precise row and the process is repeated until the complete line has instant that the character to be printed moves into position. been printed. Again, hammer and electronic adjustments are critical and This technique can achieve reliable printing speedsupto300 require periodic maintenance. Reliability is apr oblem because lines per minute. Print quality is very good, approximating wear in the tracks is common. However, for higher speeds, up formed character output. Because the print mechanism never to 2000 lines per minute, these printers do the job. works very hard, and mechanical movement is slight, machine reliability is unmatched. Preventive maintenance is un­ DRUM PRINT MECHANISM necessary. There are no lubrication or adjustment require­ 64 CHARACTERS AROUND ments nor duty cycle limitations. The comb matrix hammer PER I METER OF DRUM has proven to be the most reliable mechanism available. CHARACTERS ACROSS DRUM

PAPER FEED .. III. ELECTROMAGNET HORIZONTAL COMB . PAPER MOVEMENT PRINT COMBK RIBBON\ r

Figure 2 Figure 3

BAND AND BELT PRINTER (fig. 4) These are typically tractor-type devices with character slugs, or steel or plastic belts with raised characters that are struck Figure 6 by the hammers as the desired character comes into position.

The disadvantages of this technique are belt and drive wear, HELIX MATRIX PRINTER (fig. 7) .. . o|iy poor print quality from some designs, and the entire belt or Another matrix technique employed in a line printer,tne ne band must be replaced when individual characters wear out. printing method, has a helical print mechanism with a xn The advantages include easily-interchangeable type bands edge spiral on its periphery. As the helix rotates by eacn for different character fonts, good print quality with some acter print position, hammers fire at appropriate posimo models, and reasonable reliability. Speeds range from 30 the dots, and the required character is completed during characters per second up to 2000 lines per minute. rotation of the helix. . .. lJD n SERIAL MATRIX PRINTER (fig. 5) The advantage of this technique is high speed P ™'S;n les A character is formed by apa ttern of closely spaced dots. Array to 500 lines per minute, but at prices appreciably ~. patterns for a single character can be 5 X 7, 7 X 7, 7 X 9,9 x 7, drum or chain printers. Print quality is good andmacn 9 X 9,7 X 10 or9 X 12. The print head, which sweeps across the reliability is good because of a minimum of moving pa page, consists of a vertical column of needle-like hammers which are selectively fired to produce any given character. Type fonts arestor ed in ROM or PROM memory and thus many different character sets, including foreign languages, can be generated with the same print head. The disadvantage of matrix printers can be poor print quality if a sparse dot matrix pattern is used and print head reliability problems if duty cycles are higher than intended for the machine. The big advantages of serial matrix printers are low cost and the simplicity of itsdesign. And some matrix printers have such fine resolution that the printout appears to have been printed by a formed character printer. Speeds can range from 30 to over 200 characters per second.

Figure 7 1 2 IS RELIABILITY IMPORTANT? characteristics. With both types, look for a good design that Even after deciding on the type of printing method best for the minimizes moving parts and maximizes ribbon life. Because application, the user will be faced with competing manufac­ ribbon replacement costs can become a big expense factor turers offering, on the surface, like machines. But careful over the ifeI of a printe r, it should be considered in with the total analysis can soon determine the best value. Rather than being cost of ownership. swayed by purchase price, the important consideration is total IMPLEMENTATION COSTS cost of ownership. An often-overlooked factor in printer price evaluation is the THE REAL COST OF OWNERSHIP cost of implementation; namely, the manufacturer's ability to User cost goes beyond the initial purchase order. Total cost service the product, provide the needed documentation to must include cost of supplies, maintenance, service calls and integrate the printer into the system, and in general, solve any spare parts over the expected life of the machine. And the problems that arise. The chart below is a good checklist to immeasurable cost of downtime! When these factors are refer to in making an evaluation of a printer vendor. (Fig. 8) added up, often the machine with the higher initial price proves THE VALUE OF VERSATILITY to be the lowest cost in the long run. Whether approached from the standpoint of cost or the stand­ Three basic factors can be evaluated toward determining point of operator convenience, the standard features offered the real cost of ownership—inherent machine reliability, by a printer are important parameters. Also, be sure to periodic maintenance requirements, and the consumption of determine if any given feature is included in the standard price expendables such as paper and ribbon. of the machine or if it is an additional cost option. A check-list BASIC RELIABILITY (Fig. 9) comparison of printers can assist the evaluation. Complexity means cost. Even with today's advanced The true measure of machine features is the degree to which electronics, some printers still have elaborate mechanical they enhance the ease and efficiency of operation. Here are works. Remember, any part eliminated through good design is some considerations. one less part to fail. Therefore, look for mechanical simplicity that requires a minimum of, or no routine adjustments, a minimum of, or no lubrication procedures, and no special TOTAL COST OF OWNERSHIP tools for normal service. Purchase cost Mechanical assemblies should be modular in design for Operating cost easy and quick replacement. Look out for extensive use of paper clutches and brakes, asthe se are high failure-rate components. ribbon While evaluating the reliability of printer electronics can be difficult, there are some things to look for that indicate sound Cost of in tegration design. Microprogramming eliminates many potential circuit controller/interface purchase or manufacture failures by greatly reducing the number of electronic components. Modularity indicates good design. Few boards checkout that are easily replaceable normally indicate quick solutions programming to problems. Electronic adjustments by the operator should Support cost spares never be required. ± In summary, the critical reliability components of any printer manuals are the hammer assembly, the paper feed system, the ribbon training system, and the printed circuit boards or electronics. Each warranty should be examined with simplicity and soundness ot refurbishment preventive maintenance design in mind. corrective maintenance PERIODIC MAINTENANCE The requirement for and extent of periodic maintenance is Other cost tied directly to the electro-mechanical design of the printer impact on existing inventory The simplerthe design, the higherthe expectation of reliability. spares In an inherently simple electro-mechanical system, a minimum training amount of maintenance will be required. Or no maintenance Total cost whatsoever! At today's prices, a field service call can typically cost about $100 plus parts. With these prices escalating yearly, main­ Figure 8 tenance can become the greatest portion of ownership cost if reliability is poor. FEATURE CHECKLIST EXPENDABLE CONSUMPTION The major expendable supplies a printer goes through are Speed paper and ribbons. Look for a printer that can easily handle Technology standard forms of varying widths, and for multiple copy require­ (impact, non-impact, matrix/formed characters) ments, make sure the last carbon is clearly legible. If pre- Copies pri nted forms are utiIized, make sure the pri nter has the needed Forms size forms controls so printing conforms to the allocated space. Additionally, printers are available that offer special forms VFU handl i ng capabiI ity to cut the pri nted form to the desi red length Self-test/diagnostics or size and minimize paper wastage. Acoustic noise When you realize that, with typical usage, more money is Size and weight spent on paperthanwasoriginally expended on the printer, it's easy to see that paper cost is a big item. Environment Standard line spacing for most printers is 6 lines to the inch. ESD Some printers, for paper economy applications, have an 8 line (electro-static discharge immunity) per inch spacing option. For high volume runs, savings can be Interface significant. In addition, some of the better matrix printers can Flexibility alternate their character pitch to achieve 10, 12, 14 or 16.5 character per inch spacing. As an example of paper savings, MTBF 132 columns of data can be printed on 80 column width paper MTTR using 16.5 cpi spacing. Character sets Ribbon replacement can become expensive if animp ractical ribbon system is employed. For economy, a reel-to-reel system with a reusable fabric ribbon offers longer life. Many printers Figure 9 offer cassette-type cartridges that feature easy-loading

1 3 INTERFACE CAPABILITY OPERATOR CONVENIENCES The interface aspect of a printer purchase can be an expense From the operator's standpoint, the acceptance of a printer and technical headache if the machine is not equipped for generally depends on whether the manufacturer originally compatibility within the system it will live. While it seems most designed the machine with the operator in mind. printers are offered with an RS-232 compatible port, if the The primary operator function is paper loading. Loading system requirement calls for something else, the user should should be easy and fast without awkward fumbling. The more determine up front if the machine can be adapted to his accessible the paper path, the better. Tractor face plates (for interface needs and at what expense. Many manufacturers pinfeed paper) should be exposed and the tractor teeth clearly offer standard controller packages to allow plug-in visible. Tractors should be easily adjustable to accommodate compatibility with the host system. various width forms. NUMBER OF CHARACTER SETS Ribbon changing should likewise be easy and fast— Numerous applications can make use of different character and clean. sets. With matrix printers, since character generation codes Control indicators should be conveniently, and safely, are contained on printed circuit cards, more than a single located for operator accessibility. They should be clearly character set is at the user's disposal. The user can even labelled and logically organized. configure special custom characters. And of course, foreign Some of the more sophisticated printers offer status check languages are easily accommodated. panels that register the fault condition if the printer stops Another advantage of the matrix printer is that the sizes of operating. This allows the operator to initiate corrective action characters and interline spacing can be varied. Condensed in a timely manner. Often these panels differentiate between printing at 16.5 characters per inch, as opposed to het standard operator correctable faults and those that require a service 10 characters per inch, can save paper. Or, double-width technician. printing, where a character is printed twice as wide as normal, An important consideration to the operator, or anyone in allows certain portions of text to emphatically stand out. close proximity to a printer, is noise level. While most manufacturers publish a decibel level for their machines, the FORMS CONTROL FEATURES usershouldfind out under what conditions the testswere made, Since most print-out follows a set format, the types of forms i.e., where was the sound measured, what kind of printout control available must be considered. While most printers have pattern was being used. Any slight variation in any of these the same standard offerings, lower-priced units may take conditions can have a significant impact on the test results. shortcuts by eliminating some necessary features. Another convenience consideration is whether the printer Any printer should have provisions for initially aligning is avai lable as ade sk-top unit or requires astand. Some printers the top of form and left-hand margin for pre-printed forms. are interchangeable, i.e.. the unit can be used in either From this point, there are a number of forms length control situation. Also, determine if paper-stackers, both supply and offerings. Typically, vertical format (called the VFU) can be take-up, are available or can be easily accommodated. controlled via a 66/88 line count program, a forms length selector switch, and 8 or 12 channel punched paper tape loop PRINT QUALITY program, or an electronic VFU loaded through the I/O. The best One of the most important factors in choosing a printer is print method depends upon user requirements—but the more quality. While no standards exist as to what constitutes good sophisticated the VFU, the higher the price. print qual ity, the eye of the beholder can easily pass judgement. For consistent print quality, especially if alternating between The expectation should be clear, crisp and concisech aracters. different thickness layers of multi-part forms, look for a forms In formed-character printers, the pitfalls to look for are thickness control. Also, a paper-out alarm should be standard. horizontal or vertical misregistration, tipped characters, ghosti ng or smearing, cli ppi ng off of ascenders orde scenders, For users that require very specialized forms handling capa­ voids or variations in character density. bility, printers are available that can be customized to perform The critical examination of matrix printing should be very specific tasks such as printing airline ticket passbooks, concentrated on the dot spacing. Good matrix print quality has printing entries in bank passbooks and simultaneously record­ the individual dots appearing to overlap to give the impression ing the transaction on aper manent journal, printing and cutting of a formed character. An inherent benefit of matrix printing tiny tickets and labels, or even printing two different forms is that character density is always uniform because the force simultaneously. Additionally, automatic front feed attachments required to print a dot is always uniform. Conversely, in a to standard printers enable efficient control and printing of formed character printer, a design compromise exists in order individual cut forms such as ledger cards or invoices. to legibly imprint a large land area character such as a"W" yet not perforate the paper with a character such as a period. Also, a natural benefit of the uniform printing characteristic of matrix technology is better carbon copies from a legibility and consistency standpoint. In matrix printers, there should be no excuse for any poor character registration. A sound mechanical design literally locks the needles or hammers into an alignmen t position so the result is straight line registration, vertical and horizontal, that never wavers. If alignment problems occur, it indicates a faulty paper movement mechanism. Before selecting aprinter , make sure you carefully review print samples. TALLY

WORLDWIDE

This report is furnished compliments ot Tally Corporation, 8301 South 180th St., Kent, IMA. 98031.(206) 251-5500. Additional copies can be obtained by writing to the above address.

Tally Corporation is a member of the MANNESMANN Group. 1 4 So You Bought Your Computer From Somebody Else . . .

Business and math and education and such. Do we have lots of programs? . . .these are the We'd say very programs that go much . . . on the disks that slip into the drives that connect to your Apple.

To err is human. • Besides, that W was the past, this is the present, and we want to connect with your future. Sooner or later, you're going to want food for your Apple. When that time comes, have we got the goodies for you! We have add-ons like you . . . this is a printer wouldn't believe: software that just doesn't quit; to output your programs and list books, magazines, Apple-users' publications and your HEXs. tutorials. We also have coffee, a comfortable . . . these are the Centronics and environment and the time-of-day. All of this diskettes that go in Trendcom (and your drive. We sell others from Texas). has been personably selected and tested by our staff of Apple specialists. Want these and the storage binders to details? Check out the flow chart on keep them in . . . this page. Then stop in and we'll forgive you for buying your Apple at That Other Place.

This is the Apple you may have . . . this is the disc bought elsewhere. drive that connects We'll get you up on to your Apple. a floating point We've got these, ROM card, or get too,and . . . you started in Pascal.. .

ComputerLand 2272 Market Street San Francisco, CA 94114 of the Castro (415)864-8080 APPLE DOS WHAT'S DOS 3.1 OR3.2? FP DISK TRACE

Congratulations on your new disk BY ALLEN JOHNSON drive. Playing with programs and data • Y8CO T KAMIN8 will be quicker and easier, but there are some things you should know before Hi there, you say your feeling blue you start. For example, D.O.S. because you Just updated your disks to Handy hint for the month comes from 3.2 and now they don't run right. Not our esteemed VP, Bruce Tognazzini, and The DOS (Disk Operating System) is only that but now you can't remember has to do with the elusive "Tracing an what it sounds like. There are many which is 3.1 and 3.2? My friend Bob Applesoft Program with Disk Booted" steps in getting data from and to the Burns and I sat down and came up with problem. diskette's magnetic recording a nifty little program that tells you surfaces, and the DOS h as them in its which is which. The solution: D$=CHR$(13) + CHR$(*) innards somewhere in machine code. >LIST But it performs another function, that which is the same thing as having D$ of control. 10 TEXT : CALL -936 equal a carriage return (CTRL M) 20 X=PEEK (1002) concatenated with good friend CTRL D A tape-oriented system has a limited 30 VTAB 5: TAB 12: IF X=32 THEN of disk command fame. set of commands — not much you can do PRINT "DOS VER 3.1" with a cassette recorder; a disk drive 40 VTAB 5: TAB 12: IF X=76 THEN I haven't the faintest idea how i t has many, many more. The commands to PRINT "DOS VER 3.2": VTAB 20: END works, and B.T. ain't talkin'; but it control the disk will be read by the does, indeed, work. One is cautioned, DOS, and control passed to the however, to return D$ to equal only appropriate set of machine codes. VOL MISMATCH CTRL D after debugging is completed, When we load a named program, the DOS however, lest odd and unpredictable has to first go to a part of the disk events ensue. containing program names and corresponding locations to find our MATCHED program. Then it goes to each sector on which the program is located, picks BY ANDY HERTZFELD up each byte on each sector, and puts it into the Apple's memory. NOTE: THIS ARTICLE APPLIED TO DOS 3.1 Let's say something about floppy AND PROBLEM DOES NOT OCCUR WITH DOS 3.2 BUT HAS SOME INTERESTING DOS DOS NOTE diskettes at this point. They are INFORMATION surfaced on both sides with magnetic material, Just like magnetic tape. BY SCOT KAMINS If you are running your APPLE with a The disk drive normally uses Just one disk, by now you have probably side, since the manufacturer puts his encountered the problem of'VOLUME best side on top. The diskette will MISMATCH ERROR" messages. Here's a rotate inside the drive while the The DOS will accept a colon (:) from a solution to this problem produced by recording head is held stationary. It Textfile written by an Integer BASIC Andy Hertzfeld's exploration into the looks like a magnetic phonograph program without acting upon it. But DOS. record. Instead of one continuous it treats it as a statement delimiter groove, the recording head will be in Applesoft, ignoring everything else Every diskette has a volume number moved in and out to record data in 35 that comes after it in a record. from 1 to 254 associated with it. It concentric circles, called tracks. is assigned when the diskette is The data does not completely fill a Thus you can say "THIS IS IT: THE BIG initialized and there is currently no track but is placed;in 13 sections, ONE" in a Textfile read from an called sectors, with 256 data bytes easy way to change it. The volume Integer program. Read from Applesoft, number of the current disk is stored per diskette. So, 35 tracks * 13 the program says "THIS IS IT" with an at $B7F6. Before most DOS commands sectors * 256 bytes per sector = error message. are executed the system checks to see 116480 bytes per diskette. Silly, isn't it? if a "volume mismatch" error is Introducing commands to control the generated. While this "feature" may 1. Larry Fish from Los Altos Hills, disk drive posed a problem; what is be nice for large business CA, points out that, rather than applications that don't want dumb going to read these commands and typing "V0" for the wild card to avoid execute them? Other computers feature operators inserting the wrong disks, disk mismatches, a simple "V" will do. special versions of BASIC with more it is very annoying to most average Every stroke counts... commands and higher memory users. It is most difficult when you requirements. The Apple, however, want to transfer a number of programs 2. Assuming that your "HELLO" program executes disk commands differently. between two disks with different contains a "CATALOG" command, you can All data that is to be printed will volume numbers. add some text in a string statement to first pass through the DOS for its appear after the catalog listing. An examination. It will intercept its After much searching I located the example follows. own commands and execute them, but not place where the volume check is pass them on to the Apple. The DOS performed and devised a patch to 3. Incorporating Arthur Wells' "N" commands can then work with any other disable it. It's only two bytes long; title, the following routine will do program product, such as Applesoft, Just enter the monitor and type: nicely for a HELLO program: Integer BASIC, the moniter, anything "BDFE: A9 00". This will disable all that prints. volume checking until the next 0 D$ = " REM CTRL D bootstrap. It works by replacing the 10 POKE -16298,0: REM CLEAR HIRES. The DOS is normally kept on disk and comparison instruction which performs 20 TEXT : REM CLEAR GRAPHICS, RESET loaded whenever you enter PR# in BASIC the volume check with a "LDA #00" SCROLLING WINDOWS. or Control P in the monitor. What instruction which sets the "equality" 30 CALL -936: REM CLEAR SCREEN. happens is that a program on the ROM or Z flag, effectively forcing the 40 PRINT D$;"CATALOG" Card is executed that takes the DOS match to succeed. 50 PRINT "TO RUN A PROGRAM, COPY THE off of disk and loads it into memory. TITLE" Say your disk controller is in Slot 7. Note that the addresses given here are 60 PRINT "EXACTLY AS IT APPEARS Then if you get into Monitor by a only true for a 48k system. If you ABOVE": REM ILLUSTRATES #2,ABOVE. 'CALL -151' and then execute the ROM have a 32k system, read "77F6" for 70 END program at C700 by 'C700G', you will B7F6" and "7DFE" for "BDFE". In boot the DOS. It will be placed into general, if your system has memory the highest location in your Apple's size X, subtract (SC000 - X) from the memory. Himem will be reset. given addresses. , e DEVICE CHARACTERISTICS TABLE

This table describes the DISK II to NAME GAME RWTS the DOS. The information will always be the same if the current disk drive from APPLE is used. The table •Y ANDY HERTZFE LD BY TONY HUGHES contains the following: 00 01 EF D8.

Good Luck.... Some people might wish to alter the New information has come out about names of some of the DOS commands to accessing data on the disk directly. suit their own personal tastes (it is, The DISK II has its data recorded on after all, a ). For 35 tracks (think of a A track cassette example, I know many folks would like or an 8 track cartridge) arranged as IN 9 EASY STEPS to abbreviate the "CATALOG" command to concentric circles around the center a simple "C". This is surprisingly hole. Each of these tracks is divided easy to do. into 13 sectors, of 256 bytes each. DISK-BASED PGM Using the following method, you can Since the DOS lives in RAM the read from or write to an individual contents of its command table are sector on any track. BY PAUL WYMAN easily changed. The command table is located from $A7E0 - $A863. Each First, you must build a table or two command name is represented as an in memory to specify the parameters of Listen my friends, to a little fable ASCII string with the high bits off, your call to the DOS. It will about a certain nameless prince, who except for the last character of the contain: once upon a time shared a wonderful string, which has its high order bit and magical little program with his set. The strings are associated with POSITION CONTENTS friends. Each day they learned a the commands by their position in the little bit more about how to use the command table (the first string 01 Must be 01. program, finding more and more magic corresponds to the INIT command, the 02 Slot number, times 16. all the time. , It seemed that the second to the LOAD command, etc). 03 Drive number. program was not so little after all, OA Vol. number to be found. and that it could practically do Thus you can dream up your own names Make it 00. everything for everybody. Finally it for the commands by storing new 05 Track number that the sector is became obvious that the equally strings in the command table. For on. Must be 00-3A nameless program did have a example; to change the name of the 06 Sector number. Must be 00-12. limitation. It was only capable of INIT command to DNEW you would enter 07-08 Low and high order addresses storing its output on the monitor and type "A7E0: AA AE A5 of device characteristics table instead of disk. The ability to save D7". However, some caution is (see below). and load the results of the nameless required when you change the length of 09-10 Location of data. Where DOS program to and from disk was a feature a command name; in general you will will get it or put it. devoutly to be wished. Finally a way probably have to rewrite the entire 11-12 Amount of data to be processed. was discovered, and albeit crude, was command table to achieve the desired Should be 255. in fact an answer to the problem. 13 Command codes. They are: effect. 00 - Position the head The technique works like this: once 01 - Read a sector you have used the program to create It is hard to use the input and output 02 - Write a sector the results you want to save drop into "hooks" in conjunction with the DOS OA - Format a disk the monitor and display locations since you cannot simply change the 1A Error code returned by DOS if 7A.77(Hex). Before your very eyes hooks as they are the only way the DOS operation failed. will appear two copies of the pointer interacts with the rest of the system. 10 - the diskette was write to the "end" of your results. The Also, if you only change one of them, protected pointer to the "beginning" lies in the DOS has the nasty habit of 20 - the volume number was 70/71 and will be "00 20" or $2000 changing it back. Fortunately, the incorrect make note of the 'end' pointer, and DOS has its own internal hooks it uses AO - the drive had a perform the following steps: for keyboard input and video output. problem Its output hook is at $A996 - $A997 80 - the data was bad (1.) Reboot DOS and the input hook immediately follows 15 Volume number actually found is (2.) BSAVE R ESULT.7A: LLHH, A$2000, at $A998 - $A999. If you change the placed here contents of these addresses instead of L$LENG 16 Previous slot number, times 16, the usual hooks at $36 - $39, from last access of the disk, In (2) above, RESULT should be a everything should work out just fine. found. Low and high addresses. descriptive name for your purposes. For example, lets say you wanted to divert output to a line printer 17 Previous drive number from Next save the actual low (LL) and high without disabling the DOS. If the last access of the disk. (HH) byte values from 7A.75 into the 18 Previous slot number from line printer output routine is located name of the file, so you won't forget last access of the disk. at $300, all you would have to do is the end pointer. You now have a enter the moniter and type "A996: 00 binary image of the results you The big table above is called the I0B. 03"(For 3.1 DOS only). developed in the form of a disk file. You must place the low order address LENG is the length of the file. of the I0B in the Y register and the To restore the file and use the high order address in the A register. nameless program again to change or Then, call the subroutine in the DOS By the way, in case you missed it, display your previous results simply typing "9DB9G" (9DBFG for 3.2 DOS) that will perform the operation. The follow these steps: from the monitor will reinitialize the addresses should be as follows: DOS. This routine should be called (1.) 5BL0AD RESULT.7A:LLHH FP after every reset to restore the MEM SI ZE ADD(hex) INT (2.) 5BL0AD NAMELESS.PROGRAM hooks. It is exactly like typing (3.) >CALL 20A8 "3D0G" as APPLE'S documentation (A.) : ADD 15616 recommends but is a little bit safer 16k 3D00 15616 (5.) Ctrl-D to escape add function 19712 since the 3D0 location is often 20k AD 00 19712 (6.) Hit Reset destroyed by various programs. 2Ak 5D00 23808 23808 (7.) *7A: LL HH LL HH 32k 7DOO 32000 32000 (8.) *803g This article is merely the tip of the 36k 8D00 -29AA0 36096 (9.) -.LIST proverbial iceberg; most of the DOS's A8k BDOO -17152 A838A internals still remain a mystery to Don't forget to re-establish the end me. I hope APPLE eventually NOTE:: An easier method would be pointer two times into both 7A.75 and distributes complete documentation but CALL $309, which contains a jump 76.77, because the prince once said until then other curious users can use the proper address. "two is a very good number". this article as a starting point for their own explorations. Hopefully 1 7 Enjoy they will report back what they find. ComputerLand | of San Franci/co apple computer) Sales and Service

PRINTERS HARDWARE SOFTWARE

T I Color Monitors Information Unlimited Software Centronics 737

Micro-Works Digitizers Personal Software NEC Spinwritersj Mountain Hardware Programma International MUSIC SYSTEM! Silentype Microsoft ALF Music Synthesizer Trendcom Synergistic Software Z-80 Softcard Qume Automated Simulations Videx video-term Diablo California Pacific Computer M&R Sup-R-Terminal Paper Tigers Apple Mi-Plot Plotter Bits & pits Graphics Tablet ComputerLand 117 Fremont Street • San Francisco, CA 94105 • (415)546-1592 REVIEWS

S M 3 I A 3 d REVI E W S REFERENCE ROGER'S EASEL PILGRIMAGE MANUAL BY BENE WIL80N BY QENE WIL80N

I first met Roger Wagner at last May's BY KEN SILVERMA N Computer Eaire, where he was selling On a recent trip to the Los Angeles the Apple II Utility Disc ( fantastic area (I think the city limit signs are set of programs that are still in posted about twenty miles south of San The RED BOOK has been replaced. The heavy use on my machine). Roger's Jose) I took time out to stop at the new Reference Manual Is following the attention to detail was immaculate, all time "shrine" of Apple new size of 6" by 8" and is 196 pages and the documentation was 'complete' users-Computer Components of Orange long with a complete circuit drawing in every way. ('Complete' is when the County. of the Apple in the back. documentation includes a detailed tutorial-one that has examples as The place is filled with all the It should be at your local computer needed, and gives insights into the goodies that cast spells on the store for the price of $19.95 critical areas. A program is computer user's wallet; software (A2L0001A). 'complete' when the documentation galore, gadgets, super joysticks, allows me to fully understand what is magazines, books, lessons, tutorial The book was written by Chris taking place, and why.) sessions, hardware on line and Espinosa, an Apple Core member, and is working. It is possible to get many the best manual I have seen come out Roger's Easel is another 'complete' special items (cranked out in the back of Apple. It covers subjects that program. Easel is not another rooms, no doubt) including interface were in the original reference manual Electric Crayon. It is a Lo-Res Color cards, lower case boards, and many (Red Book) but in more detail with Sketch program that employs the game more things that I don't fully subjects easier to find. There are paddles for fast pictures, logos and understand. good examples included with each diagrams, etc.. (My joy stick draws topic. There is a complete listing of truly fast pictures). Integer and Among the many magazines is a newcomer both monitors (old and new autoboot). Applesoft routines are included to called "The Apple shoppe", which is 'link' these finished pictures to user published more or less monthly for the The table of contents is 6 pages long programs. Complete documentation purpose of promoting practical uses of with the following chapter headings: describes the entire process and the Apple Computers, by Compu-Tutor Co. procedure is made crystal clear. Subscriptions are $12.00 a year, and 1 - APPROACHING YOUR APPLE are available from: 2 - CONVERSATION WITH APPLES Actual use of the Easel is 3 - THE SYSTEM MONITOR accomplished by following instructions The Apple Shoppe 4 - MEMORY ORGANIZATION listed in the bottom-of-screen window. P.O. Box 701 5 - INPUT/OUTPUT STRUCTURE Typing 'N' will give current color & Placentia, CA 92670 6 - HARDWARE CONFIGURATION X, and Y positions. 'H'elp switches 7 - APPENDIX A, 6502 INSTRUCTION SET to Page 2, for a complete list of Volume 1, No.3 has several short 8 - APPENDIX B, SPECIAL LOCATIONS commands. The left and right arrows programs, a Graphics Workshop section 9 - APPENDIX C, ROM LISTINGS and REPT keys together allow fast on Hi-Res Shapes, a discussion on 10- GLOSSARY scrolling of this information, and Personal Computing's Family Tree, a 11- BIBLIOGRAPHY shows a detailed description of each short primer on Pascal, and a very command. (Figure out how the scroll useful printing subroutine for the This is one publication you will want works—It's impressive). Roger states WHATSIT program (something sorely in your reference library. Check with that user created pictures can be needed). You don't want to miss Kim your local computer store. successively linked together for Clark's method of Water Cooling a PET . animation. And finally, is anyone able to The only flaw that I could find is "really" review some of the assemblers that at $13.95 (plus tax), the that are available for the Apple II? HANDBOOK programs are too cheap. In today's Just reading the documentation for market place price does not always Programma's ASM/65 EDITOR ASSEMBLER denote quality or excellence, and many BY KEN SILVERMAN scared me off. I would love to hear twenty to forty dollar packages lack from anybody with "hands-on" any of the nice extras included in the experience on the ASM/65. In all Easel. To order ROGER'S EASEL, or for fairness, the documentation is The basic computer language in most more information, please contact: thorough, and will probably be a home type computers is BASIC. But future challenge. BASIC has never been standardized; Southwestern Data Systems LISA, Programma's Interactive there are more than 100 "dialects". A P.O. Box 582 Assembler changes a few mnemonics, and guide called "The Basic Handbook: an Santee, CA 92071 syntax is not identical to MOS Encyclopedia of the Basic Computer (714)562-3670 Technology, which requires some Language", written by David A. Lien, thought before jumping in. Improved provides good deal of help in coping As a footnote, it is worth mentioning version 1.5 was just announced, and with these assorted dialects. that for anyone who has lost track of (you guessed) mine is the "older" 1.3 his/her Applesoft programs there is (looks like software promoters have The book covers 78 of the most popular another offering from learned something from the car versions of BASIC in such a way that Santee—APPLE-DOC. This three program makers). its readers can convert nearly any set gives you the ability to list I've just started using the Software program to run on a computer that uses every variable used in a program and Concepts Text Processing System & a different version. These include all the lines each is used on, a list Assembler--Seems to do what I need more than 50 computers from IBM, of all the lines called by a GOTO, done without a lot of frills (that I Cromemco, Apple, Exidy, IMSAI, Heath, G0SUB, etc., or to rename any or all can't remember anyway). 0SI, Radio Shack, Commodore, HP, and occurrences of any variable, change Wang, among others. The book is 360 variable types, replace constants. Anybody with knowledge of new products pages and is available for $14.95 plus This program set is also only $13.95 should send a memo to the Cider Press $1.35 postage from: (cassette version $9.95). as there are over 800 members who can benefit from your experience(s)• CompuSoft Publishing Support your local programmer. You Maybe someone from Programma could 8643 Navajo Rd. need programs, programmers need tell us how well their different San Diego, CA 92119 income-reach a happy compromise. assemblers have been accepted, and ho w Everyone benefits. "updates" are handled. LISA'S syntax, with the exception of I'm also wondering why Gene knocks decimal addresses and octal numbers LISA and praises "EAT". "EAT" (from (and who uses octal numbers anyway?) Software Concepts) contains as many LISA AUTHOR is IDENTICAL to MOS's. Again, I added syntax irregularities as does LISA! some extensions to make LISA easier to I'm not knocking "EAT", it is a fairly use than would normally be the case. good assembler (although overpriced), STRIKES BACK Since none of the assemblers available but Gene seems to imply that LISA Is for the Apple II have a completely incompatible with MOS syntax whereas LKTTER FROM R ANDY HYDE compatible syntax, there really is no "EAT" is not. "standard" syntax. I recognized this problem when writing LISA and as such Concerning updates, Programma Int'l Dear "Press", I tried to include a mixture of each has one of the most liberal update of the available syntaxes. For policies around. Simply send in your I read "Pilgrimage Plunder" by Gene example, load the accumulator with a original disk (so we know you actually Wilson in the September Issue. Being hex constant is specified as: bought the product), plus the "someone from Programma" and, in fact, difference in cost between the two the author of LISA I was prompted to LDA 00 ($0 IS THE CONSTANT versions plus a $5.00 update fee and reply to Gene's comments on ASM/65 and TO BE LOADED) you will receive the update and the LISA. First, ASM/65 is a when using the original Microproducts new documentation by return mail. "professional" product (whatever that assembler, or as: Speaking of updates I would like to is) and the documentation resembles an LDA #$0 take a moment to mention the new IBM manual more than anything else When using a MOS compatible assembler features in LISA 1.5. LISA 1.5 works (because it was written by an ex-IBM (such as ASM/65 or the SC Assembler with the DOS 3.2 subsystem, as well as user) and as such it is not easy II). I wrote LISA so that both the auto-start ROM and the Apple II reading for the average Apple owner. methods of specifying an immediate hex PLUS (or minus in some people's There are a few "cyber-snobs" out constant could be used. The drawback opinions!). Several new commands have there however who eat the stuff alive, to this scheme? Well in the been added to the command processor not to mention pay $69.95 for a "standard" MOS syntax world the which allow you to modify (edit) product which is "professional" even Microproducts version means "load the existing lines, determine the length though it may not offer any advantages accumulator from decimal location 0". of the file, break to the monitor, and write your textfile to the disk as a over similar programs. For the person Since I didn't want to disallow this text type file so that you may edit who likes to impress people, ASM/65 is function I decided to differ from MOS your file with the Apple PIE text definitely the choice. ASM/65's main rather than not allow the editing system should your program advantage is that it incorporates the Microproducts' syntax. The reason require extensive modification. Apple PIE text editing system which is behind this is simple, "LDA 0" Is Several new pseudo opcodes have been an order of magnitude better than easier to type into the machine than added to the system increasing LISA'S anything else. If you plan to do a is "LDA #$0" (in the latter version flexibility immensely. LISA now lot of text manipulation on source you have to type two extra shifted supports 23 pseudo opcodes making it files, ASM/65 is your only choice. characters) Since I wanted to make LISA extremely easy to use I decided easily the most flexible assembler around (and also the assembler best With regards to LISA I have several to use a different syntax to specify integrated into the Apple II). The comments to make. First, the "few" decimal numbers. To load the pseudo opcodes include: mnemonics which were changed were the accumulator from location 0 you would Sweet-16 mnemonics, none of the 6502 type: LDA !0 NLS - NO LISTING mnemonics were affected. Several LST - LISTING ON "extended" mnemonics were added, where the "!" tells LISA that the following is a decimal number. The EQU - EQUATE possibly this is where the confusion EPZ - EQUATE PAGE ZERO lies. Extended mnemonics are simply only other variance from the "MOS ORG - PROGRAM ORIGIN duplications of an existing mnemonic standard" concerns the specification OBJ - OBJECT CODE ADDRESS with a different name. For instance, of a low or high order byte in an immediate expression. To load the ADR - ADDRESS PSEUDO OPC ODE the BCC (branch if carry clear) test BYT - BYTE DATA (* NEW * ) can be used after a comparison to test accumulator with the low order byte of HBY - HIGH BYTE DATA (* NEW * ) for the less than condition. "Carry an address you would use: HEX - HEX STRING Clear" does not register in most LDA //address ASC - ASCII STRING peoples minds as "less than". So I -or- STR - STRING W/LENG TH BYTE added the mnemonic "BLT" for "branch LDA /Kaddress To specify the low order byte you may DCI - DEFINE CHARACTERS IMMEDIATE if less than". It generates the same (* NEW * ) code as "BCC", yet is much easier to use: INV - INVERTED CHARACTERS (* NEW * ) remember than "BCC". Likewise "BGE" LDA //address BLK - BLINKING CHARACTERS (» NEW *) "branch if greater than or equal" has only. The "//<"option is not supported PAG - SKIP TO TOP OF FORM (* NEW *) been added as has "BTR" & "BFL" (the reason will be clear when version PAU - PAUSE, FORCE ERROR (* NEW *) "branch if true and branch if false". 2.0 is released). END - END OF TEXTFILE ICL - INCLUDE, CHAINS TEXTFILES XOR has also been added and may be To specify the high order byte of an DCM - DISK COMMANDS, MULTI-PURPOSE used in place of EOR. Please note address you would use: DFS - DEFINE STORAGE that these "extended mnemonics" are LDA //>address included IN ADDITION to the existing When using a MOS syntax assembler. mnemonics, if you don't like them you Again I didn't like the idea of having VERSION 2.0 PSEUDO OPS don't have to use them. to type two shifted characters, so once again I "borrowed" LISA'S syntax LET - REDEFINES A LABEL(FOR LOCAL Some of the Sweet-16 mnemonics have from the SC Assembler II. To specify STORAGE) been changed so that they conform to the high order byte you would use the FLT - FLOATING POINT NUMBER the MOS three character mnemonic following: syntax. All two character mnemonics LDA/address In addition, error and listing options have been improved considerably. were converted to three character And that (unless I've forgotten mnemonics and all four character something) is the extent of the syntax Version 2.0 (for the language card, to mnemonics were also converted to three differences. Naturally LISA'S pseudo be released in January) has several character mnemonics. The reason opcodes are incompatible with the MOS improved error messages, supports behind this is simple, it improves the syntax, but then so are everyone eight character labels, signed and listings enormously if the mnemonics else's. LISA was designed to be easy unsigned decimal integers (now you can are all the same length. to use, not follow blindly the syntax specify "JSR !-936" Just like in rules designated by some electrical BASIC!), improved syntax concerning As for the syntax not being identical engineer with considerable computer decimal constants, multiplication and to MOS's syntax I must point out that background. division in address expressions are only one assembler for the Apple II also supported as are local labels. uses MOS syntax and that's ASM/65. When I wrote LISA I researched the field carefully and used a syntax which was compatible with most of the existing assemblers at the time. 2 1 LISA 8TRIKES BACK (CONT) TRENDCOM 100 DISK II

If you ever have any questions about a BY ANDY HERTZFELD software product, or wish to report a BY SCOT KAMIN8 bug, or want to obtain an update, please contact the author or "What's that you say? A reliable The APPLE II Floppy Disk Subsystem was distributor, "We're here to help." hobbyist thermal printer for less than released on July 7, 1978 only about a $500? With an interface? And paper month after it was originally promised Signed, readily available? Why, you must be (although it was tanta 1 izingly Randell Hyde mad." While the final statement is displayed at the 2nd Annual Computer Lazer Systems undoubtably true, it does not negate Faire in March). For the most part, 12804 Magnolia the previous ones. it was well worth the wait. Chino, CA 91710 The printer of which I speak is the The drive itself is based on the Editorial note: In Cider Press Vol. Trendcom 100 - a little 40 column, standard Shugart Mini-floppy drive but 2, No. 5 I asked for someone to come bidirectional job that hums along at with its electronics completely forward and "really" review some of 40 CPS. It is, in the vernacular, a revamped by APPLE. The specs are the assemblers that are available. real sweetheart. rather impressive; it has a transfer I'm glad that Randy has answered the rate of 156K bits per second, nearly call. It's good to get an 'in depth' The system consists of the printer, an 100 times faster than the cassette survey of LISA. I must, however, intelligent interface card and a roll interface. It has an impressive question where Randy found a of paper (80 ft.) for $450. Extra capacity of 116K bytes (143K with comparison between LISA and any other paper is $5.00 for two rolls which Pascal), about 30 more than most assembler. I use the Software prints in blue,; black is a little mini-floppies get. It can access any Concept's Text Processing higher. data stored on it in well under a System/Assembler - I'm comfortable second, which sure beats listening to with it, and don't feel at all that Regular readers of this journal are obscene squawks from a tape recorder. it's 'overpriced'. (Using a product familiar with my propensity for An average of 15 to 20 programs will is a form of praise that certainly panning printers. Alas, 1 find little fit on a single diskette (depending, can't be ignored). Perhaps we can to complain about with this gem. I of course, on program size); the find some 'neutral' arbitrator to have been using one since mid-October diskettes cost around $5.00 apiece - decide the relative merits of each without a glitch. True, its narrow shopping around pays. product. (Sounds like another call format makes it impractical for for a review-and, in fact, it is. The business uses. Its 40 columns allow For a list price of $595 you get one actual merits of any program will be for calendars and biorhythms, and disk drive with case and connector ultimately decided in the marketplace, little else; but it sure is terrific ribbon, one controller card capable of and, having purchased both products - for listings. Anyone who has handling up to two disk drives, and a my vote is therefore cancelled out.) struggled along for a year editing complete disk operating system (DOS) programs 24 lines at a time knows how with 19 commands. All the hardware The Interactive aspect of LISA valuable a cheap printer would be - and software you need to get going are certainly makes it one of the more Trendcom fills the bill admirably. included, even a blank diskette; you desirable products on the market, and just plug the controller card into any I personally like the approach that The company itself (Trendcom, 484 peripheral slot except 0, plug the Randy has taken to continually improve Oakmead Pkwy, Sunnyvale CA 94086) drive into the controller card, and his work. impresses me for a number of reasons. you're ready to go. The bootstrapping First, it sells only to dealers - routine (which gets the thing running) I thank Randy for providing the Core which is a good step in helping the is stored on 512 bytes of PROM on the with the above information, and hope industry to mature. controller card, so all you have to do that he will continue to enrich us is reference the proper slot and the with his knowledge. Secondly, it actually delivers its firmware takes over to load in the DOS G.W. product before it is due, as opposed and even start executing a program of to the 3-months-late de-facto-standard your choice. we have been plagued by up to now. And third, they don't lie about the The DOS is a real memory hog. APPLE product. What they claim about their claims you can get "full disk APPLE '21' product in their talks to dealers is capability in systems with as little true. as 16K RAM" - which I suppose is true, if you don't need APPLESOFT, HIRES BY JIM LINHA RT Without hesitation, I recommend this graphics and you're willing to write printer to hobbyists; if I were you, programs that use less than 3K o r so. I'd begin leaving Christmasy hints Apparently the entire DOS must be around the house, naming the Trendcom resident at all times, and it needs 8 and your favorite computermonger. - 12K depending on how many fil® I want to spread the word of a card Happy listings... buffers are used. This is a bad way game that's a gas to play and has the to set up a microcomputer's operating best hi-res graphics of any card game system, unless you're in the business I've ever seen. It's Apple 21 and of selling memory. it's a game worth adding to your library. Since you usually only use one command at a time, it should be able to Apple 21 is the game of Las Vegas overlay itself to conserve its memory blackjack and it provided me with a requirements; only about a 2K n ucleus good feel for the game. One thing I should have to be resident. For some know, I'm no gambler and it's easier inexplicable reason, APPLE did not to pay a $10,000 debt by mashing overlay; consequently you really need "RESEI" than by selling plasma or a 32K system to use the DOS refinancing my house. comfortably. Apple 21 plays with a 52 card deck and The disk system is an important when it reaches the end of the deck it advancement; 100K + of online, goes on to reshuffle. Card counters direct-access storage transforms the now have a chance to perfect their APPLE from a sophisticated toy into a skills, and the game includes such full-fledged "real" computer. Its aspects as insurance bets and price is a bargain in the current doubling. I sure enjoy playing this market, and it should make a game and am surprised sometimes at how significant addition to anybody's much time (and money) goes by. system. a a 80 COLUMNS GRAPHICS TABLET

BY KEN SILVERMAN At this point, a complete list of BY KEN SILVERMAN variables is listed. Array variables Recently your roving reporter was in are indicated by an asterisk (*) for Sunnyvale, CA to see and talk to Marty each dimension of the array. After Apple now has its new Graphics Tablet Spergal of M & R Enterprises. M & R the name of each variable, EVERY line in the stores. It will allow the user as you might know manufactures the Sup in which the variable is used is to convert graphic data into digital 1R' Mod we use in our Apple. listed. information that may be processed by After listing each of the variables, traced or drawn freehand on the tablet While getting a tour of the plant I you can at your option create a surface and are instantly displayed on was shown a working prototype of a new separate file of descriptors for all the system monitor. Any image created I/O card. BELIEVE IT OR NOT I saw 80 or some of the variables. can be stored on the system disk for columns by 2b lines, upper and lower Additionally, as you are supplying the later use. Block diagrams, descriptors, typing an "L' lists the case, coming out of the Apple into a architectural renderings, logic monitor. The resolution on the lines that the variable is on. diagrams, etc. are a few of the inexpensive monitor (8MHz bandwidth) Finally, after you have entered the applications. was fantastic. I asked about this and descriptors, you can save the list of variables and their respective the designer, John Wilbur, told me The tablet consists of 15 by 15 inch descriptors to a special disk file. there is a new circuit (being tablet, a mylar overlay, stylus, For documentation purposes, this list patented) that adjusts the contrast diskette software and interface. It can be output to a printer. Later, between the horizontal and vertical uses the Apple power supply and after you have modified or extended lines to make it look like an results in a low profile tablet, fewer your program, the list can be read in expensive monitor. boxes to contend with, easier hook up, for additional updating. and high reliability. Linedoc is similar to Vardoc and According to M & R, the new card will performs several functions. First, it be in computer stores for your The Software Package is composed of constructs a table of every line evaluation some time in the end of some assembly language fast draw referenced by GOTOs and GOSUBs. January (1980). They say the card is routine and the master control is in Second, any line numbers which are compatible with the Apple Pascal Applesoft BASIC. It can process up to called by mistake (resulting in an System (so don't rush to buy a 120 coordinate pairs per second. This UNDEFINED STATEMENT error) are listed terminal), works with Apple DOS as a means that unlike other systems it at the end of the table and indicated Hello program, and should work with will keep up with the fastest hand by an asterisk (*). Descriptors can most existing software. This is great motion. be added, saved, and retrieved as in for those of you working with word Vardoc. The main use for Linedoc is processors or time share programs. In The tablet is used by pressing the pen to unscramble the contorted logic fact John Draper has started to on the designated square to select a which typically appears in even the implement a new version of EasyWriter function. Some items that are best of programs. to work with this card with some new selectable are CLEAR, REDUCER, It seems that I have saved the most CALIBRATE, PEN COLOR, DRAW, LINES, features. interesting program till last: it is DOTS, BOX, BACKGROUND COLOR, and some called REPLACE and allows you to of the commands are selectable from M & R Enterprises says ask your local replace various elements in an computer store for "SUP 1R' TERMINAL". the tablet are CATALOG, SAVE, LOAD, Applesoft program with replacement SLIDE, and AREA. These are just a few Take my word for it, I saw it work - sets of your choice. You can change and a complete listing can be obtained as of this time they did not give me a variable names, change numbers to by checking with your local computer retail price. variables or vice versa, replace a store. literal, document a literal, list lines, and convert Integer programs to APPLE DOC Applesoft with a minimum of typing. A "literal", by the way, is any character or set of characters such BY RANDY FIELDS as: '+', 'PRINT1, 'A1', etc. When replacing either variables or APPLE-DOC is a 3 program set designed literals, the Replace program asks if as an aid to the development and you want to replace all or just some. documentation of APPLESOFT programs. If you respond with 'some', it will The 3 programs are 1) Vardoc, 2) list out the entire line and ask you Linedoc, and 3) Replace. They were whether or not to do the replacement. designed, developed and documented by Multiple occurrences in the same line Roger Wagner of Southwestern Data are listed separately allowing you Systems. complete flexibility in doing the Vardoc overcomes one of the replacements. If you respond with fundamental deficiencies of most, if 'all', Replace changes them all not all, versions of BASIC - the without listing. Some useful non-centralized location of all functions of Replace are: changing variable names. Vardoc, which is real variables to integer variables short for Variable Documentation, and vice versa and changing INPUT finds all variable names used in your statements to GET statements. progam, alphabetizes them and lists All three programs - Vardoc, Linedoc, them on your CRT and/or printer. You and Replace - come complete with also have the option of writing a excellent documentation telling you separate file which contains a not only how to use the programs, but description of each variable allowing how the programs work. you to delete the usual REM statements APPLE-DOC is available from local from your program, saving memory and computer stores or from SOUTHWESTERN increasing execution speed. DATA SYSTEMS. P.O. Box 582, Santee Using Vardoc is the essence of CA 92701 for $13.95 for the diskette simplicity. For Disk II users, load or $9.95 for the cassette. It is your program in first, then EXEC probably the best programming buy for Vardoc. Tape users load their the money, and at these prices, Roger program, type in some PEEKs and POKEs, should not be ripped off by bootleg and load Vardoc. Roger's banner copies. appears, hit any key and "Working" Ask for APPLE-DOC by name: do not be appears along with an estimate of the confused by shoddy imitations! time to complete the search and alphabetizing process, generally less than a minute. 2 3 VER. 1.7 FOR APPLE II* COMPUTERS ^ 100 PAGE, PROFESSIONALLY WRITTEN MANUAL' FORTH INTEREST GROUP COMPATIBLE DIRECT HOT-LINE TO SYSTEM DEVELOPERS INCLUDES ITS OWN DOS CAP'N SOFTWARE HAS DELIVERED 100's OF WORKING FORTH SYSTEMS UPDATE OFFER: TRADE IN YOUR VER. 1.6. DISK FOR FULL CREDIT OF PURCHASE PRICE TOWARD VER 1.7 RUNS ON APPLE II OR APPLE II+ WITH 1 OR MORE DISKS AND 48K. ALSO RUNS ON LANGUAGE CARD AVAILABLE AT COMPUTER STORES OR DIRECTLY FROM CAP'N SOFTWARE PRICE, SYSTEM $140, MANUAL ONLY $20 CAP'N SOFTWARE P.O. BOX 575

SAN FRANCISCO, CA 94101,-,,rr rr\ ALSO AVAILABLE FOR PDP-11 f COMPATIBLE WITH VER. 1.7 FOR APPLE DOWNLOAD PROGRAM DEVELOPMENT OR EXECUTION RUNS STAND-ALONE OR UNDER RT-117 RSX-11 Mf, OR RSTSf AVAILABLE DIRECTLY FROM CAP'N SOFTWARE PRICE, SYSTEM $145, MANUAL ONLY $20 'Trademark of Apple Computer Corp. -(-Trademark of D EC. LANGUAGES

nIL APPLESOFT - FP

RAM - FP You will be writing on this disk so if FP RENAME BY BARNEY 8TONE you are worried about wiping something out .. get another disk... Save the APPLE APPLICATION NOTE8 program you want to convert on to it and use that disk. Have you ever written a program that Apple Computer has quietly decided to needed to check to see if a data file drop the RAM versions of Applesoft II 3. Load the following routine to the existed before trying to read it? Basic. Sometime in the last two or source program using any available Most programmers seem to use the three weeks, and with no notice to line numbers. Do this near the method of opening the file, then their dealers, Apple stopped including beginning of the program if possible: reading it. If an 0NERR statement is the Applesoft II cassette with their in effect, an OUT OF DATA error is computers, and removed the disk trapped. This has the drawback of version of Applesoft from the master 10 REM CONVERSION ROUTINE creating a file in the diskette diskettes that come with the disk 20 REM "°"="CONTROL D" directory that must then be deleted. drives. 30 PRINT ""OPEN XX" Another method is using the VERIFY 40 POKE 33,33 command. It works but can take a The reasons quoted by Apple included 50 PRINT ""WRITE XX while with a large file. the desire to concentrate support on 60 LIST one version of the language - i.e. 70 PRINT ""CLOSE Here is an example of a program that ROM version (the Pascal/Language 80 END prompts for a file name and will system uses the ROM version of continue only if the file already Applesoft - that is, although the exists. language will be in RAM, it will use 5. "RUN" the modified source program. the same memory locations as the The program will open an "exec" file ]LIST 0,200 current ROM version). Apple in on the disk and list itself into this 100 TEXT: HOME: D$= CHR$ (A): VTAB 11 addition stated that the costs and file. This file will have a "T" 110 PRINT: INPUT "FILE NAME: ";A$ manpower could be better utilized on prefix and will not respond to a run 120 IF A$ = " " THEN EN D developing new projects. command. It is accessed through the 130 ONERR GOTO 160 use of the "EXEC" command. 1^0 PRINT D$"RENAME "A$","A$" As of this time if you call the 150 POKE 216,0: GOTO 180 Hotline about a problem with Applesoft 6. Now use either the "INT" or the 160 POKE 216,0: PRINT D${"CATALOG" you will get answers but sometime in "FP" command to jump into whichever 170 GOTO 110 the near future that support will be language you wish to use for your 180 REM **MAIN PROGRAM** stopped. object program. The work is being done in line 1^0 by NOTE: The current version of 7. If your source program is in FP attempting to rename the file with the Applesoft on the card includes the new and your object program is to be in same name. It's possible to use the Auto-Boot ROM. Integer turn on your printer. When UNLOCK command here if the file needs the EXEC file "types" FP program lines to be unlocked later on in the in integer.. all lines of the FP program. program will be typed in and evaluated FP-INT-FP by the integer language program itself. Those FP program lines that BY JEFF FRANK EL won't run in integer will be flagged FP MEM MOVE with error messages. If you have your printer on these program lines will be APPLE APPLICATION NOTES printed along with error messages. Much has been said in articles However., integer will not insert about how to do a memory block move these lines into RAM m emory. In going through the new issue of the from Integer Basic. It's almost as If you don't have a printer.. go on Apple user group newsletter "Contact simple to do it from Applesoft. 5" I found a great routine that will to step 8. When you list the program You just have to poke a short aid in converting programs from back.. incompatible program lines machine language routine in o will be conspicuous by their absence. Applesoft to Integer and vice-versa. memory first. If you are going from integer to FP don't bother with the printer. All This article assumes that one has a ]LIST 200-250 program lines will be inserted into disk drive and Applesoft in ROM. A 200 REM MOV E PG2 TO PG1 printer is also helpful especially RAM a nd the error messages will appear 210 POKE 60,0:POKE 61,8 when you try to run the program. when going from Applesoft to Integer. 211 REM START OF BLOCK When I say that this routine will aid 220 POKE 62,255:POKE 63,11 8. Now execute the file by typing you in program conversion I mean that 221 REM END OF BLOCK "exec xx". Subject to the limitations it will save you the job of tediously 230 POKE 66,0:POKE 67,4 re-typing those zillion and a half as noted above the file will type into 231 REM START OF OBJECT MEMORY program lines. The converted program RAM memory your object program. 240 CALL 768: RETURN will in most cases not run correctly 241 REM DO THE MOVE 9. Delete the special routine from owing to the differences in the two the object program. languages. Making it work is up to That's all there is to it. you! 10. Save the object program back onto Here is what to do the disk. (Be sure not to save it under the original name - you will 1. Please read all of the following wipe out your source program). instructions before you do anything else. It is easy to goof this up if Now comes the fun part of getting the you don't understand what is happening program to run in the new language. (I even fouled up my text editor writing this article). GOOD LUCK

2. Boot the disk drive. Insert a disk containing the program you want to convert. This disk should have plenty of room on it. The SPC(X) command can only be used in a print statement and may be located anywhere within that statement. When FP PGM MOVER The difference here is that if line preceded and followed by a semicolon, 60000 is true the program continues SPC(X) introduces X number of spaces execution. If the expression is false between the item preceding and the APPLE APPLICA TION NOTE8 the pointers are changed and the item following it. program reruns itself. (The speed difference occurs when relocation must The TAB(X) command is used within a take place and the entire program must print statement but only immediately be re-loaded from disk.) following the print command. In It Is sometimes desirable to have an contrast to SPC(X), it dictates the Applesoft program start at an address absolute position relative to the left other than the default $801 (ROM margin (defined as position 1) where Applesoft). A "safe" area for machine the item will be printed that follows language, the desire to use page 2 of it. Type in the following three lines text or to make room for a large "GET" TRAP to see this work. program that uses HIRES graphics are the usual reasons. Here is a good way BY MAX J. NAREFF 10 PRINT "P.PECK"; SPC(12); to do this for Disk II users. "PINK DR." 20 PRINT : PRINT Since a diskette holding this type of 30 PRINT "P.PECK": PRINT TAB(12); program is generally dedicated to a Full many a program bit the dust until "PINK DR." specific purpose, the actual changing the Dec. 1978 issue of "Contact" of Applesoft's pointers will be done (from the Apple Computer Co.) revealed by the "HELLO" program. Here's an the culprit. "GET" was getting in the example: way. Unless a "GET" statement was followed by a "PRINT", the DOS command $.XX TRAILING O'S ]LIST would be ignored. 100 TEXT: HOME: D$ = CHR$(4) BY SCOT KAMINS 110 IF PEEK (104) = 12 THEN 150 The new 3.2 DOS manual mentions this 120 POKE 1 01,12 problem and presents the "cure" on Pg 24; however a clearer picture emerges The new APPLESOFT language is really 130 POKE 1 03,1 in the June and October issues of terrific - especially if you have been 140 POKE 3072,0 fortunate enough to get it on the ROM 150 PRINT D$;"RUN MAIN PROGRAM" "Call APPLE", edited by Val Golding. card. It does, however, have some "....first set D$ to equal a carriage pesky quirks - among which is the lack This program makes room for using text of trailing zeros. page 2. This is what happens when the return, followed by a C0NTR0L/D. DOS requires that a carriage return be disk boots: performed before each DOS command. One feels this lack when trying to Now it is possible to have multiple write business and finance programs Line 100 simply clears the screen and DOS commands in one program line." that use two digits after the decimal sets the variable D$ equal to Control point - i.e., money stuff. Following D. "In addition, D$ will now allow (you) is a solution to the problem which, to "TRACE" with DOS up, and it WILL while inelegant, does the job. Line 110 checks the high order byte of permit a DOS command to directly the beginning of program pointer ($68) follow a "GET" statement." to see just where the program is 5 Z 2$=".00":Z1$="0":D $="$" located. These pointers are explained 10 CALL -936 on page 140 of the Applesoft manual. Example-A. 100 D$=CHR$(13)+CHR$(4): PRINT "OPEN 15 REM HERE COMES A ROUNDOFF FUNCTION If the program is already in the COLORS" D$ "WRITE COLORS" (note 20 DEF FN A(R)=INT(R*100+.5)/100 correct location, a branch is made to absence of delimiting colon and 25 ?:?:INPUT "TEST ";TEST:?: REM line 150 where the application program GIMME A NUMBER is RUN. semi-colons) 30 T$=STR$(TEST): REM WE TREAT THE THE NUMBER L IKE A STRING Line 120 is reached only if the test Example-B. 100 D$=CHR$(13)+CHR$(4): GET A$ 35 REM HERE COMES A "SPECIAL CASE" on the line above fails. It POKEs the 110 IE A$= FIX (I DID SAY I NELEGANT!) correct new high-order byte. 40 IF LEN(T$=2 AND MID$(TS,1,1)="." Line 130 POKEs the new low-order byte. THEN 1500 45 FOR SEEK=1 TO L EN(T$): REM IS THERE SPC(X)-TAB(X) A DECIMAL IN THIS NUMBER? Line 140 changes the byte immediately 50 IF MID$(T$,SEEK,1)="." THEN 1000: preceeding the new program location to BY MAX J. NAREFF REM IF YES BRA NCH TO LOCATION FOR zero. Note that this byte must ALWAYS be zero for Applesoft programs. ($800 FURTHER CHECKING is a zero when a normally located 55 NEXT SEEK: REM KEEP LOCKING UNTIL program is in memory.) THE CHARACTERS RUN OUT 60 T$=T$+Z2$: REM SINCE THIS NUMBER Applesoft tab fields are restricted to HAS NO DECIMAL, CONCATENATE A Line 150 RUNs the main program. three as compared to the normal five DECIMAL WITH TWO TRAILING ZEROS in Integer. Details appear in the 65 GOTO 2000: REM BRANCH TO THE This works "on the fly" because no Apple manuals. This limitation PRINTOUT references are being made to other sometimes imposes restrictions on the 1000 IF MID$(T$,LEN(T$)-1,2)="." THEN program lines after the pointers are number and format of data outputs and 2000: REM IF THIS NUMBER HAS A changed. The program is linear. headings. A detour around these DECIMAL W/2 DIGITS AFTER IT GO GET roadblocks is illustrated: Another way of changing these pointers PRINTED 1200 IF MIDS(T$,LEN(T$)-1,1)='.' THEN is to do it from within the .(DATA GENERATING OUTPUT NOT SHOWN).. 1500: REM IF 1 DIGIT, GET ANOTHER application program. The drawback is 150 D$="DATE" 1300 T$=STR$(FN A(TEST)): REM ROUND that it is somewhat slower. To do it, 160 R$="RAINFALL" OFF THIS NUMBER TO 2 SIGNIFICANT use a subroutine to check the pointers 170 S$="SN0WPACK" DIGITS BEYOND THE DECIMAL like this: 180 F$="RUNOFF" 1400 GOTO 30: REM GO BACK TO MAKE 190 PRINT D$,R$,S$,F$ SURE TWO D IGITS FOLLOW A DECIMAL 100 LET D$ = CHR$(4): G0SUB 60000 200 PRINT : PRINT 1500 T$=T$+Z1$: REM CONCATENATE THE 210 PRINT D$; SPC(3);R$; SPC(3);S$; NUMBER WITH ONE TRAILING ZERO PROGRAM SPC(3);F$ 2000 ?:?:? D$+T$:?:?: REM P RINT A DOLLAR SIGN FOLLOWED BY THE NUMBER 60000 IF PEEK (104) = 12 THEN RETURN Line 210 produces a much nicer format WHICH NOW HAS 2 SIGNIFICANT 60010 POKE 1 04,12 for the data output. 60020 POKE 103,1 DIGITS BEYOND A DECIMAL POINT 60030 POKE 3072,0 2100 GOTO 1 0: REM GO GET ANOTHER 60040 PRINT D$; "RUN MAIN PROGRAM" 2 7 NUMBER Typically, line 20 contains a more complicated expression which causes premature termination of the loop. If POKE 51,0 you have more than 10 of these 6503 CPU premature terminations you get the dreaded OUT OF MEMORY error just like BY PAUL KNEVEL8 BY PHIL BERNHEIM the APPLESOFT Manual says for 10 nested For-Next loops. FROM MICHIGAN APPLE Have you ever been de-bugging an APPLESOFT program and after making The fix was supplied by Dick Huston of It has been rumored that Apple is some changes, had a "NOT DIRECT Apple Computer Inc. and looks like: working on an apple III computer to be COMMAND" error message thrown at you released shortly. At present, the when you tried to run the program? 10 FOR I = 1 TO 10 advance information available Is that 20 J = 5 * I a new microprocessor will be You scratch your head because, 30 IF J = 15 THEN I = 10: incorporated into the unit - the 6503. plainly, the program is making the NEXT I: GOTO 50 command, not you! 40 NEXT I Our research staff has been able to 50 continue with the program uncover a list of new opcodes that There's a very simple answer - POKE distinguish the 6503 as a breakthrough 51,0. Now that doesn't make sense, The problem occurs because the index I in computer technology. because system monitor location 51 and only 9 more indexes can be stored (decimal) is the prompt character. in page 0 locations. The 11th has The list is presented here for your But what you're doing is fooling the nowhere to go, and the OUT OF MEMROY information (and enjoyment). computer. error message appears. Prematurely terminated loops leave the page 0 AO ADD GARBAGE When you interrupt a program that's locations waiting to be completed. BBL BRANCH ON BUR NED OUT LIGHT running in DOS and give any commands The fix in line 30 sets the index to BAH BRANCH AND HANG from the keyboard, the computer then its highest value (10 in the example) takes ALL subsequent commands as BLI BRANCH AND LOOP IN FINITE and the NEXT I before the GOTO BPB BRANCH ON PRO GRAM B UT coming from the keyboard including de-allocates one of the page 0 BP0 BRANCH IF POWER OF F those in the program itself. So if locations. CPB CREATE PROGRAM BUG your program contains any DOS commands CRN CONVERT TO ROMAN N UMERALS that are illegal from the keyboard I made the modification after talking DAO DIVIDE AND OVERFLOW (Open, Read, Write, etc) you'll get to Dick and it works! Thanks, Dick. ERS ERASE READ-ONLY STORAGE the NOT DIRECT COMMAND error message. HCF HALT AND CATCH FIRE P.S.: Leaving the variable names off Just type POKE 51,0: GOTO (linenum), IAD ILLOGICAL AND in NEXT statements significantly and APPLESOFT is fooled into thinking IOR ILLOGICAL OR improves execution speed. that your keyboard instruction (and MDB MOVE AND DROP BI TS all subsequent ones) came from behind MW MULTIPLY WORK the cursor and GOes TO the line. NBC SHOW TER RIBLE PROGRAMS PAS PRINT AND SME AR It's just as useful written into RBT READ AND BREAK TAPE programs. I have one program which RPM READ PROGRAMMER' S MIND uses the STOP command to permit me to AVOIDING LINE RRT RECORD AND RIP TAPE make manual (keyboard) changes in a RSD READ AND SCRAMBLE DAT A data matrix. The line after the STOP RWD REWIND DISK command reads POKE 51,0: PRINT ..., OVERRUNS SRZ SUBTRACT AND RESET TO ZE RO and the program later writes the SSD SEEK AND SCRATCH DISK changed matrix back onto tape. And it TP TEAR PAPER simply will not turn on the disk WED WRITE AND ERASE DATA WID WRITE INVALID OP CO DE without that all-important POKE line BY MAX J. NAREFF in the program. XIO EXECUTE INVALID OP CODE XO EXECUTE OPERATOR XP EXECUTE PROGRAMMER

The beginning programmer, confronted with the AO character line limit, OUT OF MEM frequently finds himself with ungrammatical word spillovers and ERROR IN FP unwanted blank lines. A template is given below for the avoidance of these distortions. BY RANDY FIELDS 10 PRINT" »;

This line must be AO characters or spaces line. Proceed with frequent reference to the template above, I have been plagued, albeit keeping the line lengths within the occasionally, with a mysterious bug in limits outlined by the dots or spaces one of my APPLESOFT programs. The to prevent line spillover. When line program would be happily executing 10 is scrolled away, merely type away, and all of a sudden, a beep and another appropriately numbered line at the bottom of the screen, an 'OUT template. Adjust for changes in the OF MEMORY IN LINE ###' error message number of digits in the larger lines. appeared. I did a PRINT FRE(O) and The original line 10 may be used as had 8K of memory left!! Impossible, the program opener with a "clear you say, as did I. Well, the problem screen" command. The use of the turned out to be "uncompleted FOR-NEXT semi-colon as a 'carriage return loops. suppressor' will prevent the occurrence of a subsequent inadvertant An uncomplicated For-Next loop looks blank as is illustrated. like: 10 PRINT" " 10 FOR I = 1 TO 1 0 20 J = 5 * I 30 IF J = 15 GOTO 50 AO NEXT I 50 continue with the program 2 8 AN APPLE MATRIX

Last month MATRIX or table formation In the previous articles on Matrix MATRIX PART 1 was demonstrated with the use of simulation, the technique of F0R-NEXT loops and double subscripted CROSSFOOTING was demonstrated without variables (also called two dimensional being identified as such. Here now is BY MAX J . NAREFF arrays). This month we deal with a short application with a paired arithmetic manipulation of a MATRIX. Some forms of BASIC provide the matrix array. Reference is made to last month's commands (MAT READ, MAT PRINT, MAT program which developed a table Three service stations have each sold INPUT, etc,) to facilitate display and consisting of 3 rows and 10 columns of out their daily quota of two grades of manipulation of tables of numbers. numbers. The following subprograms gasoline (A&B). How many gallons has Though the MAT commands are should be added to it. each outlet sold (C), and what is the unavailable in Apple Basic, there is a grand total of company sales (T)? substitute. 1. SUM OF ALL MATRIX ELEMENTS 0 HOME : T=0 : REM CLEARS SCREEN : The term "matrix" is used here to 120 T=0: REM INITIALIZES THE T0TALER INTITIALIZES TOTALER denote a two-dimensional array of 130 FOR 1=1 TO 3: REM LOOP FOR ROWS 10 DIM A(3), B(3), C(3): REM RESERVES numbers consisting of horizontal rows 140 FOR J=1 TO 10: REM LOOP FOR COLUMNS MEMORY SPACE FOR EACH ARRAY and vertical columns. A matrix is a 150 T=T+A(I,J):REM TOTALS ELEMENTS 20 PRINT "REGULAR","ETHYL","R+E SALE": grid in which each of the elements 160 NEXT J PRINT (numbers) is given a reserved space or 170 NEXT I 30 FOR X= 1 TO 3 : REM MACHINE LOOP FOR cell In the computer's memory. 180 PRINT:PRINT TAB(4);"SUM OF MAT READING DATA ELEMENTS=";T 40 READ A(X),B(X): REM READS DATA To accomplish this, the matrix is (A-REGULAR,B-ETHYL) first dimensioned. Thus DIM A(12,12) 2. AVERAGE OF ALL MATRIX ELEMENTS 50 C(X)=A(X)+B(X): REM CROSSFOOTING allocates 144 cells in memory for the 60 PRINT A(X),B(X),C(X) 1AA (12*12) cells in the matrix. 120 T=0:K=0::REM INIT TOTAL & COUNTER 70 T=T+C(X): REM COMPUTES TOTAL SALES (Actually since Apple begins 145 K=K+1:REM COUNTS # OF ELEMENTS FOR 3 STATIONS dimensioning from zero the number of AVERAGING 80 NEXT elements In the variable is 13*13, or 190 PRINT:PRINT TAB(9);"AVERAGE OF 90 PRINT : PRINT : TAB 10;"TOTAL FUEL 169 - but who's counting?) ELEMENTS=";T/K SALES= "*T 95 DATA 621!5,433.2,493.8,1217.5,701.8 Following is a simple program using 3. SUM OF INDIVIDUAL ROWS & COLUMNS ,317.6: REM FUEL SALES CAREFULLY doubled digits illustrating how a ENTERED IN PROPER SEQUENCE matrix can be constructed or read from 200 FOR 1=1 TO 3:REM INDEX LOOPS A, B, A, B, ETC data statements in Applesoft. For the 210 FOR J=1 TO 10 sake of brevity the number of rows is 220 REM CALCULATION OF ROW & COLUMN here limited to 3. Try more at your TOTALS computer. 230 R(I)=R(I)+A(I,J) MATRIX PART 4 240 C(J)=C(J)+A(I,J) 250 NEXT J BY MAX J. NAREFF 0 DIM A(12,12) 260 NEXT I 10 DATA 10,20,60,70,90,11,88,A2,32 270 REM LOOPS FOR PRINTOUTS 20 DATA 77,A1,66,19,20,91,72,72,18 280 FOR 1=1 TO 3 30 DATA 36,24,11,30,93,46,66,33,14 290 PRINT TAB (14);"SUM OF ROW MATRIX statements, unavailable in AO DA TA 9 8,16,32 #";I;"=";R(I) APPLE BASIC, reduce the programming 50 FOR 1=1 TO 3: REM INDEX LOOP FOR 300 NEXT I effort required to solve problems ROWS 310 FOR J=1 TO 1 0 involving one or two matrices (tables) 60 FOR J=1 TO 1 0: REM INDEX LOOP FOR 320 PRINT TAB (14);"SUM OF COL by eliminating the need for COLUMNS #$";J;"=";C(J) nested-loops. Large clusters of data 70 READ A (I,J): REM READS DATA FOR 330 NEXT J MATRIX can be managed quickly with single MAT statements. As noted previously, 80 PRINT A(I,J); SPC( 2);: REM PRINTS The terms "MATRIX" and "TABLE" can be AND FORMATS MATRIX ELEMENTS used interchangeably. In subprogram 2 several of these statements can be 90 NEXT J line 145 the counter statement can simulated within APPLE BASIC, and while the effort is more tedious, 100NEXT I also be expressed as K=I*J another selected mathematical operations can form of iteration as the loop uncoils. RUN be performed using nested-loops. In previous issues, the MAT READ and MAT Any component of a MATRIX - whether PRINT statements were simulated and a 10 20 60 70 90 11 88 A2 32 77 single elements or rows or columns - 41 66 19 20 91 72 72 18 36 24 can be manipulated as can several single matrix (table) generated. 11 30 93 46 66 33 14 98 16 32 matrices. Try "PRINT R(1)+R(2)"; Several arithmetic operations were "PRINT R(3)/10" and "PRINT C(2)+C(10)" performed with its contents, both in When the matrix is on screen, the direct and indirect modes. Now, or any combination required. computations may be made in the two small rectangular matrices, each immediate mode. composed of two rows and four columns More next month For Example: of numbers, will be formed and PRINT A(1,5)*A(3,10). arithmetic interactions between them With simple additions to the program illustrated. MAT statements involving all or selected matrix elements may be MATRIX PART 3 addition (or subtraction) and totaled, averaged, sorted, etc. multiplication by a constant will be CROSSFOOTING simulated. Next month: Manipulating the Matrix Elements. BY MAX J. NAREF F Step 1 demonstrates formation of two (2x4) tables labeled MATRIX A & MATRIX As defined by Logsdaon (Programming in B. Here again, the MAT READ & MAT MATRIX PART 2 Basic, 1977) it is the mathematical PRINT statements are accommodated by use of nested-loops. BY M AX J . NAR EFF process of summing the corresponding numbers (elements) of two arrays In pairs, one number from each array. 0 CALL -936 This series of articles is designed to The sum of each paired number appears 10 DIM A(2,4),B(2,4): REM simulate various MAT(RIX) functions, in a third array. Originally used in DIMENSIONS EACH MATRIX statements which are used to simplify computer card processing, the term has 50 PRINT TAB (15);"MATRIX A" the manipulation of large groups of been broadened to include subtraction. 60 FOR R=1 TO M: REM ROW LOOP: numbers. M=2 2 a MATRIX PART 4 (CONT.) FRE(X) FOR INT We don't know what is in the accumulator the first time the call is made to WAIT, so the delay might be 70 FOR C=1 TO N: REM COLUMN LOOP: Here are a couple of quickie one-lines anywhere up to a sixth of a second. N=A to implement while waiting to decide But the call leaves the accumulator at 80 READ A(R,C): REM FROM DATA how next to complicate your program. zero, and subsequent calls to WAIT STATEMENTS take 162 milliseconds each. So thi s 90 PRINT A(R,C);SPC(8);: REM This first one gets you the remaining line of BASIC will create a delay of PRINTS AND FORMATS MATRIX usable memory. It is equivalent to about one second. By changing the 100 NEXT C Applesoft's FRE(X) function. limit on the FOR loop from 7 to 31, »e 110 NEXT R get a delay of five seconds, and to 120 PRINT TAB(15);"MATRIX B" PRINT PEEK (202) + PEEK (203) * 256 - 370 gives a delay of one minute. To 130 FOR R=1 TO M: REM (M=2) PEEK (20A) - PEEK (205) * 256 calculate the proper limit, divide the 1A0 FOR C=1 TO N : REM (N=A) desired delay in seconds by 0.162 and 150 READ B (R,C): REM FROM DATA This one gets you the space taken up prune the result to the nearest STATEMENTS by your program: integer. 160 PRINT B(R,C);SPC(8); 170 NEXT C PRINT PEEK (76) + PEEK (20A) - PEEK For more precision, WAIT must be 180 NEXT R (202) - PEEK(7A) + 256 * (PEEK (77) + called using ASSEMBLY language: 500 DATA 10,20,30,AO,50,10,20,30 PEEK (205) - PEEK (203) - PEEK (75)) 510 DATA 11,13,15,17,19,21,23,25 LDA #nnn,nnn is a value between 0 The difference you get when you and 255 inclusive In step 2, a third MATRIX, C, will be subtract the total of these two JSR SFCA8 ;call WAIT formed by addition of A and B simulating MAT C=A+B functions from the RAM capacity of your machine represents the work space The delay is a shaggy function of the 20 DIM C(2,A) used by the interpreter. It should be value you put in the accumulator (A): 2K (20A8) bytes. 200 PRINT TAB(8);"MATRIX C = Delay in milliseconds = (13 + 12.5*a + MATRICES A+B" 2.5*a*a) / 1023. 210 FOR R=1 TO M Here's yet another program for 220 FOR C=1 TO N determining the length of a basic The divisor is the frequency of the 230 C(R,C)=A(R,C)+B(R,C): REM program - except that this one is in Apple clock in kilohertz, or in other MATRIX ADDITION machine language and is relocatable. 2AO PRINT C(R,C);SPC(8); words, 1/1023 is the length of one 250 NEXT C As it is written, you "CALL 768" to machine cycle in milliseconds. The 260 NEXT R get the length of the commands and formula is valid for accumulator statements you've used without the values between 1 and 255. Oddly enough, 255 and zero both give the In step 3, scalar multiplication is length of the variable table - that demonstrated. In this type of is, you get HIMEM down to PP: maximum delay posible. Here are a few operation, each element of matrix may representative values: be multiplied by either a constant, a 300: 38 A5 AC E5 CA AA A5 AD E5 CB 20 variable or an expression. This step 1B E5 60 ACCUMULATOR DELAY IN is an example of MAT D=(K)*A where K VALUE MILLISECONDS is a constant. AND that's it. 18 1.02 30 DIM D(2,A) 88 20.01 300 PRINT TAB(8);"MATRIX 200 100.21 D=(K)*MATRIX A" WAIT CMD 255 162.OA 310 FOR R=1 TO M BY Q. R. BALDWIN 320 FOR C=1 TO N So don't delay a minute - call WAIT 330 D(R,C)=(K)*A(R,C): REM FOR (C) 1878 now! ! EXAMPLE LET K=5 ALL RIQHT8 RESERVED The dimensions of the matrix on the left of the "equals" sign must be equal to or greater than those on the IA C right side of the equation or else some of the elements may not appear; Loitering inside the Apple System the shape of the new matrix may Monitor is a subroutine called 'WAIT'. change, or more likely, the error sign It is useful for creating timing Fred Wilkinson announces that he's will occur. Where the MAT capability delays inside your programs without trying to reach out to small user exists, it is most useful and the bother of writing special code. groups nationwide (and worldwide) to effective, but it is limited by its Delays of up to one-sixth of a second get together and communicate regarding inability to add or subtract more than are possible, depending on the value the forthcoming formation of the two matrices or to perform some other that is in the accumulator when WAIT International Apple Core. arithmetic. is called. We can't control this value from a BASIC program, but it If you have questions concerning the SCORE ONE FOR THE APPLE: with the turns out we don't have to! Timing International Apple Core's creation or procedures outlined, many matrices can delays from one second to several status of current efforts to get going be added, subtracted, divided, etc. minutes can easily be invoked from please call Fred Wilkinson at The interested reader is invited to either INTEGER or APPLESOFT BASIC. To (415)585-2240, or write to: try these and other options. Note do this we will resort to a subterfuge International Apple Core what occurs where MATRIX A is involving both trickery and cheating. P.O.Box 976 multiplied by MATRIX B. The resultant Daly City, CA 94017 matrix is produced by the The trickery is possible because the multiplication of EACH element of A by accumulator is left at zero when WAIT Now is the time to get involved. the CORRESPONDING element of B (i.e. returns to the program which called C(1,1) = A(1 ,1) * B(1, 1), C(1,2) = it. And a zero in the accumulator A(1,2) * B(1,2) and so forth). In a will create a delay of 162 sense this is a type of "scalar" milliseconds if WAIT is called again. multiplication where the multiplier The cheating is possible because BASIC varies from element to element. doesn't mess with the accumulator in However, this is NOT true Matrix the following tight loop: Multiplication in the language of computer science or matrix algebra, FOR I = 1 TO 7: CALL -856: NEXT I where the rows of one matrix are multiplied by the columns of the second and not by the corresponding elements. 3 0 $ARRAYS IN INT PUT CHARACTER INTEGERS BY JI M DO TY IN PROG RAMS TIMES BY BRU CE TOQNA ZZINI A FRACTION

BY PAUL WYM AN There is a simple way to get around Apple Basic CHR$ Subroutine Function the lack of string array capability in APPLE'S Integer Basic. You can 1 CHS = CHR + 128 * (CHR<128) There are numerous business convert the character to a number and 2 LC1 = PEEK (221): LC2 = PEEK (225) - applications where integer BASIC then pack two characters in one (LC1>213): POKE 79 + LC1 - 256 * addition and subtraction are quite integer value. Consequently, an (Lc2>127) + (LC2 - 255 * (LC25127)) satisfactory.... until you have to integer array dimensioned as A(1000) * 256,CHS: CHR$ = "A": RETURN can hold up to 2000 characters. multiply by a fraction or percentage. Preparations of income tax returns is Apple Basic CHR$ Matrix Function a relevant example. While Applesoft The ASC Function will return a number can handle the fractions it chews up value for a character. This value 1 DIM CHR$(128): FOR CHR = 1 TO 1 28: vital memory data space at more than must be offset since these values are CHR$ = CHR + 128 * (CHR < 128) twice the rate of integer BASIC. too large to use. I used an offset of 2 LC1 = PEEK (221): LC2 = PEEK (225) - Furthermore, most calculations could -159. This made the character "blank" LC15213): POKE 81 + LC1 - 256 * (LC2 be done as integer arithmetic if with equal to 1. Consequently, to >127) + (LC2 - 255 * (LC25127)) * a few handy floating point functions initialize your integer array you 256,CHS: CHR$ (CHR) = "A": NEXT CHR in BASIC. The following function is should set each element equal to 101. useful only for cases requiring Why 101 will become obvious shortly (I Above are two character string multiplication of a whole number times hope). functions for Apple Basic. The CHR$ a decimal fraction. It is not Subroutine function is ideal where few suitable for a chain of successive Two characters are stored in each characters need be called; the CHR$ multiplications due to rapid integer element. The following Matrix function is great for many accumulation of roundable errors. example will demonstrate how this is characters, but takes quite a long Given these caveats, the reader should done. Let's use "at" as the two time to initialize (approx. 1.5 be pleased to note that numerous characters to be packed into A(1). seconds). business calculations are relevant such as worksheet spreads by ASC("A") = 193. LESS 159 = 31. Let's say you wanted to print the percentages, financial ratio analysis, ASCC'T") = 212. LESS 159 = 53. following during your program: "How cost variance analysis, price markups, do you say "Apple" in French?". Here tax calculations, interpolations in Multiply the left character value by is a sample program for the CHR$ rate tables, etc. 100 and add the result to the right Subroutine function: character value. 10 GOTO 1000 10 CHR =31: G0SUB 1: PRINT "HOW DO YOU 20 REM BASIC SUBROUTINE FOR 31 * 100 + 53 = 3153 SAY";CHR$;"APPLE";CHR$;"IN FRENCH?" MULTIPLYING TIME WHOLE NUMBERS Therefore A(1) = 3153 25 IN = 0: DE = 0 : TH0 = 1000 To do the same thing using the CHR$ 30 FOR Z1 = 1 TO 3: Z2 = 101: However, getting the characters back Matrix function, you would do the Z3 = Z2/10 from their integer form is not quite following, having ALREADY executed 10 Z1 = TH0/Z3: Z5 = (PCT MOD Z2)/Z3 as easy since the inverse of ASC does lines 1 and 2 to initialize the CHR$ 50 IN = IN + Z5 * (NUM/Z1) not exist in on the matrix: 60 DE = DE + (Z5 * (NUM MOD ZD * Z3) APPLE. Here is the needed routine: 70 NEXT Z1: IN = IN + DE/TH0 10 PRINT "HOW DO YOU SAY";CHR$(31,31) 80 DE = DE - (DE/TH0) * TH0 First you must break apart the two ;"APPLE";CHR$(31,31);"IN FRENCH?" 82 RETURN character values which are combined in 85 PCT = 125: REM PCT =12.5 the integer array element. Let's use It is important to note that the 88 NUM = 5000 the same value as in the example: Subroutine function is, in fact, a 90 G0SUB 2 0 subroutine, whereas the Matrix 95 PRINT NUM;"*";PCT/101;(PCT A(1) = 3153 function is not. Because the matrix MOD 10) ;"=";IN;".";DE LEFT CHAR VALU E = (A(1)/100)+159 is initialized once and the program 98 END = 193 lines are not called again (because RIGHT CHAR VALUF= A(1) MOD 100 + 159 the data exists in the variable table) = 212 it is not necessary to separate the lines into a subroutine. Now all we have to do is convert these values to their ASCII equivalent IRS AUDI T characters.

You use a string variable which must be the first variable defined in the VAL (X$) USE program. Consequently, you know exactly where in memory this variable resides. To convert the numeric value One use for the VAL(X$) function in to a character, Just POKE its value Integer Basic: into location 2053. For example, if A$ was the first variable defined, the 10 V=0: FOR VL=1 TO LEN (V$): V=V+ following example would work: (ASC (V$(VL,VL)) - 176)* 10LEN (V$)) - VL: NEXT VL: RETURN POKE 20 53, 193 NOW A$ = A Going into the subroutine, V$ will be a number, for example, V$ = "1231" - This seems to work very well and coming out of the subroutine, V will solves a frustrating problem. equal 1231. One use for this is to BUT IT DOESN'T MAKE input using a string function and later convert, so that if the user MISTAKES EITHER hits return with no input, you can give him or' her additional instructions, or Just go on with the program, rather than getting the friendly "?"

3 1 PASCAL

The program we wan t is PASCAL WHO? SINGLE DRIVE •GRAFDEMO.TEXT. ' Type get all the things off the screen except the command prompts. Typing 'T' produces BY GENE WL80N 'TRANSFER?'. Respond with For those of you that are wondering If you've recently bought Apple's ' APPLE 3 : GRAFDEMO. TEXT ' . 'TO "Pascal who?", Pascal was a French WHERE?', answer with Language System and haven't gotten up mathematician and also is a very nice 'APPLEO: SYSTEM. WRK. TEXT' . The and running yet—keep reading. It has modern . A direct probably occurred to you that every computer will now read the requested descendant of ALGOL 60, Pascal was place you saw Pascal being program, and will prompt 'PUT IN designed by in the early APPLEO: TYPE TO CONTIN UE' 70's. It is a clean and elegant demonstrated was done on a 'two drive' system. 'NO SWEAT' you've heard when Do it! language featuring a full set of asked if it works with the one drive If you hadn't cleared the old structured flow of control constructs you have at home. (If it's so easy, SYSTEM.WRK file the system gives one and superb data structuring why don't you have it running?) last chance to save last night's capabilities. It is a "strongly masterpiece by prompting with 'REMOVE typed" language which means that the OLD APPLEO:SYSTEM.WRK.TEXT?'. If this compiler can catch most of your errors In mid-October I visited no less than occurs type 'Y', and get for you. From its origins in academia five Apple selling shops, and in all 'APPLE3:GRAFDEMO.TEXT'. If you had it is now enjoying increasing five two drives were in use for each popularity in the business and Pascal demo--in no cases were the done everything correctly your prompt hobbyist sectors as well. staff and innocent bystanders able to now says ' —>APPLE0:SYSTEM.WRK.TEXT'. run the GRAFDEMO program after Program we want is now where we want Ihe folks responsible for the APPLE unplugging one of the drives. It it. implementation of Pascal (and many occurred to me that possibly the Get out of (filer) by typing 'Q'. Get others, too) are the Institute for Reference Manual would clear this up, into (editor) with 'E'. Prompt says Information Systems at UC San Diego but among the fantastic information •>EDIT... (led by Ken Bowles), a bunch of there was nothing that helped. NO WORKFILE IS PRESENT.FILE?(..' proverbial "good guys" if there ever Type 'SYSTEM.WRK' . was one. Ihey are dedicated to Cheer up. I know of two solutions; Now it is possible to look over the spreading good programming languages the first being to fork over another program at leisure, and in great throughout the real world at minimum five hundred dollars and flaunt a detail. This example was picked for cost. Ihey are very involved in second drive in your neighbor's face. the author BILL ATKINSON'S special computer-aided instruction, too, so This may place your body out in the knowledge of the Apple II's graphic when you obtain your Pascal system you street when the wife gets the capabilities. Bill puts the Apple will also get a wonderful program that checkbook back. through its paces. will teach you the language and how to use it. For the second method read on: Remember the commands in the Editor? For some special features type '9P' I will assume that the directions for and go to PROCEDURE STUFF, which installation of the card and chips bitmaps the butterfly demo. See if were properly followed. Read the you can figure it out (If you can chapters in the Reference Manual write it up we'll put the answer in covering the Filer and the Editor. print). Section 6.2 on Starting up an Apple Pascal System that has only one drive Oh, we can't go this far and give up. must be understood. The most Type 'Q' (to Quit the Editor). If important thing to understand is that you've made changes be sure to with one drive you must switch 'Update' otherwise type 'E' (to Exit) COPYING THE diskettes 20 times to make a copy. the Editor. Type 'R' (to Run). Apple (This tends to 'drive' a person prompts with 'COMPILING...', 'COMPILE towards solution number 1, above). Go WHAT TEXT?'. Type 'SYSTEM.WRK' . BASICS DISK back to your trusting computer store Apple prompts 'TO WHAT CODEFILE?'. and use their two drives to 'fast Type 'SYSTEM.WRK'. copy' an APPLE3, and several APPLEO's The Compiler will now have a field BY GENE WLSON (reason later). day, and will eventually run the program GRAFDEMO. Now it's time to get a sample program, Fellow Core member Phil Bernheim so power up per section 6.2.5. Start So why did we go such a long way to do relates that his new Pascal/Language with APPLE3 in your drive, power up, so little? It would have been easier System gave him fits when he tried to go to APPLEO, press RESET, and to simply place GRAFDEMO up on APPLEO: copy the 'Basics' Disk with a 'Basic' 'WELCOME' message tells all that you then run it. You would also have copy program. He called Apple's hot can read instructions. probably put together a program using line and got the cryptic answer: Now we go to the 'F'(filer) for some the Editor which would have crashed The machine boots up in Pascal. The preliminary play. Go on ahead and due to a lack of available storage on program on the 'Basics' disk is a type 'F'. Prompt line tells story of APPLEO. Removing old programs from Pascal program and must be copied success. Make sure that SYSTEM.WRK APPLEO will certainly become a way of using the 'F ' (filer) portion of your file is gone elsewhere. (If you life. Pascal System. wanted that file it was transferred This is why I recommended that several earlier anyway.) Type 'N' (for new) copies of APPLEO should be made. We Any attempt to copy the 'Basics' disk and prompt says 'THROW AWAY CURRENT can label this diskette as from Basic will simply be futile. FILE?'. Type 'Y' and 'WORKFILE APPLEO:GRAFDEMO. The program can be (Did that sound like a challenge?—of CLEARED' tells us that the dirty deed readily shown by booting up the system course it was. Some Core member has and Running by typing 'R' - I don't is done. probably already found a sneaky way.) Let's take a look at the goodies on know of any other way to keep 3 or 4 APPLE3, by placing APPLE3 in the programs around that can be quickly Our thanks to Phil — his discovery will drive, and typing 'L' (for list). run. I keep a half dozen diskettes certainly aid another member in the Prompt then says 'DIR LISTING OF?' with different programs around. near future, and doubtless other Type '//A' (Surely some one out there knows a little tid-bits are just lurking 'APPLE3: better way?). Similar games can be around the corner waiting to be SYSTEM.APPLE 32 26-JUL-79 played to get the Assembler up and •flushed' into the open. Send the FORMATTER.CODE 4 4-MAY-79 running, but that's the subject of anybody else's article. APPLE3 also Cider Press Staff your latest FORMATTER.DATA 6 22-JUN-79 suggestions, tips, traps, etc., and contains program DISKIO which will we'll get the whole thing out to the help with disk use and setting up membership. 3 2 files in Pascal. SMGLE DWVE (CONTJ FORTH

As a practical matter I've thrown the 'PASCAL User Manual and Report' (supplied with System) into a dark Did you know that two of your Apple corner, and in its place I recommend Core members, John Draper and Mathew 'A Practical Introduction to PASCAL' Mcintosh, are marketing one of the by I.R. Wilson (no relation), fastest languages that will run on the available at Computerlands. The Apple? language is explained in better detail, and seems to put more emphasis FORTH is a relatively unknown and yet on examples. There is certainly powerful programming language based on nothing wrong with the supplied a dictionary structure. It allows the 'Problem Solving Using PASCAL', and programmer to "define" new words into the 'Apple Pascal Reference Manual' is the dictionary using previously fantastic stuff, but much more is defined words to accomplish any needed. programming task. It's possible to have more than one "program" in RAM at In conclusion, Apple Pascal with a the same time, and one only needs to single drive is limiting, but still type in its name to execute it. workable. With two drives the system is not only workable, it's a dream, so FORTH is 20 times faster than BASIC if you're into 'REAL' systems, Apple and is a disk-based system using very Computer will be glad to sell you simple disk read/write commands. The another drive! system features Include:

1. Powerful screen editor 2. Decompiler-used to generate to some extent a source listing of a precompiled FORTH word. PASCAL 3. Utility package-used to aid the user in fast software development. A. Self Documentation-built Into the LOWER CASE system to allow an inexperienced programmer to use it. WITH DA N PAYM AR'S CHIP If interested, contact:

BY CR AIQ VAUQ HAN CAP'N SOFTWARE P.O. BOX 575 SAN FRANCISC O, CA 94101

Here is a program to modify BIOS to ^ It Wow K work with Dan Paymar's lower case adapter. It has not been prepared to download. ev"1*-

ENJOY! A

Craig

(* PROGRAM TO MODIFY THE BIOS MODULES *) (* TO W ORK WITH DAN PAYMAR'S LOWER CASE ADAPTER *) (* DEVELOPED AND TESTED BY CRAIG VAUGHAN *) (* COPYRIGHT WAIVED *)

PROGRAM UPDATE ;

VAR

BLK: PACKED ARRAY(0. .511) OF 0..255; (* BLOCK TO HOLD BIOS CODE *) BLT, (* # OF BLKS TRANSFERRED * ) BLN: INTEGER; (* BLOCK # TO READ <4> *) S : FILE; (* FILE ID *) SRC : STRING; (* FILENAME *)

BEGIN

SRC:="SYSTEM.APPLE"; (* FILE CONTAINING BIOS *)

RESET (S,SRC); (* OPEN I T *)

BLN := A; (* READ BLOCK #4 *) BLT := BLOCKREAD(S,BLK, 1,BLN); (* READ IT *) IF VOV THINK 8fclN<( H IS BLK(232) := 234; (* NOP CASE CONVERSION ») IDAiCtT* BLK(233) : 234; (* » " « *) easy, Now BLK(235) := 127; (• CHANGE CHARA CTER MASK *) THf >!#• XAT-HOO BLT := BLOCKREAD(S,BLK,I,BLN); (* WRITE IT BACK OUT *) WANTS Aj, CLOSE (S,L0CK); (« CLOSE AND LOCK IT *) PRINTER// mo**!-' END. (» ALL DONE *) MACHINE * LANGUAGE

Enter the monitor with the command — The L0MEM:3072 is necessary to move DEFOG ILLEGAL 'CALL—151'. Type in the hex location, the Integer variable storage above the high order bit first like this: Page 2 area so you can write to It. CHARACTERS BFDAL. The 'L' is added to give you a 40 address memory display like this: BY GERRY VRO OMMAN BFDA- 08 :8 BYTES IN LINE 8FDB- 05 00 ••LINE NUMBER 5 LOW SETTING BYTE FIRST BFDD- 62 :PRINT TOKEN BFDE- B1 00 :NUMBER FOLLOWS REGISTERS BFEO- 40 :00 40 HEX = 16384 Illegal characters are those handy LOW BYTE FIRST little program commands you would like BFE1- 01 :END OF LINE TOKEN BY JOHN ARKLEY the Apple's Integer BASIC interpreter to accept upon entry without something like a 'SYNTAX ERROR' or '>32767 Change the print token '62' to the ERROR' response. HIMEM: token '10' by entering 'BFDD: A CALL instruction in BASIC g ets you 10 and list the memory again with to a machine language subroutine, but The Apple's Integer interpreter will BFDAL to check that the token has the various registers in the 6502 reject line numbers greater than 32767 changed. Re-enter BASIC with a CNTL-C processor are up to fate - here's how and the commands listed in Table 1. and list and run the program to set them. Some notes: The memory locations Any machine program may be called by TABLE 1 above have been given for a 48K POKING the values into the addresses machine without DOS. Notice that the shown below S the program address into program has been relocated to 3FD5' PC and PC+1 (low order first) and then COMMAND HEX CODE after running. Locating a line in the enter it via a CALL. This is the same middle of a program is a little too as a GO comman d in monitor mode. tricky to explain here. Ask someone LOAD 04 from one of the stores how to do it. The following program demonstrates SAVE 05 These illegal creative programming this by using the monitor subroutine CON 06 aids are far too many to cover in this PRBYTE that prints the A r egister as RUN 07 article. Micro Magazine has a good two hex bytes at the next position on DEL 09 article in its May 1979 issue to help the screen. HIMEM: 10 understand the BASIC token system. LOMEM: 11 Good Luck!! Your subroutine must be sure that NEW OB decimal mode is off upon return to CLR OC This little program should help expand BASIC else it will blow up by going AUTO OD your knowledge of text Page 2. into a loop printing on the screen and MAN OF beeping. This bit of the P register >L0MEM:3072 may be cleared before doing the CALL The ability to trick your Apple into >TEXT by poking P with a zero or the desired accepting these illegal commands lies >LIST value for the P register insuring that in following this sequence: 10 POKE -16299,0:REM GO TO PAGE 2 bit 3 is off. 20 REM ROUTINE FOR CLEARING THE (1) Determine the program location HASH BIT MEANINGS for the line/command you wish to 30 REM WHILE LETTING YOU WATCH enter. (Beginning, middle, or end). 40 FOR X=2048 TO 3071 7 6 5 4 3 2 1 0 50 POKE X,160 NO B D I Z C (2) Find the existing program line to 60 FOR 1=1 TO 100:NEXT I MSB LSB change. 70 NEXT X 80 REM ROUTINE TO PRINT TO PAGE 2 BIT MEANING OR, 90 VTAB 1 MSB 7 Negative result 100 POKE 41,PEEK (41)+4 6 Overflow Bit (3) Enter a dummy line, if necessary. 110 PRINT 'THIS IS TEXT PAGE 2 5 Unused 120 REM PRINTING WITHOUT SCROLLING 4 Decimal mode on (4) Enter the monitor. 130 FOR Y=2 TO 23 3 Break inst 140 VTAB Y 2 Interrupt disable (5) List the line in the monitor. 150 POKE 41,PEEK(41)+4 1 Zero result bit 160 PRINT 'LINE';' '+Y LSB 0 Carry bit (6) Change the command/line number 170 NEXT Y hex code. 180 VTAB 23 PROGRAM 190 POKE 41,PEEK(41)+4 100 A=69: X=70: Y=71: P=72 (7) Return to BASIC, list and test 200 PRINT TAB(10)'TYPE TEXT TO 200 PC=58: G0= -327 the command. RETURN' 300 REM APPLESOFT GO = 65209 999 END 350 REM MONITOR ADRS = SCCB9 400 POKE PC,218 Here's an example of entering HIMEM in 450 REM POKE PC, SFDDA a program: SOME NOTES: 500 POKE PC + 1,253 600 HOME >LIST 700 FOR L=0 TO 15 10 PRINT 'LINE ONE' --LINE 50: The #160 is the Integer 750 FOR 1=0 TO 15 20 PRINT 'LINE TWO' token for 'space'. This prints a 800 V=L * 16 + I 30 END blank in each screen location. It 820 POKE A,V works with Applesoft as well. 830 POKE P ,0 840 CALL GO HIMEM should go at the beginning of a --LINE 100 & 150: This POKE,PEEK 850 NEXT: PRINT: hE*T program. Monitor locations CA.CB list combo is Andy's solution to printing 900 END the beginning of an Integer program. on Page 2. A dummy line should be entered like this —LINE 90 & 140: Since Page 2 doesn't scroll like Page 1, VTAB's are >5 PRINT 16384 necessary to position each line. 3 4 SOUNDS & SOUND AND MUSIC

4. Perhaps this is a good time to METRONOME ALF MUSIC call on the monitor's mini-assembler. Still in the monitor mode, type

Anyone out there into music? Want to BY TOM KOTOWSK * F666G do it with ALF MUSIC BOARDS? Want to know more about them and what to do The bell will ring and a "!" prompt with them? So does Dave. He has will appear. Type in the following Here Is a quickie I wrote for my three boards, hardware tempo control addresses and instructions. Don't daughter who needed a metronome for and an "Apple II". Dave has forget the colons; don't forget to music class. (I have an Apple and experimented with press "return" after each entry. don't need to buy one). envelopes-subroutines-sound effects, etc., and wants to get together with ! 800:JMP 0837 10 CALL -936 other 'computer musicians'. If ! 812:JMP 0815 20 X=PDL (1) interested, call Dave days, phone ! 818:JMP 081B 30 FOR 1=1 to X (4-15)992-9051, a.m.'s. ! 82C:JMP 082F AO PRINT X ! 832:JMP 0835 50 NEXT I ! 83C:LDA 87F,Y 60 PRINT REM CTRL G WITHIN QUOTES ! 84B:LDA 87F,Y 70 GOTO 20 ! 854:LDA 87F,Y BETTER SOUNDS ! 86D:JMP 0870 ! 87A:JMP 087D BY JAMES HOCKENHULL The move is complete and the routine Any Apple sound routine that works by is ready to be used in its new BETTER TONE toggling the speaker on and off can be location. Played through an amplifier made more versatile by toggling the it will sound a great deal richer than cassette-out jack instead. Via a through Apple's 2" speaker. Save the BY PAUL WYMAN patch cord, the sound then can be run routine on disk or tape (* 800.8E4W) from the jack to an amplifier where for application in future programs. its quality and volume will be much improved. To use the relocated MUSIC routine, BE SURE TO SET L0MEM: 2376 to keep the program variables from overwriting the The subroutine on page 45 of the red Here's an easy way to move the routine. There is a sneaky "illegal" manual is one of the simplest ways to Programmer's Aid MUSIC routine out of way to do this with a deferred command generate a "musical" note on the ROM into a handy location at the from integer BASIC, but that's another APPLE. However, the duration of each bottom of user memory, and modify it story. note is limited by the fact that only to play through the cassette-out jack: one byte is allotted for the Beyond setting L0MEM, simply use it as "duration" variable. You will 1. Move the Programmer's Aid routine to address 2048 ($800 hex; L0MEM) you would the normal Programmer's Aid probably find the maximum duration program. TIMBRE, TIME, and PITCH keep inadequate for some notes if you are using the monitor's MOVE function. In their same addresses. Just assign reproducing a medium or slow tempo the monitor, type MUSIC = 2048 rather than -10473. song. The typical way to overcome this is to use a loop. However, you * 80050 THEN N (I) = N(I)+1: NEXT I same as the one described in the 60 N(1) = 255: RETURN Check it out with another * 800L Reference Manual except the pitch (P) 70 REM USE THIS ROUTINE IN YOUR (return). The functional changes have and duration (D) are passed in memory PROGRAM BY SELECTING A NOTE NUMBER been made. But now it is necessary to locations 768 and 769 (decimal)» FROM 1 TO 48 change all of the absolute branch respectively. 80 REM AND THEN: P=N(P1): POKE 0 ,P: addresses in the program. They're POKE 1 ,D; CALL 2 still referring to locations back in To implement, follow the directions in 90 REM P1=N0TE 1 TO 4 8; D = DURATION the ROM chip where they came from. the Manual on pages 43 and 44 and substitute the following on page 45. FOR NOTE 3 6 TONE FOR FP (CONT.) 0000- Holds number to be converted 0001- Holds resulting 32000 PO KE 7 70,173: POKE 771,48: "1" or "0" POKE 7 72,192: POKE 773,136: 0002-18 CLC Shift routine POKE 7 74,208: POKE 775,5: begins by clear­ POKE 7 76,206: POKE 777,1: ing CARRY FLAG POKE 7 78,3: POKE 779,240 0003-66 00 R0R $00 Rotate the con­ tents of location 32005 POKE 7 80,9: POKE 781 ,202: $00 to the right POKE 7 82,208: POKE 783,245: CARRY FLAG holds POKE 7 84,174: POKE 785,0: contents of LSB. POKE 7 86,3: POKE 787,76: 0005-B0 05 BCS $05 Branch if CARRY FLAG set, to $0C POKE 7 88,2: POKE 789,3: to process a 1 POKE 7 90,96: RETURN 0007-A9 00 LDA #00 Else load a 0 and 0009-85 01 STA $01 store it at $01, Figure 2. BASIC "POKES" 000B-60 RTS and return to the calling program 25 PO KE 76 8,P: POKE 769,0: 000C-A9 01 LDA #01 CARRY FLAG was set CALL 770: RETURN so, load a 1 and OOOE-85 01 STA $01 store it in $01, Figure 3. GOSUB 0010-60 RTS and then go back to the calling PGM D TO A & A TO D

BY PA T CAFFREY D/A CONVERTER

0 DRIVER=100: WAIT=299: BITTEST=500: A=1: BITCHANGE=520: SHIFT=2 Recently I got fascinated with the I/O 1 PRINT "BL0AD D/A.BIN.A$0.L$10": game port in the Apple. I built a REM LOAD MACHINE LANGUAGE ROUTINE wire extension cable and brought the 2 POKE 16,6 * 16: REM THIS IS port out of the Apple to my workbench. REPLACED I F YOU HAVE NO DISK BY Then I proceeded to make a set of So much for the background. Of what 16 POKE STATEMENTS light emitting diodes (LEDs) turn on 6 REM THE "SWITCHES" FOR THE OUTPUTS and off, pulse and even to display use, you ask? Well, you don't need to change voltage levels 20,000 times a IN THE 1 /0 PORT binary counts. 10 DIM OFF(3): X=-16296: FOR 1 =0 TO 3 second. The same thing may be done at : OFF(I)=X: X=X+2: NEXT I intervals of one second or one day. The very interesting results of that 20 DIM ON(3): FOR 1=0 TO 3: 0N(I)=0FF exploration were worth the trouble. I And, of course, you may stop and hold the rise and fall of the output (I)+1: NEXT I highly recommend it if you have the 25 REM INITIALIZE SWITCHES "OFF" interest and are willing to buy the voltage at any of the ladder levels. You acquire the ability to control the 30 FOR 1=0 TO 3: POKE 0FF(I),0 - few IC sockets and wires necessary. outside world in more than a simple NEXT I No e xternal power supply was required, on-off fashion. What you do with that 90 REM THIS IS THE UP-DO WN DRIVER although some care must be taken not control is a matter of need, ingenuity 100 FOR NUM=0 TO 15 to draw too much current. and time. 110 GOSUB BITTEST 111 VTAB 21: TAB 20: PRINT NUM;" During this period I got hold of a 115 GOSUB WAIT copy of the Apple Organ. Again, What I have done is to provide a 120 NEXT NUM fascination. The sounds produced by program which does the functions 130 GOSUB WAIT this program are more realistic than necessary to make the voltages rise 132 GOSUB WAIT what I had heard before on the Apple. and fall at predictable rates. You 140 FOR NUM=14 TO 1 STEP -1 Normally the Apple music has a may try such applications as seem 141 VTAB 21: TAB 20: PRINT NUM;" "brassy" tone because it is all interesting (model train speed 150 GOSUB BITTEST created out of square waves. What the control), necessary (stepper motors 160 GOSUB WAIT Apple Organ does is to use a DIGITAL - for your solar heater) or just 170 NEXT NUM TO - ANALOG converter to shape the instructive. 180 GOTO DRIVER waveforms from square waves into sine 299 REM WAIT-CHANGE, HERE'S WHERE YOU waves. The Apple Organ includes There is a machine language component CHANGE RATE OR JUST STAY AS YOU simple, clear instructions for to the program. I have commented on ARE building the D-to-A converter with it as best I can and hope it is clear 300 IF PEEK (-16384) > 127 THEN 360 four resistors, some wire and just the to you how it does what it does. game 1/ 0 socket. 320 POKE -16368,0 Here is the resistor schematic I used. 350 FOR N =1 TO A: NEXT N: RETURN I searched through my pile of 360 POKE -16368,0: INPUT "ENTER NEW resistors and did not find the values RATE (0-255)",A: GOTO 350 AN 2 AN1 AN0 specified. I made up some from what I AN 3 500 REM OUTPUT TO I /O PORT had. The results were adequate, about 501 POKE 0,NUM 30 percent distortion of the 501 REM "NUM" HOLDS D IGITAL NUMBER TO waveshapes produced with the actual CONVERT Apple Organ resistor values. 505 FOR D=3 TO 0 STEP -1 510 CALL SHIFT: REM THIS IS THE Drawing A shows a normal square wave, MACHINE LANGUAGE ROUTINE TO SHIFT B n ormal sine waves, C a "ladder" of BITS TO ME MORY SLOT "1" voltages and D an image of a single All resistor values are 1K ohm. 515 GOSUB BITCHANGE reconstructed sine wave. The fact is 516 NEXT D: RETURN that the components average the ladder MACHINE LANGUAGE COMPONENT 519 REM CONVERSION "BITCHANGE" voltages and approximate a sine wave. 520 C= PEEK (1): IF C=1 THEN POKE ON At the machine language rate of the This entire subroutine simply moves (D) ,0 Apple Organ there is plenty of time to the least significant bit of a byte 530 IF C#1 THEN POKE OFF(D), 0: construct up to 20,000 waveshapes per and stores a 1 or 0, depending on the RETURN second which is just about the upper contents of the CARRY FLAG, into the 531 REM IF SL0T"1" = 1 THEN TURN THE range of human hearing. There is even location $01. In the BASIC program PORT BIT "ON" IF THE SLOT = "0" time left over to select tones, the "BITCHANGE" routine PEEKs the THEN TURN THE PORT BIT "OFF" timbre, and other musical attributes. contents of $01 back out. 600 END SUP'R'TERfllinm

SUP'R'TERMINAL IS AN 80 COLUMN BY 24 LINE PLUG-IN COMPATIBLE BOARD FOR THE APPLE II COMPUTER

& FEATURES

• 80 Columns by 24 lines, upperand lowercase; all 128 • Can be used with APPLE II communication interface ASCII characters. board to act as self contained terminal for time­ sharing or other applications. Terminal program • Upperand Lower case data entry using the APPLE II supplied when used with a D.C. Hayes micromodem. keyboard. • Includes an Upper and Lower case 5x8 dot matrix • 3K bytes of bank switched static ram ASCII character set, and inverse alpha characters. • 2K bytes of ROM • Expands existing keyboard for more ASCII • The only board with continuous direct memory characters mapped screened ram. • Character set can be user definable • The only board that interprets VTABS by firmware • Includes VBC™ (video balancecircuit) which enables (version 2.2) the use of displaying 80 columns on an inexpensive 8 MHz CRT monitor • The only board with an adjustable scrolling window. • Works with LEEDEX monitor (version 2.2) and other • The only 80 column board that is synchronous with inexpensive CRT monitors the APPLE II

• Shift Lock Feature • Fully programmable cursor • KEYPRESS function for PASCAL programs supplied • Conversion program supplied to modify existing • Works with APPLE PASCAL and APPLE BASIC APPLESOFT programs to work with SUP'R'TERMI­ • Incorporates PASCAL and BASIC control characters NAL (automatically converts HOME.CALL-936 and VTABS) (version 1.0) • Follows protocols of PASCAL and BASIC operating systems • Works with the new Easywriter and APPLE PI word processors. • ALL monitor-type escapes are valid • Compatible with ALL APPLE II peripherals. • Uses less current on the +5V supply than any other 80 column board • Effective baud rate greater than 10,000; fast scrolling and clearing • Works with CORVIS hard disc system

' APPLE li is a trademark of APPLE Computer Co. APPLE PI is a trademark of Programma International Easywriter is a trademark of Information Unlimited Micromodem is a trademark of D C. Hayes PATENT PENDING M&R ENTERPRISES P.O. BOX 61011, Sunnyvale, OA 94088 MODIFICATIONS

3 9 CR DELAY Now return to basic with (3D0G) * * *WIRING CHANGES* * * PHOM APP LE COWUTER CO. SAVING THE PROGRAM TO D ISK: First you must determine which wire your printer uses to indicate a The program must be in memory before printer busy or buffer full condition. This program inserts a variable delay the printer can be used with the Your printer's manual should contain after a carriage return to allow time delay. Save the program by typing: this information or contact the for the printhead to get back to the manufacturer. Examples: left margin without missing BSAVE CR DELAY,A$390,L$2C IDS 125/225 PIN A (may be pin5) characters. DOS 3.2 is required to HEATH H-1A PIN A use this modification. USING THE PRINTER: TI-810 PIN 11 SPINTERM PIN 19 The first time you want to use the SOFTWARE ENTRY COMPRINT PIN 20 First you must decide which slot the printer you must load the program and The preferred place to do the wiring interface will go in and enter the initialize the interface. From change is in the cable, but it can delay program. The program is command mode type: also be done at the card or the customized for this slot number and printer. Disconnect the wire between won't work if used with a different BL0AD CR DELAY pin 2 of the printer and pin 2 on the slot. Enter the program using the CALL 912 Serial Card. Then connect the wire values from the table for words in with the printer busy signal to the brackets, <>. This may be done from a program by wire for pin 2 on the Serial Card. entering: SLOT 1 2 3 A 5 6 7 * * *S0FTWARE PATCH* * * CODE C1 C2 C3 CA C5 C6 C7 100 PRINT D$;"BL0AD CR DELAY": CALL Next you must decide which slot the 912 interface will go in and type in the PARALLEL COM CARD SERIAL (assuming that D$ is a control D). software patch. The patch is TYPE 02 05 07 customized for this slot number and If you want to switch back to the won't work if used with a different DELAY. The delay is measured in video monitor for output then type: configuration. The patch forces the tenths of a second and entered in hex. PR#0 computer to look to see if the printer Hence 5 is 1/2 second and A is one or from a program enter is busy and wait if it is. Enter the second. The usual default value is 5. 200 PR#0 patch using the values from the table for words in brackets, <>. Enter the monitor with call-151 and Then to reconnect the printer, all type: that is required is: SLOT 1 2 3 A 5 6 7 CALL 922 390:A9 DATA 90 AO B0 CO DO E0 F0 or from a program enter CODE C1 C2 C3 CA C5 C6 C7 : 20 95 FE 300 CALL 922 :A9 80 Enter the monitor with CALL -151 and :20 ED FD NOTES: :A9 A5 If the delay needs to be adjusted from type: : 85 36 BASIC, It can be done with the command 3B0:A9 :A9 03 POKE 955,. The delay in this : 20 95 FE :85 37 case is in decimal. Then BSAVE the :A9 00 :AC EA 03 program as explained. :20 :20 ED FD :A9 C5 :C9 8D If this program is to be used with the :85 36 :D0 0E Serial Handshake Modification, first :A9 03 :AD BB 03 enter the Serial Handshake mode; then :A8 enter the Carriage Return Delay : 85 37 : AC EA 03 :A9 C2 program and :20 A8 FC :2C CO :68 POKE 93A,197 -.30 FB :AC 07 :E9 01 POKE 935,3 :D0 F5 BSAVE CR D ELAY,A$390,L$2C : 00 00 00 :60 : Use these instructions to turn the To check your typing, type 3B0L -and compare your listing to the one below printer on and off. To check your typing, type (390L 3BB) for slot 1. and compare your listing to the one below for slot 1 and a Parallel Printer• I nterface. 03B0- A9 01 LDA #$01 03B2- 20 95 FE JSR $FE95 0390- A9 01 LDS #$01 HANDSHAKE 03B5- A9 00 LDA #$00 0392- 20 95 FE JSR $FE95 FROM APPL E COMPUT ER CO . 03B7- 20 ED FD JSR SFDED 0395- A9 80 LDA #$80 03BA- A9 C5 LDA #$C5 0397- 20 ED FD JSR $FDED 03BC- 85 36 STA $36 039A- A9 A5 LDA #$A5 The High Speed Serial Interface card 03BE- A9 03 LDA #$03 039C- 85 36 STA $36 cannot run faster than 300 baud on 03C0- 85 37 STA $37 039E- A9 03 LDA #$03 most printers due to a lack of a 03C2- AC EA 03 JMP $03EA 03A0- 85 37 STA $37 printer busy line. This modification 03C5- 2C 90 CO BIT $C090 03A2- AC EA 03 JMP $03EA uses the existing data input line to 03C8- 30 FB BMI S03C5 03A5- 20 02 C1 JSR $C102 sense if the printer is busy and 03CA- AC 07 C1 JMP SC107 03A8- C9 80 CMP #$8D inhibit output if necessary. DOS 3.2 03CB- 00 BRK 03AA- DO 0E BME 03BA is required to use this modification. 03CC- 00 BRK 03AC- AD BB 03 LDA $03BB 03CD- 00 BRK 03AF- A8 PHA * * *WARNING* * * 03B0- A9 C2 LDA #$C2 Damage to the Serial Interface card Now return to BASIC 'w ith 3D0G. 03B2- 20 A8 FC JSR $FCA8 may not be convered by your warranty. 03B5- 68 PLA If you aren't sure of the signal * #• * SAVING PATCH TO DIS K* * * 03B6- E9 01 SBC #$01 levels and pinout of your printer, The patch must Ibe in memory before the 03B8- DO F5 BNE $03AF find out or get someone who knows to printer can be used at the higher help you. 03BA- 60 RTS speeds. Save the patch by typing 03BB- 05 4 0 BSAVE PATCH,, A$3B0, L$20. HANDSHAKE (CONT.) APPLE MOD'S

* * HJSING THE PRINTER* * * The first time you want to use the This application brief details a printer you must load the patch and simple modification which allows your TOP VIEW initialize the interface. From Apple II to accept industry standard immediate mode type- 2716 (2Kx8-bit) Eraseable Read - Only - Memories (EPROM's) in sockets "DO" & BLOAD PA TCH COLOR TOM "D8". These sockets correspond to CALL 944 memory addresses DOOO - DFFF.

This may be done in a program by - EPROM's (2716) are readily available 100 PRIN T D$; "BLOAD PATCH": CALL 944 through most semiconductor (D$ = CO NTROL D) PW4 distributors. Many distributor To tur n off printer use PR#0. locations are equipped to program the EPROM's to your specifications, and Then to reconnect the printer, all will do so for a moderate fee. that is required is CALL 954 or from a program 300 CALL 954. 1. Remove the 'E0' ROM from its socket. On the TOP side of the board, * * *N0TES* * * under the 'EO' socket, cut the ROM pin If the printer does not print after 18 jumper trace. Then reinsert the GROUND the CALL 944, it is probably sending ROM. This cut will isolate pin 18 or the opposite polarity busy signal. ROM 'DO' & 'D8' from pin 18 of the The p atch can be changed to recognize other ROM. Reinsert the 'EO' ROM when with done. POKE 968, 16 If this doesn't work, have the printer checked. FIG. 1 The modification allows the speed, column w idth, and other variables to be changed with the POKEs In the COLOR BURST manual.

Cut this trace

TO F14 PW 4

2 On the UNDERSIDE of the Apple COLOR KILL board, cut the traces connecting pin *1.6K 20 to 21 of ROMs 'DO' & 'D8' only. BY LARRY DANIEL80 N —r-AA/VA— 3. (Underside) Cut the trace going to pin 18 of ROM 'D8' near the chip. i Scrape solder resist off of For you pioneers who bought your C3 ' C2 2 approximately 1/4 inch of the APPLES before the color killer remaining trace not still connected to modification was put in and if you now pin 18. You may wish to tin it with use a color TV for a monitor, then solder since it will later be this article may interest you. soldered.

Take two parts, a 2N3904 transistor 4. (Underside) Connect pin 18 of ROM (or an e quivalent) and a 1.6K resistor '08' to pin 12 of ROM 'E0' (ground). and solder them to the breadboard section of your APPLE as in Fig. 1. -A/WV— 5. (Underside) Connect pin 18 of ROM The transistor base and the free end 'EO' to the trace which previously of the resistor should be tied FIG. 2 went to pin 18 of ROM 'D8' (and which together. Take some hook-up wire and should be pretinned if step 3 was go from the other free end of the followed). resistor to IC #FU-pin k. With another piece of wire go from the 6. (Underside) Connect pin 21 of ROM transistor collector to the color • 08' to pin 21 of ROM 'DO'. Then trimmer point. Take a third piece of USER FIRMWARE connect both of these to pin 24 of wire and go from the transistor either ROM (VCC). emitter to ground of the capacitor APPLE APPLICATION NOTES next to the edge on the corner. 7. Note that the INH control function (pin 32 on the Apple 1/0 BUS Pi9* 2 is the schematic of the two connectors) will not disable the 2716 parts and how they tie into the APPLE NOTE: The modification described in EPROMs in the 'DO' & '08' ROM slots, system. To test the final product, the following instructions will void since pin 21 is a power supply pin and just put it back together and turn it not a chip select input on the EPROMs. un. Go into BASIC, type GR, then type the warranty on your APPLE II. 'EXT. The screen should go from color 8. EPROM (2716) devices may now be To blac k and white. There are times when you may want to create your own firmware for the Apple used in sockets 'DO' & 'D8' II. Such firmware can be tailored to your special needs and then installed NOTE: IF YOU MAKE THIS MODIFICATION, semi - permanently so that it can be DO NOT INSTALL A ROM CARD OR THE used as conveniently as Apple BASIC or LANGUAGE SYSTEM BEFORE REMOVING THE the Monitor. DEVICES IN SOCKETS 'DO & D8'.

4 1 (A9—9 ) * 6 COLOR MOD SOFT5 APPLE APPLICIATIO N NOTES (A10-1)- VCC

o (NULLIFIES WARRANTEE) A9-15"*- A9-2

14M (A10-11) Applies only to APPLES with serial numbers below 6000 (REV 0 PC BOARD). s P C

1. REMOVE THE APPLE IX PC BOARD FROM (A9-1) Q s ITS ENCLOSURE Q Q (a) Remove the ten (10) screws securing the plastic top piece to the metal bottom plate. Six (6) of these GND 0 are flat-head screws around the perimeter of the bottom plate and four 74LS74 74LS02 (4) are round-head screws located at the front lip of the computer. All are removed with a Phi1lips-head (B8-14) (A8-6 )* screwdriver. Do not remove the screws securing the power supply or nylon (B8-7) (A8-13)* insulating standoffs.

(b) Lift the plastic top piece from the bottom plate while taking care not (b) Cut traces going to the following DUMPLINGS to damage the ribbon cable connecting IC pins on the bottom of the APPLE-II BY ED AVELAR the keyboard to the PC board. This board. Each pin should have a single cable will have to be disconnected trace going to it. BE CAREFUL!! This article describes an easy from one end or the other. construction project which will allow A8-1 A9-1 you to save programs from the APPLE to (c) Disconnect the power supply from A8-6 A9-2 six (6) or more cassette recorders the PC board. A8-13 A9-9 simultaneously.

(d) Remove the #6 nut and lockwasher (c) Connect A8-15 to ground (A7-8 on Actually the circuit can accommodate securing the center of the PC board. the keyboard socket is a nearby as many as (18) recorders, thru the These will not be found on the earlier ground). use of (Y) connectors. It is also I computers. possible to install (18) MIC jacks (d) Mount the 74LS74 and 74LS02 as per initially and jumper them in groups of (e) Carefully disengage each of the 6 step (b) of the 'above the board' three (3). nylon insulating standoffs from the PC wiring method. board (7 on earlier versions). The circuit consist of one (1) 7^LS67 (e) Wire the circuit of the 'above the (Tri-state hex buffer) IC, pins 1 and (f) Lift the PC b oard from the bottom board' wiring method, step (c). All 13 are tied low in order to keep the plate. wires are on the bottom of the APPLE device in the (non) tri-state mode. II board, and no IC pins need be The IC should be mounted in a small removed from their sockets or be aluminum box along with the required 2. ABOVE BOARD WIRING METHOD soldered. MIC jacks and an LED (optional). (A) lift the following IC pins from The LED monitors the actual dump and their sockets. 4. Reassemble the APPLE II and make indicates if you are properly sure it is operational. If not, check connected to IC (K13). A8-1 all wiring very carefully. Make sure A8-6 that all chips are in their sockets To connect the dumper to APPLE I I an A8-13 IC test clip was used; thus no hard or A9-1 and properly oriented. direct wiring is necessary. The test A9-2 clip is attached to K13 inside the A9-9 5. The following color values are now APPLE II by locating pin /M and applicable to the HI-RES subroutines. placing the test clip over the IC; this can be performed even if the (b) Mount a 74LS74 (dual c-d computer is powered up. flip-flop) and a 74LS02 (quad NOR BLACK2 128 ORANGE 170 gate) in the APPLE I I breadboard area With a program loaded in the computer (All to AH region). BLUE 213 WHITE2 255 put the recorders in record mode and type save; the LED will come on (c) Wire the following circuit ('' indicating the save has started, and indicates that wiring is to a pin it will go off when done. which is out of its socket). For example, the program below draws an orange line from (10,20) to (200,140). It is assumed that the Additional features can be added to HI-RES routines are already in memory the dumper. For example, You could 3. BELOW THE BOARD WIRING METHOD locations $800-$bff. (for neater appearance) add a MIC & MIC pre-amp, thus allowing you to narrate to all recorders 0 XO=YO=COLR (a) Desolder all pins of socket A8. simultaneously. And you could add a 5 INIT=2048: PL0T=2830: LINE=2836 (6) receptacle (AC) strip controlled Lift the socket and its 74LS257 IC off 7 ORANGE=170: CALL INIT by a switch; this would allow you to the PC board taking care not to destroy it. Cut the trace between 10 X0=10: Y0=20: C0LR=0RANGE: CALL leave all recorders in the record mode and allow simple control of many pins 6 and 13 of A8 on the top side of PLOT 20 X0=200: Y0=140: CALL LINE the board. Also cut the trace between recorders. 30 END pins 13 and 15 on the top. Reinsert socket A8 and the 74LS257. In conclusion, any wire can be used between the dumper and the clip. Be BE CAREFUL!! sure to identify pin 01 on the clip. A good way is to burn a mark on the clip with a soldering iron. DUMPLINQ8(C0NT)

% 1 10 II 12 13 H -1 w V r tOK

. iotc

THE 1 50 15 SEC RESET FIX BY K EN 8ILV ERMAN

You are right at the end of a 16K program in memory and have not saved it to the disk yet or writing a text file and four pages later - you hit "reset".

Well you can try to retrieve it by many meth ods like "" program, or if you have the Auto Boot ROM you probably have not lost it.

No ma tter what it is a nuisance when we h it the RESET key, and we all hit it by accident once in a while. Now try this little 15 cent fix, and the only time RESET will be pressed is when you WANT to do it.

Remove the key cap for RESET, picture 1.

2. Get yourself a 7/16 in I.D.-5/8 in 0*0. 0 Ring, Sears model **2-22517 - picture 2.

Place the 0 Ring over the switch under the cap, picture 3.

Put the key cap back on.

Now it will take some pressure to Press the key. NOTE: This modification might void your Apple II warranty. QuihDirt Product Information \ 4 Management Planning & Decision Maki ng (for 32K or 48K APPLE II with Applesoft Basic in ROM)

•PRODUCTI ON SCHEDULING

Minimize Total Processing Time, N Jobs on 2 Machines Minimize Total Processing Time, N Jobs on 3 Machines Minimize Total Processing Time, N Jobs on M Machines Minimize Number of Late Jobs, N Jobs on 1 Machine Minimize Total Processing Time, N Jobs Technologically Ordered Minimize Weighted Completion Times, N Jobs on 1 Machine Minimize Worst Case of Latene ss, N Jobs on 1 Machine Minimize Slack Time to Lateness, N Jobs on 1 Machine

ft INVENTORY CONTROL

Economic Order Quantity for Constant Demand No Shortages Allowed Economic Order Quantity for C onstant Demand, Shortages Allowed Economic Order Quantity for Uncertain Demand, Shortages Allowed Economic Order Quantity for S tocking Strategic Spare Parts Economic Order Quantity for T ime-Varying Demand, No Shortages Decision on Whether or Not to Stock an Item In-Process Inventory Forecasting Cash Replenishment Model

ft CAPITAL BUDGETING (Project Selection)

Defining Projects Defining Resources Defining Payoffs per Project Defining Amounts of Resources Reguired for each Project Projects Possible Subject to Resources Available Projects Not Possible, Subject to Resources Available Sensitivity Analysis of Project Payoffs Sensitivity Analysis of Resource Availabilities Sensitivity Analysis of Resource Requirements per Project

ft DISTRIBUTION PLANNING

Transportation Sources (Supply) Transportation Destinations (Demand) Transportation Shipping Costs Optimal Selection of Routes Warehouse Location Generalized Network Flows \Nyman associates 421 SEVILLE WAY SAN MATEO CA 94402 (415)345-0380 • SUGGESTED RETAIL PRICE-. $ 100 GRAPHICS GRAPHICS

To begin, get into Integer BASIC. Then enter the following: Next, set up the HIRES screen. Do 0 REM LOMEM:3072 ANIMATION this by typing 'POKE -16297,0 RETURN1, .200 POKE-16300,0: REM FLIP TO PAGE #1 and 'POKE -16304,0 RETURN'. You will 210 REM COPY PAGE #1 TO PAGE #2 BY CHRI8 QARRIQUE8 now see one of two things: either a 220 POKE 60,0: POKE 61,4: REM START screen full of little colored dots ADDRESS OF PAGE #1 that look like they have been smashed 230 POKE 62,255: POKE 63,7: REM END together, or a screen that has white ADDRESS OF PAGE #1 horizontal lines running across it. You may be aware of articles in the 240 POKE 66,0: POKE 67,8: REM START These lines may have a few green CIDER PRESS or CONTACT that mention ADDRESS OF PAGE #2 vertical lines running under them. 'Page 1' and 'Page 2' of display in 250 CALL -468: REM DO THE COPY connection with animation. I hope to 260 POKE -16299,0: REM FLIP TO PG. #2 The next step is to get the cursor make the use of these pages of screen back. To do this, we will simply a little more clear. Line 0 is to remind you of the above. clear the bottom four lines for text. Line 200 turns your view to 'Page 1'. Just type 'POKE -16301,0' and press First of all, when you power-up you Lines 220 - 240 state where the pages RETURN until you see the cursor. are viewing 'Page 1' and continue to are located. do so unless you use HiRes graphics Line 250 does the actual move. You now want to clear the screen to (which uses two pages of its own) or Line 260 turns your view to 'Page 2'. black. To do this you must make e very run a program like the one to be line number in the monitor starting at outlined. Please note my flowchart: 2000 HEX (8192 in decimal) and ending at 3FFF (16383 in decimal) contain the But first, let's start with a program START value of zero. By simply typing in that only uses 'Page 1' and should be the clearing program, the screen will fairly clear: be cleared to black. What happens SET GRAPH­ when you run this program is that the 10 GR : REM GRAPHICS MODE ICS MODE & value of zero is given to location 20 CALL -936: REM CLEAR TEXT WINDOW CLEAR TEXT 2000, then 2001 (8193 in decimal), 30 FOR X=0 TO 1 9: REM LOOP X & Y WINDOW then 2002 (8194 in decimal), and so on COORDS until the for-next loop reaches 3FFE AO FOR Y=X TO 19: REM ODD RANGE IS TO or 16383 in decimal. Now run this AVOID PLOTTING OVER ITSELF PUT PICTURE program (it takes 30 seconds to run). ON PAGE 1 50 C0L0R=((((ABS(20-X)-Z)*(ABS(20-Y) You are now ready to plot yourfirst -Z)/25)M0D 16)+16) MOD 16: REM HIRES point. Type 'POKE 8192,45 and THIS HORRID FORMULA COMPUTES THE hit RETURN. This is the same as DISPLAY COLOR typing 2000:2D in the monitor. In the PAGE 1 60 PLOT X,Y: REM PLOT ALL REFLECTIONS upper left hand corner of the screen a 70 PLOT Y,X line segment will appear. Actually 80 PLOT 39-X.39-Y you could have typed 'POKE (any number 90 PLOT 39-Y.39-X COPY PAGE 1 between 8192 and 16383) then a comma, 100 PLOT 39-X,Y TO PAGE 2 and any number between 1 and 255'. 110 PLOT 39-Y.X For this example, however, we w ill use 120 PLOT X,39-Y DISPLAY 'POKE 8192,45'. 130 PLOT Y,39-X A line segment appeared on the screen 140 NEXT Y,X: REM GO BACK FOR NEXT PAGE 2 because you told the computer to put SQUARE 2D(45 in decimal) into location 2000. 145 CALL -936: REM CLEAR TEXT ON PAGE In this mode, any value above zero and PAGE#1 You should see that except for the less than 255 that is in memory from 150 VTAB 22: TAB 20: PRINT Z: REM first time you are looking at 'Page 2' 2000 to 3FFF will cause a dot or a PRINT Z while the picture is being put on line to appear on the screen. 160 Z=Z+1: REM MOV E ALONG Z AXIS 'Page 1'. This way the picture seems 170 IF Z=183 THEN Z=-161: REM IF I to jump from one picture to the next Now that you understand how to plot DON'T STOP I WILL GET A >32767 instead of being drawn on. HIRES points, there is something that ERR From this basic flow-chart all simple you should know. After you get to the This program Just plots colors animation can be done. end of the top line you jump down to determined in line 50 on the screen. the 64th line. This is due to the way Lines 64 through 130 plot all Also, if you break the program while the screen is set up. Henceforth, reflections so I can just compute 1/8 on 'Page 2' you need to flip back to when the computer plots your picture, of the screen and plot it eight times. 'Page 1' before you can see what's it will plot line one, then line As it is, you can see the points as happening. sixty-four, then line one hundred and they are plotted, but suppose I wanted twenty-seven, then line two, and so it to just flash from one step to the next. HIRES GRAPHICS If you plan to make pictures, then you First you must type: >L0MEM: 3072 should know that when you type 'POKE "X" ,"Y " ' that the computer will find (To help you visualize what this BY JOHN UHLEY "X" and then draw from "X" over "Y" means, turn to the memory map on Page units. These units number from 1 to 136 in your red manual.) 255(FF) and are divisions of "X" (see fig. 1). For example, a 'POKE Before typing this, LOMEM equals 800 NOTE: JOHN WAS 13 WHEN HE WROTE THIS 8192,255' won't draw from 8192 to 8447 HEX, which puts your variables in ARTICLE. (or 8192 + 255). It will draw to 'Page 2' so your screen and variables 8193. Therefore a 'POKE 8192,127' interfere with one another. One or If any of you "Apple-Owners" are will draw a line about half way to the other must be moved. Since 'Page interested in how to plot points and 8193. Therefore, a 'POKE 8192,0' 2' is there due to hardware it can't how to create 'interesting' patterns erases everything on line segment be moved, so obviously we have to move using the super Hires graphics that 8192. This is because the computer the variables. Typing 'LOMEM: 3072' you set up by typing 'POKE -16297,0 can't plot from zero to zero. moves the variables to COO HEX (or RETURN, and 'POKE -16304,0 RETURN', 3072 decimal). then this article is one that you With this information you can create might want to read. interesting pictures, and Intricate designs (with the help of for-next loops). HIRES GRAPHICS (CONT.) HIRES

This number, in a way, is replaced by 255 units STILL LIFE the value of HC0L0R. The command 1 1 1 HC0L0R=X (where X is a number between 8192 8193 8194 BY JOHN UHLEY 0 and 7) assigns the seguence that you start and step by. What I mean by ALL PROGRAMS ARE IN INTEGER BASIC: In the monitor, memory locations 2000 this is that there are seven colors through 3FFF stands for a very small (see Fig. B). Each time the computer CLEARING PRO GRAM line on the HIRES screen. This "line" plots a dot, it steps seven times, is made up of 255 sections (Fig. A). skipping six colors each step (Fig. 10 EOR CLEAR = 8192 TO 1 6383 Depending on the number (X) stored in C). So there will always be a small 20 POKE CLEAR, 0 a memory location between 2000 and "space" (the six unused colors) 30 NEX T CLEAR 3FFF, a different "colored" dot, or between all HORIZONTAL lines. This is 40 EN D group of dots, will be seen on the NOT always true with vertical and screen. To explain, let's assume that diagonal lines because there is no RANDOM DO TS memory location 2000 contains FF (255 space between each vertical line (Fig. in decimal). If this occurred, a D). 10 POKE - 16297,0: POKE -16304,0 white line (actually many dots) would 20 FO R CLEAR = 8192 TO 16383 stretch from 2000 (0) to 2000 (255). When you type 'HPL0T num1, num2', a 30 POKE CLEAR, 0 If memory location 2000 contained 2D single dot appears on the screen. 40 NEX T CLEAR (127 in decimal) then a group of Likewise, when you type 'HPL0T num1, 50 N1 = RND(8192) + 8192 "colored" dots would appear from 2000 num2 to num3,num4' a line, made up of 60 N2 = RND(255) (0) to 2000 (127). In other words, a dots, will appear on the screen 70 POK E N1, N2 series of dots will appear on the starting at num1, num2 and ending at 80 GOTO 50 screen starting at the memory num3, num4. What the computer does to 90 END location, "dot" zero, and ending at make these lines is to compute the correct values, and store these values the memory location "dot" X. JUST FOR FUN in the correct memory locations. In order to change the value stored in After it has done this it returns control to the program or programmer. 10 POKE - 16297,0: POKE -16304,0 a memory location, from basic, you 20 FOR CLEAR = 8192 TO 1 6383 have to either 'POKE in' a new value Hopefully, you now know how to use the 30 PO KE CLEAR , 0 or use the HPL0T command. To 'POKE HGR, HC0L0R, and HPLOT commands. If 40 NEX T CLEAR in' a new value you need two things. you are still not sure about how to 50 G = 6: REM BY CHANGING G YOU GET First, you need the memory location use these commands, try the three A OIEFE RENT PICTURE you want to 'POKE into' (converted programs given later in this article. 70 FO R TR = 1 TO 255 into decimal), and second, you need After you have done those programs try 80 FO R TY = 8192 TO 1 6383 STEP G the decimal value you want to 'POKE 90 PO KE TY, TR in'. An example of this is 'POKE making one of your own. 8192,127'. This stores 2D (127 in 100 NE XT TY Now that you know how to make HIRES 110 NEX T TR decimal) in memory location 2000. pictures you might want to know how to 120 EN D save "still-life" pictures you make. 130 RE M G = 100 AND G = 91 ARE If you don't understand how to 'POKE I do not mean making a program, saving INTERESTING in' values from basic, or how the it, and running it again. I mean values stored in memory locations 2000 saving the picture that is in memory WHITE OUT SCREEN through 3FFF affect the length of the from 2000 through 3FFF. "dots" or "lines" appearing in the 10 POKE - 16297,0: POKE -16304,0 screen, I suggest that you read As you know when you tell the computer 20 FO R T = 8192 TO 163 83 HIRES0LUTI0N GRAPHICS, Page 46. to HPLOT a line it computes the 30 PO KE T ,0 correct values to store somewhere 40 NEX T T When you type 'HGR' AND HIT RETurn, between 2000 and 3FFF. Depending on 50 FO R SERT = 8192 TO 16 383 the computer "GOSUBs" into a special the value, different colored dots and 60 PO KE SERT, 255 machine language subroutine, via the lines appear on the screen, therefore 70 NEX T SERT command tables. This machine language if you save these values, you would be 80 EN D subroutine performs several functions. saving the "blueprint" to your One of its functions is to LoaD the picture, and if you loaded in this Accumulator (LDA) with memory "blueprint" you would be locations C050 and C057. This "turns-on" the HIRES screen. Another reconstructing your picture! of its functions is to clear the If you don't have a disk, all that you screen to black. It does this by SCREEN CLR storing zero in memory locations 2000 have to do, after you make your thru 3FFF. As you know the computer picture, is to hit the key marked draws from the memory location "dot" RESET, hook up your recorder, type 20 00 . 3FFFW, start the recorder BY BIL L SHRYOCK zero to memory location "dot" X(where X is the amount stored in that memory playing, hit the key marked RETURN, location). Obviously, it is not wait for the cursor to appear, and >LIST possible to draw from zero to zero. rewind the tape. Therefore, any memory location 10 DIM C$(21) containing zero will be a black space If you have a disk all that you have to do, after you have made your 20 C$ = '2001<2000.3FEEM E88AG' on the screen. If all the memory 30 PO KE 81 92,0: REM POKE 8192,255 TO locations starting at 2000 and ending picture, is to type "TEXT" (if you are WHITE OU T SCREEN at 3FFF contain zero, then the entire not in text mode), and type 'BSAVE 40 FO R 1 =1 TO 21 HIRES screen will be black. (whatever you want to call your 50 PO KE 511 + I , ASC(C$(I)) program) ,A$2000, L8192' and hit 60 NEXT I As you know, when you type "POKE num1, RETurn. When the disk stops your 70 CAL L -144 num2", num2 (converted into hex) is picture has been saved. stored in num1 (converted into hex). Just be sure to set 'HIMEM: 8192' As previously mentioned, you can "POKE All that you have to do to see your before you run the clear routine. in" a number from basic, or you can picture, if you don't have a disk, is use the HPL0I command. If you use the to hit the key marked RESET, hook up Since this routine uses the system HPL0T command "POKE num1" is replaced the tape recorder, type C050 C057 monitor move command to clear the by one of the three versions of the 2000.3FFFR, turn on the recorder, and screen it clears the screen much HPLOT command (see Table A.). This hit RETurn. When your picture is faster than the system in John's leaves you the number that you want to complete, turn off the tape recorder article. store in your memory locations. and rewind the tape. 4 7 HIRES E (CO NT.) COLOR POKE 21 HIRES COLORS

If you have a disk, all that you have The following program was on our to do to load your picture is to type August 1979 DOM (Disk Of the Month) 'HGR1 (RETurn) and 'BLOAD (whatever you called your program),V0'(REIurn). For those of you who have any need to LIST When the disk stops, your picture will desire to POKE colors into a lo-rez 20 HGR 25 FOR C=39 TO 139 STEP 2 be completed on the screen. program, you can do so by putting the 30 XCUR=5 color into location $30, which is 50 FOR A=1 TO 6 As a last word, I'd like to add that decimal 48. The following chart shows 60 FOR B=A TO 6 you can view your picture in Integer which numbers to POKE in for which 70 HC0L0R=A:HPLOT XCUR.C TO Basic by loading it in, and typing colors. XCUR + 10,C 'POKE -16297,O'(RETurn) and 'POKE 80 HC0L0R=B* HPLOT XCUR,C + 1 -16304,0' (REIurn). DECIMAL COLOR XCUR + 10,C + 1 90 XCUR=XCUR + 12 ALL PROGRAMS IN FP 00 Black 100 NEXT B,A,C 17 Magenta 110 END 10 HGR 34 Dark Blue 112 REM BY ANDY HERTZFELD AFTE R AN 20 HC0L0R = X 30 HPL0I RND(1)*270,190 51 Light Purple 113 REM IDEA BY D. ALDRICH GIVEN 10 100, 68 Dark Green 114 REM TO SF APPLE CORE 7 /79 RND(1)*190 85 Grey 115 REM TYPED BY KEN SILVERMAN 40 X = X + 1 102 Medium Blue 116 REM AS READ TO H IM BY SCOT 50 IF X + 1 = 8 IHEN X = 1 119 Light Blue 117 REM K AM INS WHILE PAUL WYMAN 60 GOTO 20 136 Brown 118 REM WAS TALKING TO THE AUTHOR 70 END 153 Orange 119 REM DURING THE TIME 21 MEMBERS 170 Grey 120 REM WERE PRESEN T AT VILLAGE 187 Pink 121 REM ELECTRONICS. THANKS TO ALL 10 HGR 204 Green 122 REM INCLUDING MY MOT HER. 20 HCOLOR = 5 221 Yellow PS - The smaller the color TV screen 30 HPLOT X,100 TO 0 ,0 238 Blue/Green the better this looks - if you have a 40 X = X + 2 255 White color monitor around this looks great. 50 GOTO 30 60 END

10 HGR TEXT SCRN MAPS 20 HCOLOR = 6 PAGE-FLIP 30 FOR T = 1 TO 20 ADDRESSES SHOWN ARE FOR THE FIRST CHAR 40 X = X + Y BY QLEN H O A Q IN EACH L INE - LINES ARE 40 CHRS. LONG 50 HPLOT X,Y 60 Y = Y + 2 70 NEXT T PAGE ONE LINE # POKE ADDRESS 10 REM DEMONSTRATION OF THE PROCEDURE 00-— 1024 TABLE A TO MOVE PAGE 1 TO PAGE 2 OF BASIC 01 -— 1152 02-— 1280 20 REM 28 JANUARY 1979 — 1408 HPLOT X,Y--HPLOT's a single HIRES 03- 30 REM BY GLEN C . HOAG 04-— 1536 point 40 REM PROGRAM FLOW 05- 1664 HPLOT X,Y TO E ,R--HPL0T's from X,Y to 50 REM (1) SET UP PAGE 1 SCREEN 06- 1792 E,R 60 REM (2) SET UP POINTERS FOR PAGE 1 07- 1920 HPLOT TO X,Y—HPLOT's from the last 08- 1064 START 1192 plotted point to X,Y. 09- 70 REM (3) SET UP POINTERS FOR PAGE 1 10- 1320 END 11 - 1448 80 REM (4) SET UP POINTERS FOR PAGE 2 12- 1576 START 13- 1704 90 REM (5) CALL MONITER MOVE ROUTINE 14- 1832 15- 1960 100 REM (6) POKE THE SWITCH TO DISPLAY 16 1104 PAGE 2 17 1232 110 REM 18 1360 120 REM 19 1488 130 REM 20 1616 F I a . A 21 1744 140 REM STEP (2) 22 1872 150 POKE 60,0: POKE 61,4: REM POKE 23 2000 VALUES FOR A1 160 REM STEP (3) PAGE TWO F I a . B 170 POKE 62,255: POKE 63,7: REM POKE LINE # POKE ADDRESS VALUES FOR A2 (CONTAINS $07FF) 00-— 2048 1 2 3 4 6 6 7 180 REM STEP (4) 01 — 2176 l | | 1 1 1 1 1 02 - 2304 190 POKE 66,0: POKE 67,8: REM POKE 03- 2432 VALUES FOR A4 (CONTAINS $0800) F I Q. C 04- 2560 200 REM STEP (5) 05- 2688 210 CALL -468: REM MONITER MOVE 06- 2816 1 2345671 2345671 2944 ROUTINE LIVES AT $FE2C 07- Min irri Bin m m mm 08- 2088 220 REM STEP (6) 09- 2216 225 CALL -936: REM CLEAR PAGE 1 10- 2344 230 POKE -16299,0: REM TURN ON PG.2 11 - 2472 F I Q. D 235 PRINT "THIS IS PAGE 1" 12- 2600 240 FOR 1=0 TO 1000: NEXT I 13- 2728 14- 2856 250 POKE -16300,0: REM TURN ON P G. 1 15 2984 260 FOR 1=0 TO 1000: NEXT I 16 2128 270 GOTO 230 17 2256 18 2384 19 2512 20 2640 21 2768 22 2896 3024 4 a 23 UTILITIES UTILITIES

0 REM [ "BSTAT" VERSION 7 ] 1 POKE 71, PEEK (76): POKE 75 LAZARUS SLOT #'S AS , PEEK (77)-8: CLR 2 M = 150 - PEEK (77):H = 169:SL = 181 VARIABLES :LL = 163:H=H-M:S = 1 ^ZSeilr- BY ANDY HERTZFELD 3 DIM F$(50),H$(16),Z$(50):H$ ="0123156789ABCDEF": IF H<128 BY FRA NK FISHE R This article describes LAZARUS, a THEN 1:S=-1:H=K-H:PTCH=0: IF PEEK (977)=191 THEN PTCH=189 short machine Language program which can resurrect inadvertently erased In/Out slots can be specified as 1 SA=S*K*H+SL+PTCH:LA=S*K*H+LL+ BASIC programs. variables! These can then be defined PTCH once, and then used anywhere In the When a BASIC program is erased, it is 5 PRINT D$;"NOMON C,I,0": TEXT program. In BASIC, the statements ^ ^ usually not destroyed. It is probably : CALL -936: VTAt B 3: TAB 8 might look like this: CALL I: PRINT " "(B)FILE STARTING stlu sitting around somewheres In ADDRESS ": PRINT : TAB 9: PRINT memory; however, the BASIC ^interpreter 100 PR = 1:REM PR I S SLOT# OF PRINTER no longer knows where to find it, so " AND LENGTH DELIMITATOR " it is effectively lost. LAZARUS scans 7 CALL N: PRINT : TAB 16: PRINT 110 PL = 3:REM PL IS SLOT# OF PLOTTE R through memory trying to find the "[ BSTAT ]": VTAB 10: TAB 10 largest valid BASIC program that it : CALL I can. If it finds one it resets the 8 PRINT " HEX OR DEC ADDRESSES " interpreter's pointers to point to the : CALL N: CALL G: PRINT : TAB found program, thereby resurrecting 15: PRINT "[H] OR [D] ?" 100 PR#PR:PRINT "THE PRINTER IS IN it. If no valid program is found an 9 P= PEEK (-16381): POKE -16368 error message will be printed. In SLOT ";PR ,0: IF P=196 THEN 10: IF P= either case, control is returned to 200 THEN 12: GOTO 9 This might be a useful way to BASIC interpreter. 10 GOSUB 18: GOSUB 22 eliminate the enforced "convention" of 11 TAB T+8: PRINT ",A";A;",L"; having the I/O slots fixed. (I don't If there are many program fragments L;: GOTO 15 know if this would be practical for floating around the workspace, it 12 GOSUB 18: GOSUB 22:X=A might not resurrect the one you are disk drive I/O slots however). 13 GOSUB 21:T=T + 8: TAB T: PRINT Program documentation might include a interested in. if you had performed ",A $"; : GOSUB 30 some deletions of low-numbered mention of what statements define the X=L: GOSUB 21: TAB T: PRINT I/O slots, and then all programs might 11 statements prior to the erasure, it ",L$";: GOSUB 30 be easily customized. Both Applesoft may restore the deleted lines along 15 PRINT " ,V ": PRINT " CALL II and Integer support this. with the rest of the program. If your A: VTAB 23: TAB 11 program was located in an unusual part CALL I: PRINT " TO RUN 'CALL " 16 of memory, it may not know where to ;A ; : CALL N: CALL G look for it. In practice these VTAB V-1: LOMEM:2018: END 17 problems are rare; LAZARUS should be PRINT D$;"CATALOG": PRINT : 18 successful most of the time. "RANDOM" BUG CALL G: IF P=196 THEN 20 19 PRINT " FILE NAME ? [H]": GOTO The code for LAZARUS is relocatable 21 since all of its branches are relative V= PEEK (37): PRINT " FILE NAME BY JAMES SUITS 20 in page zero. $300 seems to be a ? [ D ] " ; convenient place to load it. You can VTAB 11: TAB 7: INPUT F$: PRINT 21 load it for the first time by going D$;"BLOAD";F $:V = PEEK (37): The DOS 3.2 System Master Diskette into the monitor mode and typing: RETURN contains a program called RANDOM for 22 A= PEEK (SA)+K* PEEK (SA+1) demonstrating a small inventory :L = PEEK (LA)+K* PEEK (LA + 1 control scheme (pp. 86-88 of the ): VTAB V: CALL -958 HEX DUMP 300.390 Manual). If you have trouble with 23 PRINT " BSAVE ";F$;:T= LEN( running this program replace ST in F $): RETURN line 290 with BW;",";ST. 21 B=X MOD K: GOSUB 28 25 B=X/K: GOSUB 26: RETURN 0300- A9 FF DO 02 A9 00 85 FO 26 A$=H$(1+B/16,1+B/16) 0308- 85 F1 20 89 F6 BO 3A EO 27 B$=H$(1+B MOD 16,1+B MOD 16 0310- 35 13 01 00 16 1A 00 17 ): RETURN 0318- 1C 00 66 36 32 67 37 22 B/BSTAT 28 C$=H$(1+B/16,1+B/16) 0320- D7 03 59 12 05 07 F8 22 29 D$=H$(1+B MOD 16,1+B MOD 16 0328- FO 38 39 E8 18 D3 02 18 ): RETURN 0330- A9 31 H D5 07 12 27 D1 30 T = T + 3: IF A$="0" THEN 31: PRINT 0338- 05 OE 21 FO 39 68 31 E1 Yes this month we bring you another A$;B$;C$;D$;:T=T+1: RETURN 0310- 61 D1 05 01 29 38 01 E3 BSTAT. There have been loads of 0318- 22 FO 31 D9 06 D1 F1 F1 BSTATs in the past, but we think this 31 IF B$="0" THEN 32: PRINT B$ 0350- F1 11 05 00 81 D1 06 OD is the best ever. Last month's two ;C$;D$;:T =T + 3: RETURN 0358- E1 10 FF 00 D1 02 CO 21 BSTATs were great, but this time we 32 IF C$="0" THEN 33: PRINT C$ 0360- D6 05 BC 01 EF 29 32 E2 combined the best features of both... ;D$;:T=T+2: RETURN 0368- B1 31 18 FO 00 68 06 01 33 PRINT D$;:T =T +1 : RETURN 0370- 21 DA 02 AB 21 3A 21 3B This one (B/BSTAT) should work on any 31 REM ********************** 0378- 29 3C 01 A3 2A 06 12 11 size system and is located out of the 35 REM * HERTZFELD'S "BSTAT" 0380- CA 00 2B 71 11 1C 00 2C way of most programs. 36 REM * MODIFIED BY 0388- EO 71 00 20 3A FF 1C 03 37 REM * WEYMAN FONG 0390- EO 00 20 2D FF 1C 03 EO A neat feature is that you have your 38 REM * GLEN C HO AG choice of either hex or decimal 39 REM * FOR THE APPLE CORE Once it has been loaded it can be output. 10 REM ****************** * * * * * saved by typing 300.3A0W and then 11 REM subsequently loaded back in by typing It gives you a catalog of the disk so 12 REM MODIFIED TO OPERATE IN BOTH 300.3AOR (for type use). For disk it you can enter the name of the desired 13 REM VERSIONS 3.1 AND 3.2 DOS can be saved with, "BSAVE program exactly with a cursor move and 11 REM BY G. C. HOAG ON 10 JUN 1979 LAZARUS,A$300,L$3AO" and of course for save the program with a second cursor loading "BLOAD LAZARUS". move. The call code is also given for 6 0 running the program.. The program, which I call EDIT+, exits A. To deactivate EDIT+, press the LAZARUS (CONT.) in two versions, each of which is RESET key. (EDIT+ will also be listed below. The DISK version is to deactivated by PR# and IN# commands be used whenever DOS 3.2 has been from BASIC). booted and is active; otherwise, the TAPE version is to be used. The DISK Special note for RAM APPLESOFT users: LAZARUS is very easy to use. After version resides in memory from $300 to losing a program, enter the monitor $3CF and the TAPE version resides from To use the TAPE version of EDIT+ in and load LAZARUS. Then return to $300 to $3C3. In order to avoid conjunction with a RAM APPLESOFT BASIC and CALL 768 or CALL 772. The unpredicable results, EDIT+ must be program, the last two bytes of the former will cause the longest program deactivated (by pressing RESET) before TAPE version must be changed from 03 segment In workspace to be restored; using these memory locations for any EO to 00 00. This will ensure a the latter will cause the last to be other purpose. proper jump back into APPLESOFT selected. When i t returns, do LIST to immediate execution mode when CTRL C see what is found. If both entry Either version of EDIT+ is to be is pressed after the output to the points recover the wrong program, you loaded into memory starting at video screen has been frozen. can adjust LOMEM & HIMEM and try location $300. For details on how to again. enter machine language code into How EDIT+ works: memory, see page 68 of the APPLE II Reference Manual (red book). The EDIT+ program uses the APPLE II input and output hooks in order to The detailed operating instructions invoke the editing and stop list for EDIT+ are as follows: features. For details of the algorithms involved, see the annotated QUICKIE TIP 1. After EDIT+ has been loaded into dissembled listing reproduced below. memory, the TAPE version can be saved SY Q L E N H 0 AQ to tape by entering the command 300.3C3W from the system monitor. The HEX DUMP (DISK VERSION) DISK version can be saved to diskette >CALL-151 by entering the command BSAVE EDIT+, To access the assembler directly from A$300, L$D0 from BASIC immediate *300.3CF basic: execution mode. 0300- A9 13 85 38 A9 03 85 39 CALL -2A58 2. To activate the TAPE version of 0308- 85 37 A9 A7 85 36 A9 00 To re turn to basic from the assembler: 08 ED IT +, load it from tape via a 0310- 85 08 60 20 1B FD 2A BT 300.3C3R command from the system 0318- 30 OB C9 9B DO 59 A9 !$ (CTRL C) (RETURN) DO monitor, enter the command 300G, and 0320- 85 08 A9 9B 60 C9 C9 DO then enter BASIC by entering CTRL C 0328- OA A9 CA 30 2A C9 CA DO (or OG for RAM APPLESOFT programs). 0330- OA A9 C2 30 1C C9 CB DO To activate the DISK version, enter 0338- OA A9 C1 30 1A C9 CD the command BRUN EDIT+ from BASIC 03A0- OA A9 C3 30 OC C9 C5 DO EDIT + 03A8- OA A9 C5 30 OA C9 C6 DO Immediate execution mode (or enter FF BLOAD EDIT+, press RESET to enter the 0350- OB 2A 08 70 OD A8 A9 0358- 85 08 68 60 A8 A9 00 85 WHO N1EDS AUTOS TART ROM system monitor, and then enter the 0360- 08 68 85 09 68 85 06 68 command 300G3D0G). 0368- 85 07 68 A9 31 A8 A5 07 3. To use EDIT+, follow these 0370- A8 A5 06 A8 A5 09 60 C9 0378- 91 DO 07 A9 21 85 21 A9 procedures: TAKEN FROM AP PLEORAM 0380- AO 60 C9 9A DO 2 0 AA 2A Freezing, continuing, and halting 0388- B1 28 A8 E6 2A E6 2A A5 output to the video screen: 0390- 2A C5 21 BO OC C6 2A 68 (a) Press CTRL S in order to freeze As a ll APPLE I I PLUS users and other 0398- 90 00 02 E8 DO E8 AC 62 the output to the video screen. owners of the AUTOSTART ROM c hip know, C9 (b) Press any key in order to 03A0- FD 68 C6 2A C6 2A 60 the editing features which that chip 8D continue the output to the video 03A8- 8D DO 1E A8 AD 01 CO provides are tremendously superior to 03B0- 11 CO 1 0 1A C9 83 FO 1A screen after it has been frozen. those found on the ordinary APPLE II 03B8- C9 93 DO OC AD 01 CO 10 (c) Press CTRL C in order to halt system. In particular, it allows the 03C0- FB 8D 11 CO C9 83 FO OA the output to the video screen and user to easily freeze or terminate 03C8- 68 AC FO FD 68 AC DO 03 enter BASIC immediate execution mode. output to the video screen and it also eliminates the need to repeatedly HEX DUMP (TAPE VERSION) press the ESC key In order to perform Pure cursor motions and screen clears: Press ESC in order to activate the multiple pure-cursor movements. 5CALL-151 cursor-motion and screen-clear keys. Since I write a lot of BASIC programs The cursor-motion and screen-clear *300.3C3 I knew that these features would be of keys and their functios are as great use to me, but before rushing follows: 0300- A9 13 85 38 A9 03 85 39 out to buy the chip I decided to try I — Move cursor up 0308- 85 37 A9 9B 85 36 A9 00 to write a machine language program J — Move cursor left 0310- 85 FE 60 20 1B FD 2A FE which would duplicate these features. K — Move cursor right 0318- 30 OB C9 9B DO AD A9 BF M — Move cursor down 0320- 85 FE A9 9B 60 C9 C9 DO The program that I have come up with E — Clear to end of line 0328- OA A9 CA 30 2A C9 CA DO not only allows for the 'AUTOSTART' F — Clear to end of page 0330- OA A9 C2 30 1C C9 CB DO editing features, but also for two 0338- OA A9 C1 30 1A C9 CD DO additional useful features: To deactivate the cursor-motion and 03A0- OA A9 C3 30 OC C9 C5 DO screen-clear keys, press a key other 03A8- OA A9 C5 30 OA C9 C6 DO 1. By pressing a control character, than I, J, K, M, E, or F. This key 0350- OB 2A FE 70 OD A8 A9 FF it is possible to quickly copy over will not be displayed. 0358- 85 FE 68 60 A8 A9 00 85 text from the current cursor position 0360- FE 68 85 FF 68 A9 31 A8 to the end of the line, thus Copying over text to the end of a 0368- A5 FF 60 C9 91 DO 07 A9 eliminating the need to repeatedly line: 0370- 21 85 21 A9 AO 6 0 C9 9A press the right-arrow key. 0378- DO 20 AA 2A B1 28 A8 E6 By pressing a control character, Press CTRL Z in order to copy over 0380- 2A E6 2A A5 2A C5 21 BO the screen width can be changed to 33 the text from the current cursor 0388- OC C6 2A 68 9D 00 02 E8 a POK E 33,33 COMMAND R ESULTS), position to the end of the line. 0390- DO E8 AC 6 2 FD 68 C6 2A this feature is useful when editing 0398- C6 2A 60 C9 8D DO 1E A8 Program l ines which, when listed with Setting the window width to 33: 03A0- AD 01 CO 8D 11 CO 1 0 1A the window width set at its normal 03A8- C9 83 FO 1A C9 93 DO OC Yalue of AO, would contain unwanted Press CTRL Q in order to perform 03B0- AD 01 CO 1 0 FB 8D 11 CO lanks between s t r lng - var iab 1e the equivalent of a POKE 33,33 03B8- C9 83 FO OA 6 8 AC FO FD quotation marks. command. 5 1 03C0- 68 AC 03 EO SPLIT C ATALOG FREE S PACE FREE SPACE FORMALIZED FROM CALL -APPLE BY ANDY HERTZF ELD

BY LE ROY LARSEN

This program calculates the amount of This program will give you a split I came up with the following few lines free space available on a given catalog when you boot your disk if you diskette. It prints out the answer in that you may like to try... use it to INIT your disk. You can terms of kilobytes and also in terms also run it and it will give you a of sectors (there are 256 bytes per 5 TEXT : CALL -936 split catalog. If you have a great sector). 7 PRINT : PRINT : PRINT deal of programs on your disk you will 10 PRINT "THIS PROGRAM WILL RUN FREE see them all with this utility. The program performs its task by using SPACE": PRINT the RWTS routine to read in track 17, 15 PRINT "BRUN FREE SPACE, A2048" This program has come from the January sector 0, which contains the bit-map 20 PRINT : PRINT 1979, page 20 Issue of CALL -APPLE. used by the DOS for sector allocation. 25 PRINT "INSERT DISK YOU WANT TO FIND FREE SPACE": PRINT It then simply loops through and >LIST counts the number of bytes that are 30 PRINT "CALL 2048" 35 PRINT : PRINT : PRINT : PRINT set, thereby obtaining the number of 10 POKE 768,56: POKE 769,72: POKE free sectors. PRINT : PRINT 770,132: POKE 771,0: POKE 772,16 0: 40 PRINT "GOTO 45" POKE 773,0: POKE 774,201: POKE One problem is that the program must 45 VTAB 10 755,32: POKE 776,176: POKE 777,2 jump back to BASIC ($E003) when it s 50 END 20 POKE 778,105: POKE 7 79,192: POKE finished or else it can't be BRUN from 60 REM 780,201: POKE 781,96: POKE 782, command level. Thus, to use it from a 65 REM FREE SPACE LOCATION IS 176: POKE 783,2: POKE 78 4,105: BASIC or machine language program, you 70 REM AT 2048 TO 3568 POKE 785,128: POKE 786,201: POKE should change 088C (4c 03 E0) to "RTS" 75 REM 787,128 instead of "JMP SE003". 80 REM TO LOAD USE 30 POKE 788,176: poke 789,2: POKE 790 85 REM A2048, L1250 ,105: POKE 791,64: POKE 792 ,145: The program lives at $800 and is about 90 REM 250 bytes long. It should work on a 95 REM BY LEROY W. LARSEN POKE 793,2: POKE 794,230: POKE 79 5 ,2: POKE 796,208: POKE 79 7,2 system of any memory size but I've 98 END only tried it on a 48K machine. To 40 POKE 798,230: POKE 799,3: POKE 800 use it, type "BRUN FREE SPACE" or ,104: POKE 801,164: POKE 80 2,0: BL0AD it, insert the disk you want the POKE 803,96: POKE 804,0: POKE 805, free space of, and type "CALL 2048". SON OF N 0: POKE 806,0: POKE 807,0 After entering the HEX DUMP save to 50 POKE 808,169: POKE 809,160: POKE disk by BSAVE FREE SPACE,A$800,L$900. 810,164: POKE 811,36: POKE 812, BY SCOT KAMINS 145: POKE 813,40: POKE 81 4,96 100 B$=" ":Q=0: DIM A$(250),A(50), B(50):D$="":LM=11+ PEEK (74)+ PEEK (75)*256: POKE LM, PEEK (977 ) HEX DUMP (FREE SPACE) Last month's issue of the Cider Press : POKE LM+1.PEEK (978): Q=0+3037 semi-featured a disk "HELLO" program 110 PRINT DS;"NOMON C ,I,0": TEXT : that did many nifty things. Here is a CALL -936: POKE 2,0: POKE 3, 16: new version of the program that POKE Q,0: POKE Q+1,3: POKE Q+2,40: includes reset for himem and lomem. POKE Q+4,3 *800.900 120 PRINT D$;"CATALOG": PRINT 0 POKE -16298,0: REM CLEAR HIRES 0800- 48 8A 48 98 48 A9 00 8D SCREEN 130 PRINT D$;"PR#0": PRINT D $;"IN#0" 0808- BF 08 8D CO 08 20 E3 03 10 TEXT : REM SET TEXT MODE, CLEAR 0810- 84 1C 85 1D A9 00 AO 03 SCROLLING WINDOWS 140 PRINT " " 0818- 91 1C AO 05 91 1C A9 11 20 D$="": REM CTRL D, ALLOWING EASY 200 POKE 34,2:1=4096 0820- 88 91 1C A5 4C AO 0 8 91 USE OF DISK COMMANDS 0828- 1C A5 4D C8 91 1C AO 0C 30 PRINT D$;"NOMON C,I,0": REM HIDE 220 POKE LM-6, PEEK (I): IF ASC(B$) = 0830- A9 01 91 1C A9 00 C8 91 ALL DISK COMMANDS 133 THEN 400: IF ASC(B$) = ]4l 0838- 1C 20 E3 03 20 09 03 AO 40 CALL -936: REM CLEAR THE SCREEN THEN 240: IF B$=D$ OR J>19 T^N 0840- 0D B1 1C F0 03 4C 2D FF 50 POKE 74,0: POKE 75,8: REM SET 250: IF K<2 THEN 230: PRINT BSi 0848- AO 38 B1 4C A2 07 OA 90 LOMEM TO 2048 (THE USUAL PLACE) 230 1=1+1:J=J+1: GOTO 22 0 0850- 08 EE BF 08 DO 03 EE CO 60 POKE 76,0: POKE 77,150: REM SET 240 PRINT : 1=1+1 :K=K+1: VTAB 3+(K -Z) 0858- 08 CA 10 F2 C8 CO C4 90 HIMEM TO 38400 (48K 'PUTERS ONLY) MOD 20: IF K=22 THEN GO SUB 800. 0860- E9 A9 8D 20 ED FD A9 8D 70 PRINT D$;"CATALOG": REM SHOW S GOTO 210 0868- 20 ED FD AE BF 08 AD CO WHAT'S ON THIS DISK 250 1=1+1: GOTO 230 0870- 08 20 1B E5 AO 0 0 B9 C1 80 PRINT D$;"BRUN FREE SPACE": REM 400 TEXT : VTAB 23: END 0878- 08 FO 08 09 80 20 ED FD SHOWS HOW MANY FREE DISK BYTES 800 POKE 33,19: POKE 32,19: CALL - 0880- C8 DO F3 18 A9 02 6D BF REMAIN RETURN 0888- 08 8D BF 08 90 04 EE CO 0890- 08 18 6E CO 08 6E BF 08 0898- 18 6E CO 08 6E BF 08 AE Note: Line 60 pokes will have to be 08A0- BF 08 AD CO 0 8 20 1B E5 changed if your system is less than 08A8- AO 00 B9 E7 08 FO 08 09 48K. To find out what numbers you O8B0- 80 20 ED FD C8 DO F3 68 should use, merely boot your DOS and 08B8- A8 68 AA 68 4C 03 EO 7D print PEEK (76) and PEEK (77). The 08C0- 00 20 46 52 45 45 20 53 numbers that are returned are the ones 08C8- 45 43 54 4F 52 53 20 52 you should POKE into their respective 08D0- 45 4D 41 49 4E 20 8D 57 places. 08D8- 48 49 43 48 20 49 53 20 08E0- 41 42 4F 55 54 20 00 4B Sibling of note: Line 80 assumes you 08E8- 20 4F 52 20 53 4F 20 8D have added to your disk Andy 08F0- 8D 00 08 14 16 01 42 28 Hertzfeld's excellent "Free Space" 08F8- 49 29 DO 49 C9 31 3A 4C program, the code for which is to be 0900- 49 found elsewhere in this issue. S.F. APPLE CORE 44Be st of The Cider Press" PROGRAM DISK

The "Best of the Cider Press" program disk contains most of the programs printed in this publication. (Checkbook, edit + , FRE(x) and a great deal more.)

Name Street City State Zip

Send $7.50 which includes handling and mailing in U.S.A. Add $2.00 for Foreign Air Mail Make Checks payable to: "S.F. Apple Core" and send to: 1515 Sloat Blvd., Suite 2 San Francisco, CA 94132

APPLE INTERNATIONAL ORCHARD APPLE CORE SUBSCRIPTIONS T M

P. o. BOX 2227 SEATTLE, WASHINGTON 98111, USA

The International Apple Core will make individual subscriptions to "The Apple Orchard available com­ mencing with Volume I, Number 2 to be published in September, 1980.

NAME

STREET.

CITY, STATE ZIP

COUNTRY Annual Subscription Rate: $10.00 per year First Cla ss Pos tage: $5.00 per year additional (required for Canada, Mexico, APO, and FPO addresses) Overseas and othe r foreign air mail postage (required): $10.00 per year additional TOTAL REMITTANCE ENCLOSED: $(USA) Make check or money order payable to "international Apple Core" and return with this form to: Apple Orchard Subscriptions P.O. Box 2227 7/7/80 Seattle, Washington, USA 98111 SAN FRANCISCO APPLE CORE LIBRARY

20 VTAB 5: C$="Tltle of program": G0SUB 11 LIBRARY A CCESS CONVENTIONS 30 C$="BY - authors name": G0SUB 11 AO C$="DATE - donated to library": BY l£ ROY LARSEN G0SUB 11 The APPLE CORE LIBRARY of contributed 45 PRINT : C$="A few lines about programs is arranged by general program": G0SUB 11 categories. Members living in the The following are conventions that are 1 50 VTAB 21: PRINT "PRESS 'ESC TO END" S.F. Bay area may copy programs from currently being used by the Apple 55 PRINT "< PRESS THE SPACE BAR TO Core. This is a first attempt toward the library at the following CONTINUE...>" locations: establishing conventions with which we 60 IF PEEK (-16384) = 155 THEN (To end can live. If you have any input on of program) Computerland San Francisco 546-1592 this subject please write the Apple 65 IF PEEK (16384) <> 160 THEN 50 Computerland of Belmont 595-4232 Core in care of the Conventions 90 CALL -936: POKE -16368,0: REM Computerland of Marin 459-1767 Committee. RESETS KEYBOARD Computerland of The Castro 864-8080 Computerland of Los Altos 221-8500 PROGRAM REQU IREMENTS (This would be the line to start AIDS 221-8500 program - lines 11 thru 15 could be 1. All programs submitted must located any place) Out of area members can get programs contain your name (either in REM or from the library through the mails in PRINT statements) within the program. END OF PROGRAM LINES: the following manner: (Refer to part g above) 1. A member is required to donate at 2. If at all possible the following least one original or public domain Conventions should be used: LINE ? POKE -16289,0: POKE -16300,0 program (not Copyrighted, please). LINE ? POKE -16368,0: TEXT : CALL -936 2. Donated programs must be sent on a a) Programs should begin with a POKE LINE ? VTAB 10: C$= "* * » THE END * disk or a computer tape placed in -16298,0 to turn off the Hi-Res mode; * *": GOSUB 11: END self-addressed, stamped proper mailer, it .should be located in the first 5 suitable for returning the disk or executed lines. tape. Please use a Program Submission form. Include a note indicating the b) The first thing to be displayed desired volume from the library that after RUN should be the title page LIBRARY #1 you would like to have copied. with the program name, author, date, Carefully package the mailer and Note: two or more lines of what the program does, and the choice of continuing or PURCHASE CONTAINS LIVE COMPUTER PROGRAMS DO NO T ending (see how below). EXPOSE TO X-RAYS OR ELECTRICAL FIELDS BY KEN SLV ERMAN DO NOT BEND OR FO LD. c) Timing loops in programs should be avoided. Use "PRESS SPACE BAR TO Please follow instructions as we do CONTINUE" wherever possible. The club now has completed its first not want to see your disks or tapes ruined anymore than you do. Only one d) Pressing 'ESC' should return user book of contributed software. The library disk or tape will be processed to next higher level menu or, if no book consists of over 350 programs on per month. The DOM (Disk of the menu, exit (end) program. 20 diskettes. The diskettes are set up by category, i.e. utility, math, Month) is considered separately. e) Try to include REM statements in games, etc. The book is also made up The DISK OF THE MONTH is a group of your program so that our members can of disk holders, Apple Core binder and recently donated programs or updated learn by your programming. If for about 30 pages of information. utilities, ect. It was originated to reasons of speed you can not do this encourage newmembers to be able to please include written information This library #1 can be purchased by a write programs by having examples to about your program. member for $150.00. If you are not a member add $15.00 and mail with a study and enjoy. f) Put a REM statement in the last membership form. Members unable to come to the meetings line of the program with the TITLE of can send in $7.50(US) for the current the program. A complete listing of the contents of DOM which covers the cost of the disk, library #1 can be obtained for $1 .00 mailing and handling. Three past g) At the end of a program the at any Apple Core meeting. Out of months are also available for $7.50 following should be reset: LOMEM to town members can obtain it by sending each. 2048, TEXT page 1 by POKE -16300,0, the $1.00 and a 9" x 12" self Members who come to the meetings c Hi-Res mode off by POKE -16298,0, and addressed envelope with $1.00 postage obtain the same DOM's for $5.00 eac clear screen and set full text window on it to the Apple Core. Prices are subject to change. by TEXT & CALL -936, clear keyboard NOTE: All programs on the DOM's go strobe with POKE -16368,0. The club is now starting library #2 into the library according to starting with the software on the category. The stores do not have t e The preceeding conventions are our November 1979 DOM. DOM's on file. attempt to put some standards into our programs within the library. If you have any input on this subject please write to us - good programming helps us all.

EXAMPLE OF TITLE PAGE PROGRAMMING:

5 DIM C$(40) 10 POKE -16298,0: TEXT : CALL -936: GOTO 20 11 REM PRINT CENTER ROUTINE 12 HTAB 20 - LEN (C$)/2 (Use TAB in Integer) 13 PRINT C$: REM PRINTS LINE 14 PRINT " REM "CONTROL G" 15 RETURN

5 4 LIBRARY BOOK #1

NOTES 36 DISK 1B RANDOM TEST 1) PROGRAMS WITH (A) AFTER THEM 37 DISK 1B MULTICOPY REQUIRE THE PROGRAMMERS' S AID CHIP 38 DISK 1B CIDER SQUEEZER 3.1 39 DISK 1 B SLOW MEM TEST 2) PROGRAMS WITH A (P) AFTER THEM WILL 40 DISK 1 B FAST MEM TEST OUTPUT TO A PRINTER (PR#1). 41 DISK 1 B HEX CODES LIST 42 DISK 1B SHORTEN COMMANDS 3) PROGRAMS WITH A (D) REQUIRE 43 DISK 1B QUOTES IN INTEGER DISK IB FORMAT-SUBROUTINE A DIS K DRIVE. 44 45 DISK IB APPLETEST DISK 1B F A) ALL APPLE CORE DISKS ARE 3.2 46 47 DISK 1B RND NO FREQ MASTERS AND WILL 'BOOT' ON 48 DISK 1B MEMORY SPY ANY SIZE SYSTEM. 49 DISK 1B DISC SPEED INFO 50 DISK 1B DISC SPEED TEST PRESS ANY LETTER TO CONTINUE 51 DISK 1B DSPEED.OB J PROGRAM INDEX PAGE 0 52 DISK 1B BASIC TED PRINTER 53 DISK 1B TED3 NO C TGRY DISK # PROGRAM NAME 54 DISK 1B TED START 55 DISK 1B TED.DISK 56 DISK 1B COPY FILE ENTER THE NUMBER OF THE FIRST PROGRAM 57 DISK 1B DISK COPY 3.2 TO B E LISTED OR PRESS RETURN: 58 DISK 1B THE ALCHEMIST V2.7 ? 59 DISK 1B ASCII DECODE ENTER THE CATEGORY TO BE LISTED (1-10) 60 DISK 1B LOOP OR PR ESS RETURN TO LIST THEM ALL 61 2 DISK 2A AVELAR'S FINANCIAL 9 62 2 DISK 2A LINEAR PROGRAMMING ENTER THE FIRST LETTER (S) OF THE PRO­ 63 2 DISK 2A PAYROLL/ V4 GRAM^) TO BE LISTED OR PRESS RETURN: 64 2 DISK 2A NETFLOW COST STOCK OPTIONS ? 65 2 DISK 2A PROGRAM INDEX PAGE 1 66 2 DISK 2A PAYROLL 67 2 DISK 2A TEN KEY ADDER DISK 2A TEN KEY NOTES NO C TGRY DISK it PROGRAM NAME 68 2 69 2 DISK 2A LISTS 70 2 DISK 2A AUTO PURCHASE 71 2 DISK 2A APT BLDG PURCHASE 1 1 DISK OA PROGRAM LIST PORTFOLIO REVIEW DO 2 1 DISK OA LIST INSTRUCTIONS 72 2 DISK 2A DISK 2A PORTFOLIO REVIEW 3 1 DISK OA LIBRARY POLICIES 73 2 DISK 2B TAX 1040 '79 A 1 DISK 1 A APPLE HELLO 74 2 75 2 DISK 2B DECISION MAKER 5 1 DISK 1A TEXTFILER SIMPLER INTEREST 6 1 DISK 1A TEXTCOPY 76 2 DISK 2B 2 DISK 2B FUTURE VALUE 7 1 DISK 1A SWEET 16 DISSEMBLER 77 PRESENT AND FUTURE 78 2 DISK 2B 8 1 DISK 1 A INTEGER RENUMBER/AP HOME MORTGAGE 79 2 DISK 2B 9 1 DISK 1 A SLOWLIST INVESTMENT EVAL. 10 1 LAZARUS.A768.L251 80 2 DISK 2B DISK 1A DISK 2B TELEPHONE 11 1 CTRLEIND 81 2 DISK 1 A DISK 2B TRAVEL COSTS 12 1 DISK 1 A DISK RENUM APPEND 82 2 CRITICAL PATH ANALY 13 1 TONY'S SUBROUTINE P 83 2 DISK 2B DISK 1 A DISK 2B CALL DEBT MARKER 14 1 DISK 1 A APPLESOFT 1 TO 2 CO 84 2 FED TAX PROGRAM 2 DISK 2B 15 1 DISK 1 A YES NO AND PAUSE 85 FORECASTING 16 1 86 2 DISK 2B DISK 1A CHR$ FUNCTION DISK 2B COMPOUND INTEREST 17 1 DISK 1 A HEAPSORT 87 2 NEW CHECKBOOK 88 2 DISK 2B 18 1 DISK 1A ALPHABETIZE DISK 3A MUSIC FOR CLOSE ENC 19 1 DISK 89 3 JOHANN SEBASTIAN AP 1 A RANDOM SORT 90 3 DISK 3A 20 1 DISK 1 A B/BSTAT APPLEODIAN 91 3 DISK 3A 21 1 DISK 1A FREE SPACE DISK 3A LUDWIG'S FANTASY 22 1 92 3 DISK 1 A FIX CATALOG DISK 3A BACH 23 1 DISK 1 A DISK MAP 93 3 SMAL-4 SMALL WORLD 24 1 IMPROVED CATALOG 94 3 DISK 3A DISK 1A DISK 3A ALLEY CAT 25 1 DISK 1 A LOCK DISK 95 3 STING MUSIC 96 3 DISK 3A 26 1 DISK 1A DISK PROGRAM ELIMIN DISK 3A MUSIC WRITER 27 1 97 3 THE HART PIANO DISK 1 A DISK DUMP 98 3 DISK 3A 28 1 DISK 1A DISK AIDE [APPLE CO DISK 3A ODE TO JOY 29 1 99 3 MUZAK DISK 1 A DISK AIDE [DOCUMENT 3 DISK 3A 30 1 DISK AIDE [ MACHINE 100 SQUARE BACH DISK 1 A 101 3 DISK 3A 31 1 DISK 1A SUPERCAT ALOG.0 DISK 3A SOUND EFFECTS 32 1 102 3 MOZART 2 VOICE DISK 1 A SUPERCATALOG.DOC 103 3 DISK 3A 33 1 DISK 1 A PASSWORD KEY DISK 3A FLAG 34 1 104 3 APPLE PIANO DOC DISK 1B DOS UTILITY #1 105 3 DISK 3A 35 1 DISK 1 B MENU WRITER 5 6 LIBRARY B OOK #1 (CONT.)

106 3 DISK 3A APPLE PIANO 1 79 5 DISK 5B AMERICAN.CAPITALS 107 3 DISK 3A ANDY'S TONES 1 80 5 DISK 5B MALE.FEMALE 108 3 DISK 3A PHILA ORGAN 181 5 DISK 5B PRESIDENTS 109 3 DISK 3A MULTI TONE 182 5 DISK 5B AFRICAN.CAPITALS 110 A DISK AA LOGO 183 5 DISK 5B OPPOSITES 111 A DISK AA GET IT 1 8 A 5 DISK 5B ELEMENTS 112 A DISK AA PLOT.3-D 185 6 DISK 6A DOT WORLD 113 A DISK AA BESSEL DISPLAY 186 6 DISK 6A COLOR SHOWS 11A A DISK AA PLOT 1 187 6 DISK 6A ROD'S COLOR PATTERN 115 A DISK AA PLOT2 188 6 DISK 6A SUPER KALEIDOSCOPE 116 A DISK AA PLOT3 189 6 DISK 6A GREAT AMER.PROB.MAC 117 A DISK AA PLOTA 190 6 DISK 6A COLOR GRAPHICS 118 A DISK AA PLOT 5 191 6 DISK 6A COLOR SKETCH 119 A DISK AA PLOT6 192 6 DISK 6A COLOSSUS T.V.PATTERN GENERAT 120 A DISK AA PL0T7 193 6 DISK 6A 121 A DISK AA PLOT8 1 9 A 6 DISK 6A BIT BUCKET A DISK AA PLOT9 195 6 DISK 6A TITLE PROGRAM 122 COLOR STROBE 123 A DISK AB EASTER EGG(CALL 5A51 196 6 DISK 6A DISK AB MENSCHELL HI-RES 197 6 DISK 6A ENTERPRISE 12A A PAGE 142 125 A DISK AB STAR PATTERN 1 98 6 DISK 6A DISK 6A FWORMS (D) 126 A DISK AB VINCENT (D) 199 6 6 DISK 6A FAST WORMS (D) 127 A DISK AB HI-RES LOW LEVEL (D 200 201 6 DISK 6A WORMS (D) 128 A DISK AB MT. FUJI (A) DISK 6A BEEP (D) A DISK AB PAINTER (A) 202 6 129 DISK 6A A??? 130 A DISK AB SAMPLER (D) 203 6 DISK AB MEMORY ORGANIZATION 20A 6 DISK 6A ANIMATION 131 A OBJECT DRAWING DISK AB RANDOM ELEPHANT 205 6 DISK 6A 132 A DISK 6A DANCING BUTTERFLIES A DISK AB SHAPE MEDLEY 206 6 133 207 6 DISK 6A MOD GREETING 13A A DISK AB DRAGON LOAD (D) RANDY'S PATTERN DISK AB DRAGON (D) 208 6 DISK 6A 135 A 209 7 DISK 7A INFINITE NUMBER OF A DISK AB TERMINAL-W 136 210 7 DISK 7A POETRY A DISK AB SHTABLE LOC (D) 137 211 7 DISK 7A PLAYBOY BUNNY 138 A DISK AB CHARACTER SHTABLE ( HAIKU POETRY DISK AB ALEX'S CALENDAR PAR 212 7 DISK 7A 139 A 213 7 DISK 7 A TEXT BIORHYTHM 1 AO A DISK AB ALEX'S CALENDAR PAR APPLE POOP PLOT DISK AB CHOICE FILE (D) 21 A 7 DISK 7A 1 A1 A DISK 7A BUZZWORD 1A2 A DISK AC CHARACTERS.PIC (D) 215 7 216 7 DISK 7A LOVE 1 A3 A DISK AC SEE PIC (D) HEBREW POSTER DISK AC ROSE D 217 7 DISK 7 A 1 AA A DISK 7A DAY OF WEEK 1A5 A DISK AC HIRES.OBJ (D) 218 7 DISK AC WASHINGTON (D) 219 7 DISK 7A MADLIB 1A6 A T TEXT 1A7 A DISK AC LINCOLN (D) 220 7 DISK 7 A SLO DISK AC SQUARES 221 7 DISK 7A SLOT DICE 1A8 A DISK 7A PLANTMAN 1A9 A DISK AC HI-RES 21 COLORS 222 7 DISK AC ETCH-A-SKETCH 223 7 DISK 7 A MADAME DUPRE 150 A BIORHYTHM FOR PRINT 151 A DISK AC IMPOSSIBLE FIGURE 22A 7 DISK 7A 152 5 DISK 5A TYPING PRACTICE 225 7 DISK 7A OREGON TRAIL 153 5 DISK 5A CAL DRIVER TEST 2AK 226 7 DISK 7A PLANTS & LEMONADE 1 5 A DISK 5A MORSE TRAINER 227 7 DISK 7B STARTREK 8K 5 LUNAR LANDER 155 5 DISK 5A MORSE CW 228 7 DISK 7B 156 5 DISK 5A FLASH CODE 229 7 DISK 7B TEXTBLACKJACK 157 5 DISK 5A FLASH CARD 230 7 DISK 7B COIN TOSS 1 58 5 DISK 5A NAME STATES 231 7 DISK 7B LUNAR 1 59 5 DISK 5A STATES/CAPITALS 232 7 DISK 7B GAMES SULLIVAN 160 5 DISK 5A COLOR MATH 233 7 DISK 7B BAGELS 161 5 DISK 5A MATH TUTOR 2 3 A 7 DISK 7B WORLD POWER 162 5 DISK 5A ECHOCARDIOGRAPH 235 DISK 7B KINEMA 163 5 DISK 5A INTGER INSTRUCTION 236 DISK 7B CRYPTOGRAM 16A 5 DISK 5A TITRATION 237 DISK 7B DYNASTY 165 5 DISK 5A TOP DOWN PROGRAMMIN 238 DISK 7B MATCHGAME 166 5 DISK 5A CONVENTIONS 239 DISK 7B APPLE LEAF GAME 167 5 DISK 5B QUIZBUILD (D) 2 AO DISK 7B DEPTH CHARGE 168 5 DISK 5B QUIZ (D) 2A1 DISK 7B ELIZA 169 5 DISK 5B SEQUENCE.EASY 2A2 DISK 7B TEXT CHESS 170 5 DISK 5B SEQUENCE.HARD 2 A3 DISC 7C GUESS A BMP 171 5 DISK 5B US.CAPITALS 2 AA DISC 7C TIC TAC TOE 172 5 DISK SB EUROPEAN.CAPITALS 2 A 5 DISC 7C BOXING 173 5 DISK 5B ASIAN.CAPITALS 2A6 DISC 7C BASEBALL 17A 5 DISK 5B MISSPELL 2A7 DISC 7C INTERSTELLAR 175 5 DISK 5B SHAKESPEARE 2A8 DISC 7C CHASE 176 5 DISK 5B BABY.ADULT 2A9 DISC 7C SWORDS 4 SORCER 177 5 DISK 5B VICTIM.KILLER 250 7 DISC 7C GOLF 178 5 DISK 5B CANADA.PROV -) d 1 1 LIBRARY B OOK #1 (CONT. 2)

DISK 8B NEV CRAPS 252 DISC 7C FI60STRAT 304 8 DISC 7C PETALS/ROSE 305 8 DISK 8B SLOTS-PADDLES 253 DISK 8B SNOW RACER 254 DISC 7C DOUBLE-ODDS CRAPS 306 8 307 8 DISK 8B AIRPORT 255 DISC 7C TEXT OTHELLO DISC 7C KENO 20 308 8 DISK 8B CHECKERS 256 309 8 DISK 8B FREUD 257 7 DISK 7D REVERSE 310 8 DISK 8B HANGPERSON 7 DISK 7D ATOM 20 258 311 8 DISK 8B GO BACK 259 7 DISK 7D FOOTBALL DISK 7D SUPER HOCKEY 312 8 DISK 8B SHOOT STARS 260 7 313 8 DISK 8C STARSHIP ATTACK 261 7 DISK 7D SLALOM DISK 8C HANGMAN DISK 7D STAR LANES 314 8 262 7 315 8 DISK 8C TARGET SHOOT 263 7 DISK 7D STAR LANES DOC DISK 8C INSTANT LOTTERY DISK 7D THAT'S HOLLYWOOD IN 316 8 264 7 DISK 8C DODGE BALL DISK 7D THAT'S HOLLYWOOD 317 8 265 7 318 8 DISK 8C D N A 266 7 DISK 7D DRIVER DISK 8C CARWASH DISK 7D TV TRIVIA 319 8 267 7 320 8 DISK 8C JUGGLE 7 DISK 7E NAME FREAK 268 321 8 DISK 8C ANDY'S MAZE RACE DISK 7E IQ TEST 269 7 322 8 DISK 8C STARWARS APPLE 270 7 DISK 7E PIZZA DISK 8C LIFE #1000 DISK 7E BATTLE SHIP 323 8 271 7 324 DISK 9A CALCULATOR 272 7 DISK 7E JIMMIES ODD-EVEN DISK 9A REACTANCE CALCULATI DISK 7E SNOOPY POSTER 325 273 7 326 DISK 9A TRANSISTOR PARAMETE 274 7 DISK 7E RACE CAR 327 DISK 9A SIN PLOT 275 7 DISK 7E FLIPPER 328 DISK 9A METRICS AREA 276 8 DISK 8A ACEY DUCY 329 DISK 9A METRICS LENGTH 277 8 DISK 8A I CHING 330 DISK 9A METRICS VOLUME 278 8 DISK 8A STAY AFLOAT 331 DISK 9A METRICS KITCHEN 279 8 DISK 8A TRAP 332 DISK 9A METRICS TEMPERATURE 280 8 DISK 8A COOTIE 333 DISK 9A PERMUTATIONS-COMBIN 281 8 DISK 8A SKI RACER 334 DISK 9A BINOMIAL DISTRIBUTI 282 8 DISK 8A ONE PLAYER PONG 335 DISK 9A PRIME FACTORS OF IN 283 8 DISK 8A PONG 2-D 336 DISK 9A PLOT 284 8 DISK 8A SUPER BRICK-OUT 337 DISK 9A FAST FOURIER TRANSE 285 8 DISK 8A PHILA.PINBALL 338 DISK 9A FAST FOURIER TRANSF 286 8 DISK 8A BIORHYTHMS 339 DISK 9A TOTAL 287 8 DISK 8A ED'S LIFE DISK 9A LOOP ANTENNA DISK 8A CONWAY'S LIFE 340 288 8 341 DISK 9A XLINE IMPEDANCE DISK 8A GIANT TYPEWRITER 289 8 342 DISK 9A NUMBER BASE CONVERT 290 6 DISK 8A HUSTLE 343 DISK 9A HEX-DEC CONVERTER 291 8 DISK 8A DEPTH CHARGE 344 DISK 9A CALC PI TO 1000 DIG 292 8 DISK 8A SUB KILLER 345 DISK 9A LONG DIVISION 293 8 DISK 8A GAME OF LIFE DISK 9A DIVISION DISK SB DRAGON MAZE 346 294 8 347 DISK 9A MULTIPLY 295 8 DISK 8B BREAKOUT /B 348 DISK 9A MATH PRACTICE DISK 8B DUCK SHOOT 296 8 349 DISK 9A EXTERIOR BALLISTICS DISK 8B BINGO CARD 297 8 350 DISK 9A HARMONIC ANALYSIS 298 8 DISK 8B BINGO DISK 9A QUADRATIC SURFACE DISK 8B AUTOMATIC BINGO 351 299 8 352 DISK 9A HEX CONV. 300 8 DISK 8B THEIF1 353 DISK 9A NOTCH FILTER 301 8 DISK 88 MISSION 354 DISK 9A GREAT CIRCLE 302 8 DISK 8B TORPEDO RUN 303 8 DISK 88 SKUNK APPL€ ir.

An Infinite Number Of Reasons To Shop At ComputerLand of Marin

Once you have made your decision to buy an Apple working (it can happen), we have a full-time technician Computer, now comes the big question...where? There to repair your maching in and out of warranty! is a lot more to buying a computer than just taking it home and plugging it in - that's where we come in: We Last... but not least, are the people you deal with.They talk to you one on one, spending all the time you need are not on commission, and all are there to help you!! to help you select a system. We stock everything from COME IN... WE'RE SURE YOU WILL LIKE WHAT YOU Apple Computers to Zilog books to make your selection SEE. easier. Our service doesn't stop there - we unpack your { new computer and run test after test to assure it is in good working order. You just get it home, and now you have a thousand questions, you really don't know what ComputerLand • OF MARIN to do next... call or drop in, that's what we're here for. We were all beginners once and the only unanswered 1930 4th ST., SAN RAFAEL, CA. 94901 (415)459-1767 question is one you don't ask. Should something stop Open Tues-Fri 10-7, Sat. 10-5 and Mon. by appointment. CHECKBOOK

14 I=Z:F=Z: INPUT "?",L$: IF NOT 1120 PRINT " 5. SORT" THIS C HECKBOOK PR OGRAM IS BASED ON THE LEN(L$) THEN 14: IF L$(0,0) 1125 PRINT " 6. SEARCH": PRINT ORIGINAL EROM THE APPLE COMPUTER #"-" THEN 15: IF LEN(L$)=0 THEN " 7. DELETE RECONCILED RECORDS" COMPANY. IT HAS HAD SO MAN Y PATCHES 14:L$=L$(2, LEN(L$)):SG=-0 PUBLISHED IN SO MA NY NEWS LETTERS THAT 15 FOR J=0 TO L EN(L$):A= ASC(L$ 1130 PRINT " 8. DELETE UNRECONCILED NO O NE SEE MS TO KN OW WH AT WORKS AND (J))-176: IF A=28 THEN A=1: RECORDS": PRINT " 9. CHECK FILE WHAT DOESN'T. THIS LISTING OF THE A=(A<>31)*A: IF A9 OR LENGTH": PRINT "10. SAVE DATA ENTIRE PR OGRAM WITH ALL THE FIXES FOR I>3275 THEN 16:1=1*10+A*SG: TO DISK": PRINT "11. QUIT" DISK AND PRINTER WE HOPE WILL TAKE NEXT J: RETURN CARE O F TH E PRO BLEM. 16 IF A#-2 THEN 14: IF LEN(L$) 1131 PR#0 =J THEN RETURN : FOR K=J+0 TO 1132 PRINT : PRINT L$ The SE APPL E CORE wishes to thank LEN(L$):A= ASC(L$(K))-176: IF 1133 A=0:Q=0 Howard Gannes for the disk A9 THEN 14:F=F*10+A* 1135 PRINT : PRINT : PRINT "WHICH ?" modifications, Ken Silverman for SG: NEXT K ;:H=Z modifying i t for proper printer output 17 IF J+0= LEN(L$) THEN F =F*10 11AO A= PEEK (-1638A): IF AC128 THEN and la st but not least to John Couch : IF F>99 THEN 14: RETURN 11AO: IF A=208 THEN POKE -16368 of Apple Computer Company for 18 INPUT "?",L$:A= LEN(L$): IF ,0: TAB 7: PR#0: INPUT Q permission t o print the program. A>=S THEN A=12: IF NOT A THEN 11AA PR#0 18:C$=L$(0,A) 11A5 IF Q<0 OR Q>11 THEN 1100:PS= LIST- 19 IF LEN(C$)<12 THEN C $( LEN( 0: IF AO 208 OR Q<2 OR Q=5 OR 0 A=0: DIM C $(12),D(13),N$(40 C$)+1)=" ": IF LEN(C$)<12 THEN Q>6 THEN 1150: PRINT : INPUT ),RA(13),R(13),L$(40): PRINT 19:B=4: GOSUB 4:SG=0: IF C$ "WHAT SLOT IS YOUR PRINTER IN » "NOMON I, 0,C": PRINT "BLOAD FAST (0,0)="#" THEN SG=-0: RETURN PS SORT": GOTO 1000 20 INPUT "?",C$: IF LEN(C$)>4 THEN 11A9 PR#0 0 PO KE 204 ,252: POKE 205,8: GOTO C$=C$(0,A) 1150 GOSUB Q*200+1000:PS=0 1100 21 IF LEN(C$)Z THEN S2=0 2053, ASC(C$(Q-B+Q-B+2)):D( 1216 PRINT : PRINT "TO ENTER A DEPOSI : VTAB L: PR#PS: RETURN T, TYPE A '#' SIGN FOR THE F IRST Q)=A: NEXT Q: RETURN 36 CALL -1008: IF I=BALI THEN 5 F OR Q =B T O B+ SL/2-0:A=R(Q): CHARACTER OF THE 'TO: ' FIELD" PRINT IF I#BALI THEN POKE 2059+Q-B+Q-B, PEEK (2052 : PRINT PRINT "#";: RETURN ): POKE 2060+Q-B+Q-B, PEEK 1220 PRINT "WHEN YOU'RE THROUGH ENTER AO RETURN (2053): NEXT Q: POKE 2059+Q- 97 A=Q+2*(Q>0)+(Q>2)+12*(Q>3)+ ING DATA, ENTERA '-1' FOR CHK# 0 B+Q-B, 0: RETURN 2*(Q>A)+A*(Q>5): RETURN R MO TO RETUR N TO THE MENU." 6 C ALL -936: TAB (20- LEN(N$) 100 FOR C=0 TO S:RA(C)=R(C): NEXT : PRINT : GOTO 1228 122A PRINT "READY TO GO TO THE NEXT P /2): PRINT N$: PRINT "CHK# MO/DA C:I=P: RETURN /VR T O:";: TAB 30: PRINT "AMOUNT 1000 0=1:Z=A:S=13:LM=3000:CM=LM- AGE ?" CODE"; :L=3: RETURN 1228 INPUT "HIT 'RETURN' KEY WHEN REA 0: POKE 2052, PEEK (202): POKE 1 TAB E: IF C<0 THE N CALL -1008 2053, PEEK (203):HM=A: IF A< DY..",L$ : FOR A=0 TO A: IF ABS (C)>= Z THEN HM=32767 1232 GOSUB 6 10 ® A TH EN CALL -1008: NEXT 1236 IF NOT S2 THEN INPUT S1 1035 GOTO 1050 1240 C=S1: VTAB L: CALL -958: IF A: IE I15 THEN GOS UB 10AO DEL 0 C9999 36: PRINT C;: RETURN 1050 POKE 8,32: POKE 9,12: POKE THEN 1 244:D(0)=C:E=4: GOSUB 'B IF I12 THEN 1252:E=7: GOSUB ; GOSUB 7: PRINT ;:A=R(2 : PRINT : TAB 6: PRINT "DATA BAS 7: PRINT "/";:D(2)=C*256: GOTO ) MOD 256: IF A<10 THEN PRINT 1256 E MANAGEMENT SYSTEM" 1252 GOSUB 22: GOTO 1248 " "i: PRINT A ;"/"; 1106 PRINT : PRINT "TO PRINT OUTPUT, 12 1= A BS (R(3) MOD 256): IF I< 1256 INPUT C: VTAB L : TAB 9: CALL TYPE 'P• BEFORE THE": PRINT 10 TH EN PRI NT " PRINT I; -958: IF C<0 OR C>31 THEN 1260 "NUMBER 2,3,A OR 6" :E=10: GOSUB 7: PRINT " ";:B=A:SL=T: GOSUB 5: PRINT 1110 PRINT : PRINT " 1. ENTER DATA" 0(2 )=D(2)+C: GOTO 1264 C$;;E=T1:I=R(10) :F=R(11): GOTO : PRINT " 2. BALANCE" 10 1115 PRINT " 3. RECONCILE TO BANK ST 1260 GOSUB 2 2: GOTO 1256 13 1264 INPUT C: VTAB L : TAB 12: CALL CALL -936 : TAB (20- LEN(N$) ATEMENT": PRINT " A. LIST AND/0 -958: IF C99 THEN 1268 /2): PRINT N$: PRINT "CHK# MO/DA R CHANGE DATA" /yB TO:";: TAB (27): PRINT :E=13: GOSUB 7:D(3)=C: GOTO "AMOUNT BAL ANCE";:L=3: RETURN 1272 CHECKBOOK (C ONT')

1268 G OSUB 22: GOTO 12 64 1427 IF PS THEN PR INT 1680 PR INT "BOOK BA LANCE A T C HK #" 1272 GOSUB 18: VTAB L: TAB 14: CALL 1429 IF PS>0 TH EN W W=940: IF PS< ;R( 1);" IS "; :E=37: GOSUB -958: PRINT " ";C$;: IF C$( 1 THEN W W = 19 10: CALL -958: IF P>=CM T HEN 1,1)#"#" THEN 12 80 1430 FOR L=3 TO W W: IF P>CM TH EN 1700 1276 IF S2 THEN S1 =S1-1 1700: GOSUB 2 1685 PRINT : PRINT "HIT 'ESC' TO R ETU 1280 G OSUB 14: VTAB L: TAB 27: CALL 1435 GO SUB 11 RN TO T HE M ENU, 'RTN'": PRINT -958:D(10)=I:D(11)=F:E=32: GOSUB 1440 BALI=BALI-R( 10):BALF =BALF-R( "TO CONTINUE RECONCILING";: 10 11) CALL -958 1445 BALI=B ALI+ SG N (BA LF )*( ABS 1690 CALL 8 : IF PEEK (255)-128=27 1284 G OSUB 20: VTAB L: TAB 36: CALL (BALF)>99):BALF =BALF M OD 100 THEN R ETURN : GOTO 1 615 -938: PRINT " ";C$; 1695 PRINT " —GOSUB 1440 1288 G OSUB 4 1450 I F ABS ( SGN (B ALI)- SGN (BALF) : GOTO 1661 1292 L=L+ 0:S1=S1+0: GOSUB 0: GOTO )<>2 THEN 1460 1700 PR INT : CALL -958: PRINT D$ 1236-12 *(L>22) 1455 A= SG N (BALI):BALI=BALI+ SGN ;"PR#0": PRINT "THAT'S AL L T HE C 1300 CA LL -936: PRINT "THE FO LLOWING (BALF):BALF=BALF+100* SGN ( HECKS IN MEMORY." CHECKBOOK D ATA FIL ES ARE": PRINT A) 1705 PRINT "HIT ANY K EY T O G ET B ACK T "ON TH IS DIS KETTE:" 1460 I F H TH EN R ETURN 0 THE MENU ..";: CALL 8:H= Z: 1301 PR INT "";"CATALOG" 1465 E=37:I=BALI:F =BALF: GOSUB 10 RETURN 1305 PR INT : POKE 54,37: POKE 55 :Q=1470: GOSUB 24: IF PS THEN 1800 INPUT "ENTER THE C HECK N UMBER Y O ,3: POKE 2052, PEEK (977): POKE PRINT : NEXT L U W OULD LIKE THE LI ST TO S TART 2053, PEEK (978) 1468 PR#0 WITH" ,C 1315 PR #0 1470 PR#0: PRINT : PRINT "HIT 'ESC1 T 1805 P=LM: PRINT "PR#";PS 1320 PR INT : INPUT "REPLACE C URRENT D 0 RETURN TO T HE M ENU, 'RTN1" 1810 G OSUB 2: IF P>=CM T HEN 1 860 ATA O R A PPEND T O IT (R/A) ?" : PRINT "TO CO NTINUE BAL ANCING" :P=P+S+S: IF R(0)0 "A" THEN R ETURN 1471 IF PS>0 TH EN G OTO 1425: GOTO THEN W W=940 1330 BC M=LM:LM=CM+0: GOSUB 1335: 1425 1815 GO SUB 6: GOSUB 30:T =12:T1=32 LM=BCM: RETURN 1600 P=LM:T =8:T1=29:H=0:BALI=Z:BALF= : FOR L=3 TO W W: IF P>=CM T HEN 1335 IF C$="T" THEN 1350: PRINT Z 1825 "WHAT IS THE N AME O F YOUR FILE?" 1605 INPUT "ENTER STARTING C HECK #" 1820 G OSUB 2 : PRINT : IE PS<1 T HEN : INPUT L$ : PRINT "";"BLOAD" ,C: PRINT "ENTER BE GINNING BA LAN VTAB L : GOSUB 11 :SL=B:B=T: GOSUB ;L$;".*,A2048":B=LM+A: IF B> CE F ROM B ANK STAT E-MENT";:SG= 5: PRINT " ";C$;:Q=1825: GOSUB HM O R A =CM TH EN 1700 1826 PRI NT "THAT'S AL L O F TH EM!" 1340 PRINT "LOADING IN FILE '";N$ :P=P+S+S: IF R(0)0): IF N' CONTINUE": PRINT "LISTING" 1355 POKE 3,253: POKE 4,25 4: POKE P>=CM TH EN 1665: GOSUB 2 5,166: POKE 6,255: POKE 7,96 1635 GOSUB 11:Q-R(3)HM O R A 99) :RBF=RBF M OD 100: IF ABS GOTO 1100 1370 POKE 60,L M M OD 256: POKE 61 ( SGN ( RBI)- SGN (RBF))<>2 THEN ,LM/256: POKE 62 ,CM M OD 256 2000 CALL -936: VTAB 5: PRINT "YOU MA 1660 Y SO RT ON O NE O F TH E F OLLOWING:" : POKE 63,CM /256: CALL Z: RETURN 1655 A= S GN (R BI):RBI=RBI+ SGN ( 2005 PRINT P=LM:T=8:T1=28:H=Z RBF):RBF =RBF+100* SG N (A) 1400 1660 A=- ABS (R(3)): POKE P -21, PEEK 2010 PRINT "1. CHECK # ": PRINT "2. DA INPUT "ENTER ST ARTING C HECK #" 1402 (2053): POKE P-22 , PEEK (2052 TE": PRINT "3. 'TO:' FIELD" ,C: PRINT "ENTER ST ARTING B ALANC : PRINT "4. AMOUNT": PR INT E";:SG=0: GOSUB 14:BALI= I:BALF= ):I=RBI:F=RBF:E=37: GOSUB 10 :Q=1665: GOSUB 24 "5. CODE": PRINT F 2015 INPUT "WHICH ", Q: IF Q<0 O R 1405 PRINT "PR#";PS 1661 IF PS THEN PR INT : NEXT L 1665 CALL -958: PRINT Q>5 TH EN 201 5 1410 GOSUB 2: IF P>=CM T HEN 170 0 2020 PO KE 786,136+ (Q=3 O R Q =5)*64 :P=P+S+S: IF R(0)

2035 F OR P2=P1+S+S T O C M-S-S S TEP 2320 U=0: FOR J=4 TO 9:U=(U AND 2535 GOTO 20 S+S: A=P2: CALL 768 D(J)=R(J)): IF U THEN NEXT 2600 GOTO 3625 2040 NEXT P2:I= P EEK (0) + PEEK ( J: RETURN 2605 PRINT "WHAT IS THE NAME OF THIS 1 )*256 2325 U=(D(10)=R(10) AND D(11)=R( FILE?": INPUT N$ 2045 P=I: GOSUB 2: GOSUB 10 0:P=:P1: 11)): RETURN 2610 P=LM: GOSUB 2 C0SUB 2 : P=I: FOR C =0 T O S: 2330 U=(D(12)=R(12) AND D (S)=R(S) 2615 D(5)=R(0):P=CM-S-S+0: GOSUB D(C)=R(C): NEXT C ): RETURN 2:D(6)=R(0) 2050 G OSUB 3: P=P1: FO R C =0 T O S: 2335 INPUT " LOOKING FOR",D(F1-( 2620 A=CM-LM: IF A2)): RETURN : PRINT "";"BSAVE ";N$;",*,A2048 2400 GOTO 3600 ,L103" 2055 P RINT "S ORTING NEXT P1: 2405 VTAB L : TAB 0: CALL -958: PRINT 2625 PRINT "";"BSAVE";N$;",A";LM; PRINT "DONE !!!": FOR C =0 T O : PRINT "YOU MAY NOW : 1. CHANG ",L";A+0: RETURN 700: N EXT C : RETURN E ABOVE DATA" 2800 A=(CM-LM+0)/S/2:B=(HM-LM-0) 2200 P=LM:H=0: CALL -936: VTAB 5 2410 PRINT " 2. DELETE /S/2 : PRINT "Y OU M AY S EARCH B Y O NE O BY CHECK #" 2810 PRINT A;" RECORDS USED OUT OF " F T HE FOLLOWING:": PRINT : PRINT 2415 PRINT ;B;" TOTAL": PRINT "LEAVING " "1. C HECK N UMBER": PR INT "2. MON 2420 INPUT "WHICH ",Q ;B-A;" UNUSED.": POP : GOTO TH": P RINT "3 . DAY" 2425 IF Q=2 THEN 3400: IF Q=1 THEN 1135 2205 P RINT "4. YEAR": PRINT "5. 'TO:' 2430: GOSUB 22: GOTO 2405 3000 GOTO 2605 FIELD": PRINT "6. AMOUNT": 2430 VTAB L+0: TAB 0: CALL -958: 3200 INPUT "DO YOU WANT TO SAVE YOUR PRINT "7. CODE" PRINT "TYPE 'CTRL' 4 DESIRED KE DATA (Y/N)?",C$: IF C$="Y" OR 2210 PRINT :B ALI=Z:BALF=Z Y SIMULTANEOUSLY"; C$="YES" THEN GOSUB 2605 2215 I NPUT "W HICH F IELD B Y N UMBER " 2435 PRINT "A=ADVANCE B=BACK UP" 3205 POP : PRINT : PRINT "OK": END ,F1: IF FK0 OR F 1>7 THEN R ETURN : GOSUB 2260+F1*5: PRINT "PR#" 3400 VTAB 18: TAB 0: CALL -958: PRINT i PS 2220 G OSUB 6 3405 INPUT "START CHECK NUMBER", 2225 IF P >=CM T HEN 22 40: GOSUB 2 I: VTAB 20: INPUT "END CHECK NUM : GOSUB 2295+E1 *5: IF U T HEN BER",F:P=LM GOSUB 2230:P=P+S+S: GOTO 22 25 3410 GOSUB 2: IF P>=CM THEN 3440 :P=P+S+S: IF I#R(0) THEN 3410 2230 T =12:T1=32: PR INT : VTAB L: 2440 PRINT "U=UP D=DOWN"; :P=P-S-S:B=P TAB 0: G OSUB 2: GOSUB 11 :SL= 3415 GOSUB 2: IF P>=CM THEN 3440 B:B=T: GOSUB 5: PRINT " ";CS 2445 TAB 27: PRINT "E=EXIT TO MENU" :P=P+S+S: IF F#R(0) THEN 3415 ;:L=L+0:P=P-S-S : PRINT "*HIT SPACE BAR BEFORE E :A=P 2232 BALI=BALI+R( 10):BALF=BALF+R( NTERING NEW DATA*"; 3420 POKE 60, PEEK (2052): POKE 2450 P=P-S-S:L=L-0: VTAB L:S1=0 11): GOSUB 1 445 61, PEEK (2053):A=CM: POKE 2234 IF P S T HEN RETURN 2455 CALL 8:A= PEEK (255): IF A> 62, PEEK (2052): POKE 63, PEEK 2235 IF L <23 T HEN R ETURN : PRINT 154 THEN 2490: IF A=129 THEN (2053):A=B: POKE 66, PEEK ( 2460: IF A=130 THEN 2465: IF 2052): POKE 67, PEEK (2053) "HIT 'ES C' TO G ET B ACK T O T HE M E A=132 THEN 2475: IF A=133 THEN NU, 'RTN'TO C ONTINUE SE ARCHING." 3425 CALL -468:CM=CM-P+B: IF Q=2 CALL 8: IE PEEK (255)-128 2480 =27 T HEN RETURN 2456 IF A=149 THEN 2485: IF A=144 THEN 1100: IF Q=7 THEN RETU RN 2236 GOSUB 6: RETURN THEN 1815: GOTO 2455 2240 PRINT : TAB 21: PR INT "TOTAL" 2460 IF S1=7 THEN S1=Z:S1=S1+0: GOTO 3430 VTAB 21: TAB 0: INPUT "MORE (Y/N ; E=: 32:I=BALI:F=BALF: GOSUB 2470 ) ?" L$ 3435 IF L$="Y" THEN 3400: IF L$= 10 2465 IF S1=0 THEN 2455:S1=S1-0 2245 PRINT : PRINT "THA T'S AL L O F THE 2470 TAB S1+3*(S1=2)+5*(S1=3)+7* "N" THEN RETURN : GOSUB 22: (S1=4)+9*(S1=5)+21 *(S1=6)+29 GOTO 3425 M !" 2250 PRINT : PRINT D$;" PR#0" *(S1=7): GOTO 2455 3440 PRINT "BAD RANGE!!!": FOR N= 2255 INPUT "H IT 'RETURN' TO G ET BA CK 2475 IF L=17 THEN 2455:L=L+0: VTAB 0 TO 6 00: NEXT N TO THE MENU",L$ L:P=P+S+S:SG=0: GOTO 2455 3445 GOTO 2405 2260 RETURN 2480 RETURN 3600 P=LM 3605 GOSUB 2: IF P>=CM THEN 3620 2265 PRINT " CHECK N UMBER";: GOTO 2485 IF L=3 THEN 2455:L=L-0: VTAB 2335 L:P=P-S-S:SG=0: GOTO 2455 :P=P+S+S: IF R(3)>Z THEN 3605 2490 GOSUB 2 : FOR J=0 TO S:D(J)= •B=P-S-S 2270 PRINT "M ONTH";: GOTO 23 35 3610 GOSUB 2:P=P+S+S: IF P>=CM THEN 2275 INPUT "I NPUT MON TH,DAY,YEAR." R(J): NEXT J:D(3)= ABS (R(3 )): POKE 35,L: POKE 34,L-0: 3615: IF R(3)M,D(3): IE A<0 O R A >=S O R 3615 P=P-S-S:A=P: GOSUB 3420:P=B: Q<0 O R Q>31 T HEN 2275 :D(2)= GOSUB 2 500+S1*5: POKE 35,24 : POKE 34,Z GOTO 3605 A*256+Q: RETURN 3620 PRINT : PRINT "DONE!": GOSUB 2280 PRINT "Y EAR";: GOTO 23 35 2495 VTAB L: GOSUB 3: FOR J=0 TO S:R(J)=D(J): NEXT J: GOSUB 22: FOR N=1 TO 300: NEXT N: 2285 P RINT "T O F IELD L OOKING F OR" RETURN IT G OTO 18 11:SL=B:B=T: GOSUB 5: PRINT M, 3625 P=LM 2290 P RINT " AMOUNT L OOKING F OR"; " C$* 2500 VTAB L:P=P-S-S: GOTO 2460 3630 GOSUB 2: IF P>=CM THEN 3645 : GOSUB 14:D(10)=I:D(11 )=F: :P=P+S+S: IF R(3)=CM THEN 20 256: RETURN 2515 INPUT A:D(2)=D(2)/256*256+A: 3640: IF R(3)>Z THEN 3635 2300 U =D(0)=R (0): RETURN 3640 P=P-S-S:A=P: GOSUB 3420:P=B: 2305 U=D(2)=R(2)/256: RETURN RETURN 2520 INPUT D(3): RETURN GOTO 3630 2310 U=(D(2)=R(2) AND D (3)= ABS 3645 PRINT : PRINT "DONE!": GOSUB (R(3) MOD 256)): RETURN 2525 GOTO 18 2530 GOSUB 1 4:D(10)=I:D(11)=F: RETURN 22: FOR N=1 TO 300: NEXT N: 2315 U=(D(3)= A BS (R(3) MOD 256 ) RETURN ): RETURN 6 1 MISCELLANEOUS CHECKBOOK (CONT.3)

20000 POP : POP : PRINT " *** MEMORY FULL ***": FOR A=1 TO 200: NEXT BON VO YAGE POKE 33,33 A: GOTO 110 0 _ 30000 REM PRINT ROUTINES MOD BY KEN S BY LARR Y DAN IEL80N BY BRUCE TOON AZZINI ILVERMAN 30001 REM PROGRAM RE EDIDED BY MIKE N As we saw in last month's article, BON ADELMAN 8/79 VOYAGE by Bruce Tognazzini, POKE 33,33 65538 REM MODIFIED BY H.J.GANNES 11/7 We bid adieu this month to a friend o allows us to edit our listed programs much easier, without using the escape Q the Apple Core with whom we all 65535 REM *** COPYRIGHT 1977 BY APPLE spent a great deal of time. But while characters. When listing sections of COMPUTER: WRITTEN BY R.WIGGINTON I'm sure we shall long remember him, a program with my printer, I & A.C. MARKKULA we are all certainly glad to be rido discovered that by using POKE 3 3,33 him. No, I'm not speaking of the first, the printer more efficiently Apple Core librarian, and no uses its 80 character width FAST S ORT ground-swells need apply; I am talking capability. The POKE 33,33 feature of course of good old ESC A. enables the printer to list faster and *300. 360 use less paper as it does not have to 85 08 AD 0300- A8 02 AD 08 08 "Going?", you ask incredulously, "ESC perform as many carriage returns. 00 D1 08 0308- 05 08 85 05 B1 A?" "But however will we steam past 0310- DO 06 C8 C8 03 DO F5 60 those huge horrible holes in our 0318- 90 08 A5 08 85 00 A5 05 listed quotes and rem statements. C9 8D FO 0320- 85 01 60 00 00 Enter stage left our hero, POKE 33,33. DO 08 C9 0328- 12 C6 1F 30 07 Yes, our old friend POKE, helping us MAKE A BOX 1E 30 FB 0330- C1 66 1E 60 28 out of yet another jam. Try him out FD A9 08 85 1F A9 0338- 8C FO the next time you have to copy a BY MAX J. NAREFF 60 A2 32 0380- 80 28 1E 10 F3 listed print statement. 0388- AO 00 BD 00 08 8A 8A 8A 0350- 00 Press ESC (shift) P (return); then type "POKE 33,33" (return). Now LIST Placing program headings within •300LLL your line(s) to be edited. You will borders adds to presentations. This note that the print statement is all is a simple routine which will create LDY $02 0300- A8 02 scrunched up* with no extra spaces on a box or border for headings. $0808 0302- A8 08 08 LDA the left-hand side. Now COPY over the $08 0305- 85 08 STA line, using the forward arrow. Since The first line draws the top border. LDA $0805 0307- AD 05 08 you have set a scrolling window 33 030A- 85 05 STA $05 ($00),Y characters wide, the cursor will 10 VTAB8: HTAB9: FOR X=1 TO 23 : PRINT 030C- B1 00 LDA automatically jump to the next line as CMP ($08),Y "*";: NEXT 030E- D1 08 soon as it reaches the right margin of BNE $0318 0310- DO 06 your text. How do you get out ot this The second line draws two sides. Note C8 INY 0312- mode? Just type "TEXT". This little how the ping-pong effect is achieved C8 03 CPY $03 0313- trick will work in both Integer and in the single line by the use of the BNE $030C 0315- DO F 5 Applesoft. And whom do we have to semi-colon after the first PRINT 0317- 60 RTS thank? Well, it appears everybody in BCC $0322 command. 0318- 90 08 the known world was aware of this one LDA $08 031A- A5 08 except the Apple Core, so I guess we STA $00 15 FOR X= 1 TO 13: HTAB9: PRINT 031C- 85 00 have to thank J. Alfred Glitch for LDA $05 HTAB32: PRINT "»": NEXT 031E- A5 05 keeping us in the dark so long. 0320- 85 01 STA $01 Thanks a lot, Alf. The last line closes the box. 0322- 60 RTS 0323- 00 BRK •This author has been asked to define 20 VTAB16: HTAB9: FOR X=1 TO 23: PRINT 0328- 00 BRK the term "scrunch". In this author's "*";: NEXT 0325- C9 8D CMP #$8D opinion, those cretins who asked him 0327- FO 12 BEQ $033B to do so should spend a little more Adjust the tabbing carefully for 0329- C6 1F DEC $1F time studying their technical manuals 032B- 30 07 BMI $0338 and a little less time criticizing position, and the loop dimensions for 032D- DO 08 BNE $0333 those who would utilize proper size of the box. The three lines can 032F- C9 C1 CMP #$C1 terminology. "Scrunch" is, of course, readily be combined into a single line 0331- 66 1E R0R SI E an historical term dating from the subroutine by adding a colon after 0333- 60 RTS late 80's and the original Apple, each terminating NEXT. 0338- 28 1E BIT $1E ENIAC. It was short for, 0336- 30 FB BMI $0333 appropriately enough, ESC CRUNCH, a The box can be entered for 0338- 8C FO FD JMP $FDF0 command which would cause a introduction and credit by succeeding 033B- A9 08 LDA #$08 shift-right of all the electrons lines using VTAB's and HTAB's to 033D- 85 1F STA $1F available in the entire five-story ascend the screen. One of caution: 033F- A9 8D LDA #$8D building. Needless to say ESC CRUNCH Using PRINT TAB (X) commands to enter 0381- 28 1E BIT $1E was the ENIAC's single most powerful the box will not be successful, 0383- 10 F3 BPL $0338 instruction; so powerful it lead to because those necessary but nasty 0385- 60 RTS the computer's eventual downfall, when semi-colons suppress carriage returns. 0386- A2 32 LDX #$32 an operator carelessly punched it up HTAB commands will perform, PRINT TA B 0388- AO 00 LDY #$00 while using the full 30K of core and (X) will not! Try it and see. '038A- BD 00 08 LDA $0800,X the right side of the building 038D- 8A LSR collasped from the sheer weight of the One final note: With 'ANDY'S KEYBOARD 038E- 8A LSR electrons. FILTER', some very striking borders 038F- 8A LSR can be created. 6 2 0350- 00 BRK CHARTS & TABLES NEGATIVE DECIMAL Assemble a notebook of handy charts TO HEX HEXADECIMAL and tables such as this and keep it by your Apple. You will find it cuts -23864 = ? down on your programming frustrations. •V ROD C ARLISLK <-)-23808 = A2

-56 = C8 While programming I o ften noticed the need to convert from hexadecimal to -23864 = A2C8 decimal. There are several programs available which will do this for you, EXAMPLES NEGATIVE DECIMAL but using them necessitates TO discontinuing the present program, HEX TO POSITIVE DECIMAL running the converter, then resuming POSITIVE ADD 65536 the program. This is an awkward DECIMAL process. I read with interest J.A. -23864 = ? Backman's Poor Man's Hex-Decimal-Hex A2C8 (+)65536 Converter in Peeking at Call APPLE A2 = 41472 Vol. I. However, t hat method C8 ={+>200 41672 suffered from the disadvantage of -23864 = 41672 requiring several additions or A2C8 = 41672 subtractions. There had to be a better way. HEX TO NEGATIVE I decided a larger table could cut DECIMAL down on the arithmetic. Also, I could take advantage of the fact that A2C8 usually all that Is required is A Hex A2 -23808 digits. I wrote the program which C2 (+>-56 generated the accompanying tables. With them one can convert from hex to A2C8 -23864 decimal or negative decimal into either of the other number systems POSTIVE with just one addition or subtraction. DECIMAL That sure beats the method they teach TO HEX in the books. Follow the examples which are included with the second 41672 table to see how they work. (->41472 = A2

The highes t Hex d igit is on the 200 = C8 table's left side. Going from Hex to 41672 = A2C8 Decimal presents no problems. Just find the equivalent of the first two POSITIVE DECIMAL digits in the lower table and add it TO NEGATIVE DECIMAL to the equivalent of the last two SUBTRACT 65536 digits in the upper table. When going from negative decimal to hex, first 41672 find the largest number In the body of (->65536 the second table whose absolute value is smaller than the given number. -23864 Then subtract that number from the 41672 = -23864 given number and find the difference in the upper table.

THE APPLEHEADS R. & E. HANCE

• 4 HEXADECIMAL TO POSITIVE DECIMAL

HF,X 0 1 2 ? 4 5 § 7 8 9 B c D E F HEX 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 2 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 2 3 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 3 4 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 4 5 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 5 6 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 6 7 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 / 8 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 8 9 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 9 A 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 A B 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 B C 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 C D 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 U 229 230 231 232 233 234 235 236 237 238 239 E E 224 225 226 227 228 255 V F 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 E F HEX HEX 0 1 2 3 4 5 6 7 8 9 A B C D 3584 3840 0 0 0 256 512 768 1024 1280 1536 1792 2048 2304 2560 2816 3072 3328 7680 7936 1 4096 4352 4608 4864 5120 5376 5632 5888 6144 6400 6656 6912 7168 7424 1 2 8192 8448 8704 896 0 92 16 94 7 2 972 8 9984 10 240 10 496 107 52 110 08 112b4 2 3 12288 12544 12800 13056 13312 13568 13824 14080 14336 14592 14848 15104 15360 15616 15872 16128 3 4 16384 16640 16896 17152 17408 17664 17920 18176 18432 18688 18944 19200 19456 19712 19968 20224 4 5 5 20480 20736 20992 21248 21504 21760 22016 22272 22528 22784 23040 23296 23552 23808 24064 24320 6 6 24576 24832 25088 25344 25600 25856 26112 26368 26624 26880 27136 27392 27648 27904 28160 2841 7 7 28672 28928 29184 29440 29696 29952 30208 30464 30720 30976 31232 31488 31744 32000 32256 8 8 32768 33024 33280 33536 33792 34048 34304 34560 34816 35072 35328 35584 35840 36096 9 9 36864 37120 37376 37632 37888 38144 38400 38656 38912 39168 39424 39680 39936 40192 A A 40960 41216 41472 41728 41 984 4 2 2 4 0 4 2 4 9 6 4 2 7 5 2 4 3 0 0 8 4 3 2 6 4 4 3 5 2 0 4 3 7 7 6 4 4 0 3 2 B B 45056 45312 45568 45824 46080 46336 46592 46848 47104 47360 47616 47872 48128 C C 49152 49408 49664 49920 50176 50432 50688 50944 51200 51456 51712 51968 52224 5 D D 53248 53504 53760 54016 54272 54528 54784 55040 55296 55552 55808 56064 56320 56576 56832 57088 E E 57344 57600 57856 58112 58368 58624 58880 59136 59392 59648 59904 60160 60416 60672 6U928 ^ F F 61440 61696 61952 62208 62464 62720 62976 63232 63488 63744 64000 64256_6

HEXADECIMAL TO NEGATIVE DECIMAL

HEX 0 1 8 B HEX 0 -256 -255 -250 -249 -248 -247 -246 -245 -244 -243 -242 -241 0 1 -240 -239 -234 -233 -232 -231 -230 -229 -228 -227 -226 -225 1 2 -224 -223 -218 -217 -216 -215 -214 -213 -212 -211 -210 -209 2 3 -208 -207 -202 -201 -200 -199 -198 -197 -196 -195 -194 -193 3 4 -192 -191 -186 -185 -184 -183 -182 -181 -180 -179 -178 -177 4 b -176 -175 -170 -169 -168 -167 -166 -165 -164 -163 -162 -161 5 b -160 -1 59 -154 -153 -152 -151 -150 -149 -148 -147 -146 -145 6 1 -144 -143 -138 -137 -136 -135 -134 -133 -132 -131 -130 -129 7 8 -128 -127 -125 -124 -123 -122 -121 -120 -119 -118 -117 -116 -115 -114 -113 8 9 -112 -111 -109 -108 -107 -106 -105 -104 -103 -102 -101 -100 -99 -98 -97 9 A -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 A B -80 -79 -78 -77 -76 -75 -74 -73 -72 -71 -70 -69 -68 -67 -66 -65 B e -64 -63 -62 -61 -60 -59 -58 -57 -56 -55 -54 -53 -52 -51 -50 -49 C D -48 -47 -46 -45 -44 -43 -42 -41 -40 -39 -38 -37 -36 -35 -34 -33 D E -32 -31 -30 -29 -28 -27 -26 -25 -24 -23 -22 -21 -20 -19 -18 -17 E F -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 F HEX 0 1 2 3 4 5 6 7 8 9 A B C D E F HEX 8 -3 2512-32256-32000-31744-31488-31232-30976-30720-30464-30208-29952-29696-29440-29184-28928-28672 8 9 "2 8416-28160-27904-27648-27392-27136-26880-26624-26368-26112-25856-25600-25344-25080-24832-24576 9 A "24320- 24064-23808-2 3 552-2 32 96-2 30 4 0-2 2 784- 2 25 2 8-2 2 27 2-2 20 16-2 17 60-2 150 4- 2 124 8-2 09 92-2 073 6-2 04 80 A B -20 224-19968-19712-19456-19200-18944-18688-18432-18176-17920-17664-17408-17152-16896-16640-16384 B C "16 128-15872-15616-15360-15104-14848-14592-14336-14080-13824-13568-13312-13056-12800-12544-12288 C D -12 032-11776-11520-11264-11008-10752-10496-10240 -9984 -9728 -9472 -9216 -8960 -8704 -8448 -8192 D E -7936 -7680 -7424 -7168 -6912 -6656 -6400 -6144 -5883 -5632 -5376 -5120 -4864 -4608 -4352 -4096 E j -3840 -3584 -3328 -3072 -2816 -2560 -2304 -2048 -1792 -1536 -1280 -1024 -768 -512 -256 OF

Chart by Rod C arlisle (Cider Press v2.6)

6 5

esi oo eD -a v£> o - lO 00 eg en I *3" I -a o rH pa pa id id id Pd X Po pz- 'j-i Cn X| Pn IPM -M Pn Pb u XI n Pu I Pz< I ^ PM [x, •M XI | Q P-L pa m jn CT% CO rH I I I I 1 l o |o |0 |o o o o CJ o o o o o o CJ K> K> CJ CJ CJ CJ CJ c* pa o Pu rH m I/n x o Z O en p^ PM Pk oa Cn CL-I PM X IPK Pn Pn 52 Px pM X I ^ CO PU PQ X CO CO co PQ en m CT\ CO I Q rH • , I I 1 i i 1° o o o w o o o o o o o o o o o o o 00 00 00 3 00 00 00 00 oo z OM CO o Pz- rH en m O H eO X , O f rM W W Pd P. X ^ V pz- Ph 3 en pL| n X p pc- en en PM •M O •M CJ P. £ ->0 O I ^ r-» I r~- < r^. r>- (P-zg « I en <3 m r-~ PQ 0 rH • < p I 1 CSl I • H 1 i 1 I PU S5 o o Pe­ o 0 o o |o o PH lo I o o • H o o o o |o o M M p>- n X Pm X Pn ca P. X Pi- P-. PM X| PC X w Icn en m en m en I en m P- en M m PM ION PQ o Pn rH P I 1 i i , I , I o o <3 o c O o O o o o o O o o o C5 o O o o X o Pd O o lo o rH en m r»- ON PQ o Pn O CJ

z PM PM X •z- Pm Pk Pn j-t PM o X o j-i IS X pt- P*4 JM PM X Pk x IX Po P-l O CM M M v£> I 00 u w • • , I CJ 1 i I I I , I ° o O H o H o o o o o o o 0 o en o o !=> O CJ CJ CJ CJ 1 CJ CJ •J o CM -d- | 00 <3 o z w en •J »-3 o O O w CM CO en PM pc3 PM X p. X Po I H |Pk PH o CO PM w X w Pn p Pn Pe­ PQ PQ PQ CO PQ ca CJ rt O H s CM X 100 CJ J) w 52 1 X 1 1 i I I I z , i Pd o w o O o o o o o < o w o H HJ O o o o o o s o O oo 00 X 00 sa oo 00 00 00 oa 00 .JOS o CM <*• v£> 100 ft- \< CJ Pk PJ W o o Pd M re as < PJ rH X P- PM & PM X Pn i ^ X pa PM PM O cn PM X Po Ipm Pu X M pe- r^ r^ r~- I < o a CM vo I oo \< CJ oa w i X?s 1 |1 I I I 3 I o wi O o o o o o Pd o o H •J O o o lo o o Q

Pd CO x CJ W PM •< M PM X Pn Pn Po Pb Pn PM P- H PM X Pz- Pz- Po Pu PL- en M en en CO co cn cn cn O O HJ CM

O -O -J! FI4 O <5~ 6 6 INTEGER BASIC TOKEN CHARACTER SET

BY LINDA SLOVICK

TOKENS CHARACTER

TOKEN DEC HEX DEC HEX CHR DEC HEX 500 "[HIMEM: ] 64 $140 192 $ CO 501 EOL 65 $141 193 $ CI 502 _ 66 $142 194 § C2 503 • 67 S143 195 5 C3 C LOAD 68 ?144 196 |C 4 D SAVE 69 5145 197 $ C5 E CON 70 $146 198 $ C6 F RUN 71 I147 199 $ C7 G RUN 72 5148 200 S:C 8 H DEL 73 549 201 $IC 9 I SOA , 74 54A 202 SIC A J NEW 75 54B fEXT 203 $:C B CLR 76 ?>4 C GR 204 $IC C AUTO 77 5>4 D CALL 205 $;C D SOE , 78 54E DIM 206 $IC E MAN 79 54F DIM 207 $IC F HIMEM: 80 ?550 TAB 208 $ID O P 209 $ID 1 Q LOMEM: 81 i551 END ID 2 512 + 82 i 552 INPUT 210 $ R H, ID 3 S 513 — 83 \553 INPUT <$ or "S> 211 S * 212 $ID 4 T 514 84 ?554 INPUT ID 5 15 / 85 >55 FOR 213 I s 214 5ID 6 16 86 \>56 = 215 SID 7 >17 # 87 J557 TO ID 8 ?18 >« 88 ?558 STEP 216 $ X 217 \ID 9 Y 519 > 89 i 55 9 NEXT 5DA <= 55A 218 I Z S1A 90 219 5DB .[ >1B <> 91 I55 B RETURN 220 55 DC SIC < 92 ?55 C GOSUB 221 >DD AND 93 i 55D REM 222 5DE OR 94 55E LET 223 >DF MOD 95 55F GOTO 224 $> E0 >20 96 ?560 IF 225 5? E1 (a) 521 + 97 i>61 PRINT <'""S> 226 I5 E2 " (b) 522 ( 98 >62 PRINT 227 E3 # (,c ) 523 99 563 PRINT 228 :> E4 $ 100 64 POKE 229 ;> E5 % (.e ) THEN < stmt> 101 >65 230 !> E6 & ( 526 , <8tring> 102 566 COLOR= 231 5> E7 ' i 527 . 103 67 PLOT 232 !> E8 ( 1: S 528 ' 104 68 233 '>E 9 ) 1; D " 105 ? 6 9 HLIN 234 !> EA * ( 1 j ( 106 6 A 235 '> EB + ( k !i) 52B 1 107 6B AT 236 '? EC » ' 52C i 108 $56 C VLIN 237 15 ED - 1 S2D ( 109 556 D 9 238 !J EE . (:°, n) PEEK 110 6E AT 239 :S EF / ( RND 111 5 6F VTAB 240 1>F 0 0 i(p ) SGN 112 !>70 = 241 •SF 1 1 i( q ABS >71 SF2 2 i( r) 113 ! 242 : S PDL 114 !>72 243 !£F 3 3 ( J RNDX 115 ! 73 244 :?F 4 4 i t) ( 116 ! 74 LIST 245 :S F5 5 (u) 6 (v) 535 + 117 ! 75 246 :?F 6 w - 118 !>76 LIST 247 :$F 7 7 <( ) 8 U) NOT 119 !>7 7 POP 4 ^ 248 :!? F8 538 ( >78 NODSP 249 $F9 9 y 120 ! (1 z) 539 X 121 I>79 NODSP 250 :S FA : SFB » 53A # 122 !>7A NOTRACE 251 < LEN< 123 !>7B DSP 252 $FC DSP 253 $FD ASC( 124 :57C > SCRN 57D TRACE 254 $FE 125 : 255 $FF ? 53E i 126 !>7E PR# 53P ( 127 !?7F IN# 6 7 appleso ft interpreter set ROM ADDRESSES D000-F7FF SUBROUTINES - ENTRY P OINT LISTING:

NAME OF SUB FUNCTION ADDRE83 NAME OF SUB FUNCTION ADDRESS

SO 848 RESTORE RESTORE DATA PT SD86F S03F4 END TERMINATE EXECUTION 3F4 HOOK BRANCH TO MACH SD765 SO 920 FOR START OF FOR NEXT LOOP GOSUB GOSUB BRANCH FUNCTIO N SDCF8 SD96A NEXT END OF FOR/NEXT LOOP RETURN RETURN FROM GOSUB $0 994 SD9DB DATA DEF OF A DATA STMT REM REMARK STATEM ENT $DBB 1 INPUT INPUT ROUTINE EXEC STOP STOP PROGRAM $F32C SD9EB DELETE DELETE A LINE FUNCTION 0NG0T0 ON GOTO SDFD8 783 DIM DIMENSION A VAR FUNCT. WAIT WAIT FUNCTION SE $DBE1 SD8C8 READ READ DATA ROUTINE LOAD LOAD TAPE PGM $F 38B S08AF SETGR SET GRAPHICS ROUTINE SAVE SAVE TAPE PGM $F 394 IE 312 SETT XT SET TEXT MO DE ROUTINE DEF DEF USER FUNCTION JF1E4 SE774 PR# SET OUTPUT PORT POKE POKE MEMORY LOC SET INPUT PORT $F 1DD SDAD4 IN# PRINT PRINT OUTPUT CALL USER MACH SUB $F 1D4 $0895 CALL CONT CONTINUE EXECUTION PLOT A POINT-LORES $F 224 S06A4 PLOT LIST LIST PROGRAM DRAW HORZ LINE-LORES $F 231 $0669 HLIN CLEAR CLEAR VARIABLES SF240 $DB9F VL IN DRAW VERT LINE-LORES GET GET A CHAR INPUT SET HIRES PAGE 2 $F 3D3 SEB90 SETHR-2 SGN SIGN OF NUMBER SET HIRES PAGE 1 SF3DD SEC23 SETHR-1 INT INTEGER FUNCTION SET HIRES COLOR $F 6E4 SEBAF SETHRCa ABS ABSOLUTE VALUE DRAW LINE HIRES X, Y $F6F9 SE2DE LINE FRE FREE MEMORY DRAW DRAW SHAPE SPECIFIED $F 764 SOFCD POL GAME PADDLE EOR DRAW SHAPE $F76A SE2FF XDRAW POS POSITION IN HIRES HTAB HORZ TAB X # SPC. $F 7E 2 JEE8D SQR SQUARE ROOT CLRSRC CLEAR SCREEN $FC 57 SEFAE RND RANDOM NUMBER SETROT SET ROTATION SHAPE $F 71C SE941 LOG LOG X BASE 10 SET SCALE SET SCALE FOR SHAPE $F 722 SEFEA EXP EXPONENT FUNCTION SHLOAD LOAD A SHAPE TABLE $F 770 SEFF1 SIN SIN FUNCTION TURN ON TRACE $F 26C SF03A SETTRACE TAN TANGENT FUNCTION TRACEOFF TURN OFF TRACE $F 26E SF09E ATN ARCTANGENT FUNCTION SETNORM SET NORMAL TEXT $F 272 SE764 PEEK PEEK MEM ORY INVERSE SET INVERSE TEXT $F 276 $E 60 6 LEN LENGTH FUNCTION FLASH SET FLASHING TEXT $F27F STR$ CHAR-NUMERIC VAR $EX5 COLOR SET LORES COLOR SF24E $E 707 VAL VALUE STRING CHAR RETURN RETURN FROM SUB $D96A SE6E5 ASC ASCII FUNCTION VTAB VERTICLE TAB $F 255 $E 646 CHRS CHAR STRING FUNCTION HIMEMSET SET HIMEM POINTER $F 285 SE65A LEFTS LEFT JUSTIFIED LOMEMSET SET LOMEM POINTER $F 2A5 SE686 RIGHTS RIGHT JUSTIFIED ONERR SET ONERR FLAG $F2CA MIDS MID STRING FUNCTION $E 691 RESUME CONTINE FROM ONERR $F 316 SE7C0 FADD FLOATING POINT + RECALL RECALL VARIABLE-TAPE $F 3B 7 SE7A9 F SUB FLOATING POINT - STORE SAVE VAR IA LBLES-TAPE $F 39A "SE 981 FMULT FLOATING POINT x SETSPD SET SPEED FOR OUTPUT $F 261 SEA68 F 01V FLOATING POINT / LET LET ASSIGN VARIABLE $DA45 SEE 96 FPWR FLOATING POINT PWR GOTO GOTO BRAN CH FUNCTION $D93D SDF54 AND AND FUNCT ION RUN EXECUTE A PROGRAM $0911 SDF4E OR OR FUNCTION IF IF TEST FUNCTION $D9C8 SEECF $0FF64 NEG NEGATE FUNCTION DOREL DO RELATION TEST JOE 97 NOT NOT FUNCTION THE APPLEHEADS E. HANCE APPLE COWS) ...AND CALLS

11 PEEKS POKES & CALLS

THANKS TO CHRI8 ESPINOSA, PAUL WYMAN, A APPLE COMPUTER

CALLS $FE84 CALL -380 Set Normal Mode Jump to basic Most of these functions can be executed by a CALL to the SFEB0 CALL -336 proper address from an Integer BASIC program. Some CALLs SFEB3 CALL -333 Continue basic may not be executed In the middle of a line in an Integer SFEBF CALL -321 Display registers BASIC program: The CALL must be alone or at the end of a A,X,Y,P,S Current Values program line. SFEC2 CALL -318 Perform monitor trace $FECD CALL -307 Write to tape Read from tape HEX ADD CALL EXPLANATION SFEFD CALL -259 SFF3A CALL -198 Ring bell Save registers $E000 CALL -8192 Reset Integer BASIC $FF4A CALL -182 Enter System Monitor, Integer Basic Kill $FF59 CALL -167 reset text mode -Clear workspace $FF65 CALL -155 Enter System Monitor & SE04B CALL -8117 List Integer program Ring Bell SE836 CALL -6090 Run Integer $FF 69 CALL -151 Enter System Monitor SE07B CALL -3973 Load Integer Program No beep from tape $EF70 CALL -144 Scan input buffer SF140 CALL -3776 Save Integer Program $FF70 CALL -144 Scan the input buffer to tape $F666 CALL -2458 Enter mini-assembler SF800 CALL -2048 Plot a point The following CALLS require various address to be POKEd Draw a horizontal $F 819 CALL -2023 into locations in the Apple's memory. These locations are line organized into three "registers", called A1, A2, and A4. •2008 Draw a vertical line SF828 CALL The actual address for A1, A2, and A4 can be found in the $F832 CALL • 1998 Clear Graphic Screen section on PEEKs. $F847 CALL •1977 Calc. graphics baseaddress $F85F CALL • 1953 Change Color +3 $FE2C CALL -468 Move a Range of Memory CALL -1948 Adjust color byte for $F864 call -458 Verify Two Ranges of Memory both halves equal $FE36 $FECD CALL -307 Write a Range to Tape $F871 CALL -1935 Read a point of the CALL -259 Read a Range from tape low res graphics screen 1 SFEFD $FD92 CALL -622 Print A1 In Hexadecimal $FA43 CALL -1469 Perform a single step SFA86 CALL -1402 IRQ Handler The following subroutines require you to POKE several Break handler SFA92 CALL -1390 values into some memory locations. These locations Display user reg SFAD7 CALL -1321 represent the microprocessor's A,X,Y and Status regusters, Read paddle controls SFB1E CALL -1250 and the Stack Pointer (These are the same registers you can -1233 Screen initialization SFB2F CALL examine with the Monitor's CTRL E command), for the Reset TEXT mode address of these locations see section on PEEKs. $FB39 CALL •1223 Set text screen SFB40 CALL •1216 Set graphics screen $FEB6 CALL -622 Call a Subroutine SFB4B CALL -1205 Set normal window SFB63 CALL -1181 Multiply routine (This loads the internal registers with the values you have $FB84 CALL -1148 Divide routine POKEd into locations 69 through 73, and jumps to the SFBC1 CALL -1087 Calculate text base subroutine whose address has been POKEd into locations address and 559 (PCL & PCH). The subroutine acts just as if it had SFBE4 CALL -1052 Produce a bell been CALLed from BASIC directly, and returns accordingly. SFBF4 CALL -1036 Advance Cursor SFBFD CALL -1027 Output a reg as ASCII on text screen 1 SFEBF CALL -321 Display Registers (69 SFC10 CALL -1008 Backspace Cursor thru 73). SFC1A CALL -998 Move cursor up SFDDA CALL -550 Display the A-register SFC22 CALL -990 Perform vertical tab in Hex (location 69). $FC2C CALL -980 Escape functions SFC9C CALL -868 Clear to end of line SFC42 CALL -958 Clear to end of screen $FC58 CALL -936 Home and Clear SFC62 CALL -926 Carriage return P 0 K E S SFC66 CALL -922 Cursor down-line feed SFC70 CALL -912 Scroll screen $FC9C CALL -868 Clear to end of line HEX POKE EXPLANATION $FCA8 CALL -856 Wait loop ADD DEC ADD VALUE LIMITS SFDOC CALL -756 Walt for Keypress $FD1B CALL -741 Monitor keyin routine $0020 POKE 32,X Window Left SFD35 CALL -715 Read key & per esc fun 0-39 if necessary $0021 POKE 33,X Window Width SFD62 CALL -670 Perform a line cancel (/•) 0-40 SFD67 CALL -665 Perform Line Feed and $0022 POKE 34,X Window Top wait for input 0-24 $FD6A CALL -662 Prompt and wait for $0023 POKE 35,X Window Bottom input 0-24 SFD6F CALL -657 Get a Line $0024 POKE 36,X Cursor Horizontal SFDDA CALL -550 Print a byte as 2 hex $0025 POKE 37,X Cursor Vertical digits $0026 POKE 38,X GBASL Graphics baseaddress $FDE3 CALL -541 Print hex digit $0027 POKE 39,X GBASH $FDED CALL -531 Output char, via user $0028 POKE 40,X BASL Text screen base output address Monitor char, output SFDFO CALL -528 $0029 POKE 41 ,X BASH SFE2C CALL -468 Perform memory move $002A POKE 42,X BAS2L Temp, base addr. CALL -458 Perform memory verify SFE36 $002B POKE 43,X BAS2H Disassemble 20 instr. SFE5E CALL -418 $0030 POKE 48,X Color (0-15) CALL -384 Set Inverse Mode SFE80 $0031 POKE 49,X Mode POKES (CONT.) 1 X U o C0UT text modes $0032 POKE SC053 X=PEEK(-16301) mix TEXT and a 255-Normal mode GRaphics mode 63-Inverse mode $C054 X=PEEK( • 16300) Primary page 1. 127-Flashing mode $C055 X=PEEK( • 16299) Secondary page 2. $0033 POKE 51,X Prompt Character SC056 X=PEEK( • 16298) LO-RES GRaphics $0036 POKE 54,L CSWL SC057 X=PEEK(- 16297) HI-RES GRaphics $0037 POKE 55,H CSWH:CHARACTER OUTPUT SC060 X=PEEK( - 16288) Cassette Input $0038 POKE 56, L KSWL $C061 X=PEEK(- 16287) Read Pushbutton controller 0 $0039 POKE 57,H KSWH:CHARACTER INPUT SC062 X=PEEK(- 16286) Read Pushbutton controller 1 Sc063 X=PEEK(- 16285) Read Game I/O Pin 4

The POK Es below may be used before a CALL -327 to CANL a X = PEEK (218) + PEEK (219) x 256 sets X equal to the line machine language program with parameters. number of the statement where an error occurred If an 0NERRG0T0 statement has been executed. $003 A POKE 58,L PCL IF PEEK (216)5127 THEN GOTO . If bit 7 at memory $0036 POKE 59,H PCH location 222 (ERRFLG) has been set true, then an 0NERRG0T0 $0045 POKE 6 9,X A-register statement has been encountered. $0046 POKE 7 0,X X-register POKE 216,0 Clears ERRFLG so that normal error messages will $0047 POKE 71,X Y-register occur. $0048 POKE 72,X Status register Y - PEEK (222) Sets variable Y to a code that described $0049 POKE 7 3,X Stack Pointer type of error that caused an ONERRGOTO jump to occur.

POKEs be low (60-67) can be used in conjunction with various The locations below may be PEEKed to determine what type of CALLs to perform many System Monitor commands from BASIC Apple Intelligent Interface card is installed in each slot. (see CALL list). If X is 44 - Communications Card, 162 - Disk Controller, 72 Heuristics Speechlab. Others not known at this time. $003C POKE 6 0,L A1L $0030 POKE 6 1, H A1H $C100 X=PEEK(-16128) Slot 1 $003E POKE 6 2,L A2L $C200 X=PEEK(-15872) Slot 2 $003F POKE 6 3,H A2H $C300 X=PEEK(-15616) Slot 3 $0042 POKE 6 6,L A4L SC400 X=PEEK(-15630) Slot 4 $0043 POKE 6 7,H A4H $C500 X=PEEK(-15104) Slot 5 SC600 X=PEEK(-14848) Slot 6 C$C010 P0KE-16368.X Clear Keyboard $C700 X=PEEK(-14592) Slot 7 Strobe $C020 P0KE-16532.X Toggle Cassette output $C030 P0KE-16336,X Toggle Speaker A PEEK at this location determines which Monitor ROM is $C040 P0KE-16320.X Strobe Game 1/0 installed in the Apple. If X is 0, then the Auto-Boot $C050 P0KE-16305.X Set Graphics Mode Monitor is in; if X is 1, then the original Apple Monitor $C051 P0KE-16303.X Set Text Modes ROM is installed. $C052 POKE-16302.X Full-Screen Graphics $C053 P0KE-16301,X Mixed Text and Graphics $FAFF X=PEEK(-1281) Monitor $C054 P0KE-16300.X Display Primary Page $0055 P0KE-16299.X Display Secondary Page The PEEKs below all require you to convert the values in $C056 P0KE-16298.X Set Block Graphics two separate memory locations into one decimal number which $C057 P0KE-16297.X Set Dot Graphics BASIC can handle. This conversion involves two steps: $C000 POKE-16384.X Read Key to see which key first, obtaining the values in the locations; and second, amalgamating the two values into one decimal number. The following pairs of PEEKs give two values, stored in the two A P OKE t o one of the locations below specifies the state of variables L and H. the output on the pin of the Game 1/0 Connector associated with that Annunciator. Set is +5 volts; clear is 0 volts. $0028 L=PEEK(40) BASL $0029 H-pEEK(41) BASH-Cursor Base Address $C058 POKE 16296,X Clear, $0036 L=PEEK(54) CSWL SC059 POKE 16295.X Set Annunciator 0 $0037 H=PEEK(55) CSWH-Output Subroutine $C05A POKE- 16294.X Clear, $0038 L=PEEK(56) KSWL H=PEEK(57) KSWL-Input Subroutine $C05B POKE- 16293.X Set Annunciator 1 $0039 SC05C POKE- 16292.X Clear, $004E L=PEEK(78) RNDL H=PEEK(79) RNDL-Random Number Seed $C05D P0KE-16291,X Set Annunciator 2 $004F L=PEEK(74) LOMEML $C05E POKE 16290,X Clear, $004A $C05E POKE 16289.X Set Annunciator 3 $004B H=PEEK(75) L0MEMH $004C L=PEEK(76) HIMEML $004D H=PEEK(77) HIMEMH PEEKS $0OCA L=PEEK(202) PPL $00CB H=PEEK(203) PPH-Program Pointer $0OCC L=PEEK(204) PVL H=PEEK(205) PVH-Variable Pointer $00CD $00DC L=PEEK(220) LINEL H=PEEK(221) LINEH-Line Number $00DD HEX PEEK EXPLANATION z $00£0 I -PFEK(22 O STL H=PEEK(225) STL-Beginning of Statement $0OE1 $0020 X=PEEK(32) Window Left $0021 X=PEEK(33) Window Width $0022 X=PEEK(34) Window Top $0023 X=PEEK(35) Window Bottom $0024 X=PEEK(36) Cursor Horizontal $0025 X=PEEK(37) Cursor Vertical $0030 X=PEEK(48) Color $0032 X=PEEK(50) Video mode $0033 X=PEEK(51) Prompt Character $COOO X=PEEK(-16384) Keyboard $C010 X=PEEK(-16368) Clear key. strobe $C050 X=PEEK(-16304) GRaphics mode $C051 X=PEEK(-16303) TEXT mode $Co52 X=PEEK(-16302) all TEXT or GRAPHICS NOTES

7 2 £asy Write#? The Professional Word Processing System for your Apple-ll Personal Computer

t Wk

% * ^sy Maf/^ A Continuous Letter Writer

J. U O •» S-l I US v . . -v A ^ *,

* ^ »• #, ^0syMove„ X - ™ X * /# A Personal Electronic Mail S ' " - i *?r 1 U S ,

IUS (Information Unlimited Software, Inc.), 281 Arlington Ave., Berkeley, CA 94707 415-525-4046 / 525 '