Skip to main content

Open Apple Vol 3 No 04 MAY 1987

  • PublicationApple Periodicals
  • Date1987-05-01
  • Pages8
  • SourceOpen_Apple-Vol_3_No_04-MAY_1987.pdf
← Magazines Open Apple Vol 3 No 04 MAY 1987
/ 8
Source: Internet Archive — Aggregated Apple-era periodicals, 1981–2012.
Page 1
Loading…
Text content (OCR)
Releasing the power to everyone, Verses added to a golden oldie At the very core of every Apple II ever built, from the first Integer Basic model to the IIgs, you'll find something called the System Monitor. This built- in software allows you to examine and control the Apple II at a very intimate level. Citizens of other computer kingdoms, who don‘t have similar programs built into their computers, will tell you the Apple Monitor has little significance —they'l say only assembly language high priests can use it. In fact, just the opposite is true. The significant thing about the Apple Monitor is that it has lured tens of thousands of mere mortals into learning how the Apple Il works, There are no. secrets in our kingdom (it's a tradition handed down from Woz) and there are no high priests. The Monitor is one of the major tools used by laypeople to tearm how to release the power of the Apple II. Likewise, it is this body of thousands of laypeople who have leammed how to release the Apple II's power that make the Apple [! different from the machines at the center of other kingdoms, Being one ofthe mere mortals myself (computer high priests rarely accept English majors as one of their own), I've always had a great deal of respect for the Monitor. Way back at the beginning of Opes-Apple’s Volume 1 you'll find two articles, “A Song Called the System Monitor’ (February 1985, pages 19- 112) and “A Song Continued” (March 1985, pages 120-121}, that were written to introduce the Monitor to those of you who had never used it. The articles describe the Monitor as it exists on the original Apple IL, the II-Plus, the Ile, the IIc, and the enhanced Ile, This month we're going to summarize what was explained in detail in those issues and we're going to take a closer look at the Monitor as it exists on the new Apple IIgs. The Monitor changed hardly at all between the original Apple II and the enhanced Ile, even though the machines themselves progressed through several revisions. For example, the memory capacity of the machines grew from 48K to 64K to 128K, but the memory-examining capacity of the Monitor never grew beyond the original 48K. Apple has fixed all this in the Ilgs, however. The ligs Monitor has been enhanced with new powers and new commands. On the IIgs you can examine and manipulate memory in the “language cards” and in the “auxiliary bank” as easily as any other memory. In addition, you'll find memory displays that can take advantage of 80-column screens and show ASCII values, commands for converting numbers back and forth between hex and decimal, and several commands that support new features of the ligs. Entering the Monitor. The usual way of entering the Monitor is from Applesoft with a CALL -151 command, The entry point of the machine language program that is the Monitor starts at $FF69, which is equivalent to -151 in decimal (or 65385, take your pick). Another way to get into the Monitor is to get the microprocessor to execute a BRK (break) command. The microprocessor will do this whenever it encounters a zero (the machine code for BRK) as it is executing a machine language program. Most users think of this as “crashing into the Monitor.” When the program you are using beeps, puts an asterisk on the screen, and displays a new row of letters and numbers every time you press retum, thisis what has happened to you. Unless you have a IIgs, you'll see a line that looks something like this somewhere on your screen: OG¢2- RADE X15 ¥=25 P=30 SEG Onaligs, the line looks more like this: 0/0800; 02 eo ERK 00 ALOGBE X-0015 Y=0025 S-@1E4 0-0000 P32 B20 K-08 M-@C U-S@ L=1 mel x=1 e=1 —Oper-Apple ij; May 1987 Vol. 3, No. 4 ISSN 0885-4017 newstand price: $2.00 photocopy charge per page: $0.15 Machine language programmers use BRK for debugging purposes. A BRK stops a program at a spot selected by the programmer and allows examination of the microprocessor’s memory registers and the computer's memory. When a commercial program executes a BRK and crashes into the Monitor, its a bug. Finished programs aren’t supposed to do that. A third way to get into the Monitor, but only on the llgs, is with a desk accessory called Diversi-Hack. interrupt any program with open-apple/ control/escape to get to the Ilgs desk accessory menu, choose Diversi-Hack fromthemenu, and you are in the Monitor. The IIgs Monitor's new Q(uit) command will take you back to the desk accessory menu; a quit from there will take you back to the program in progress. For more about Diversi-Hack, see my introduction to this month's letters. Once you get into the Monitor, you'll find that its commands fall into four Groups. There are commands for examining memory, commands for changing memory, commands for program control, and miscellaneous commands, Examining Memory. The values found ina computer's memory cells can representjust about anything, but most often they representeither numbers, ASCII characters, or machine language programs. The IIgs Monitor gives you tools to examine RAM and ROM memory from each of these three perspectives. (The Monitor on older Apples doesn't include an ASCII display. but Open- Apple already solved that problem back on page 112. Ifyou don't know RAM from ROM from registers, go back to the beginning ofour second volumeand try “The Magic of Peek and Poke,’ February 1986, pages 2.2-2.5.} To look at memory from the perspective of numbers, you enter the hex address that you want to see the contents of and press retum. Successive retums display successive bytes of memory. To display a range of memoryall at once, enter the beginning and ending addresses separated by a period. The ligs offers several enhancements to this system. First of all, the IIgs displays the ASCII representation of each byte along with the numerical “WHY WORK FOR APPLE? THINK BIG SON. YOU CAN SIMULTANEOUSLY’ BRING 10,000 USERS To THEIR KNEES WITH A SYSTEM UKE THIS ONE” 9.490 OUpen-Appie value. Ifyou are in 80-column mode, the Monitor will notice it and will display 16 bytes on each line instead of the usual eight. Finally, pressing control-Xwill terminate the display of a range of memory values. On older Apples, the only way to terminate range display is to press control-reset. Here is what the 80- column memory display looks like on the ligs: *2000.20°F 0/2000:@0 01 02 @3 04 05 a6 07 28 05 2A OB OC OD OE OF. 00/2010:10 11 12 13 14 15 16 17 1B 18 19 1B 1C 10 1E 1F @0/z020:20 21 22 23 24 25 25 27 2B 29 2A 2B 2C 2 2 oF WnsRe 0/2¢30:30 31 32 33 34 35 36 37 3839 9A 98-30 30 HE 3F-01239455709: ;<=)7 00/2040:40 41 42 43 44 45 46 47 48 49 4A 49 40 4D 4E 4F-BABCDEFGHIJKLMND @0/2050:50 51 52 53 S4 55 56 57 58.59 5A 58 SC SD SE SF-PORSTUVUXYZ|\}_ 00/2060:60 61 62 63 64 65 66 6? 68 69 SA 6B GC 6D GE 6F-“abcdefghi jkImno 90/2070:70 71 72 73 74 75 76 77 78 73 78 7B 7C 7D 7E 7F-parstuvuxyef| }~. 90/2000:80 61 82 83 G4 85 BS G7 EB EI BF HB BC BD BE EF. . 90/2090:90 91 92 93 94 95 96 97 98 99 9F 9B 9C 90 9E 5F- 00/2090:A0 AL AZ AB A4 AS ABA? AB AS AR AB AC AD AE AF- I~Hsee’() 00/z08¢:80 E1 82 83 84 BS 86 87 BB ES BA BB BC GD BE SF-0123456789: e0/zece:ce Ci Cz C3 C4 CS CS C7 CB CS CA CB CC CO CE CF-SA@CEFGHIIKLYNO 90/200¢:0@ D1 02 D3 Dé 05 D6 D7 DB D9 DA 0B DC DO DE OF-PURSTUVAXYZ[\]“_ 00/2060:E0 £1 £2 £3 £4 ES £6 E7 EB E9 ER £8 EC ED EE EF-"abcdefighi jilano 90/20F0:F FL F2 F3 Fa FS FG F? FB FS FA FB FC FO FE FF-pgrstuvuxy2{| }~. The ASCII characters on the right side of the display represent the same sixteen characters that appear numerically in the midsection of the display. This example shows a range of memory that I purposefully filled with values from 0 to 255 so you could see the relationship between values and ASCII characters. Control-characters are displayed as periods. No distinction is made between high-value and low-value ASCII. The numbers on the left edge represent the memory address of the first of the sixteen bytes in each line. The 6502 microprocessor used on earlier Apples could accommodate only 65,536 discreet memory cells. Thus Monitor addresses on these Apples ran from $0000 to $FFFF. The micropro- cessor in the Ilgs, on the other hand, can accommodate 16,777,215 discreet memory cells, These are arranged as 256 “banks” of 65,536 cells each. The number in front of the slash indicates which bank you are looking at The number after the slash gives the address within that bank. Tolook ata different bank, you can enter anumber such as 02/2000.20FF. This would display “page” $20 in bank $02. The addresses you give must both be within the same bank. L(ist). The third perspective for looking at memory is with the Liist) command. Enter an address and “L” and you will see a “disassembly of the section of memory that follows that address. Not all ranges of memory actually hold machine language programs. Some hold data, some hold programs in other languages, some hold nothing at all. The big limitation of the list command (a limitation it shares with other disassemblers) is that it can'ttell real machine language code from other kinds of data. It “disassem- bles” everything, whether the results are meaningful or not. The Iigs list command is able to disassemble all the 65816 operation codes and addressing modes. For a complete description of these codes and modes see "A 65802/65816 pre-boot” and "Introduction to the 65802/ 65816" in our August 1986 issue, pages 2.49-56. One big problem that occurs when a program tries to disassemble 65816 machine code is that the “immediate mode” of three commonly-used instructions, LDA, LDX, and LDY, can be either two or three bytes long and the disassembier can't tell which. These commands load the microprocessors A, XorY register. With immediate addressing, the data that is to be put into the register is embedded within the program immediately after the instruction byte. If the registers are set up for 8-bit data, these instructions are two bytes long (one instruction or operation-code byte and one data byte). If the registers are set up for 16-bit data, on the other hand, these instructions are three bytes long (two data bytes). But a disassembler can't tell which is which. For example, get into the IIgs Monitor and try this: FF 102038 isn lex TSLOBANK (@/1) FF/o2@3: FO 00 FF/9208: @@ A2 FF/0207: 8 05 Loa neo BR A BRK eS. Those BRK instructions in the second and third lines don't look quite right. Perhaps this section of code was written to be executed with 16-bit registers. To tell the disassembler that you'd like to see the code listed that way, enter O=m (16-bit A register) and O=x (same for X and Y registers). Note that the format of these commands is backwards from what Applesoft programmers Vol. 3, No. 4 would expect (0=m, not m=0), that “m” and “x” must be entered in lower case, and that the current list status of “m” and “x’ Is always displayed at the top ofa listing. For example: ¥0=0 Ox 02031 Gsm @=x. 1LCBPNK (0/1) FF/e203: A3 92 99 LOA Hodea FF/O206: F290 00 LOX HO5ee When you examine memory with the Monitor and you look at bank zero, you will always see the “language card” RAM in the address space from $D000 to SFFFF. If what you really want to see is the ROM that is normally found in this address space, look for it in bank $FF. That's what we've done here. (There’s more ROM in bank $FE.) Note in the above examples that once you've set the bank to $FF (or whatever), it will stay there (with one exception to be noted later) until you change it again. Unlike the ROM code, the hardware softswitches and peripheral card firmware that appear in the address range from $C000 to $CFFF on earlier Apples appear there still on the Iigs (but in banks $00, $01, $20 and $E1 only). Thus, two banks of $D000-SDFFF memory are needed to squeeze 64K of RAM into these banks. To control which bank you are looking at, enter 1=L to see the main bank (usually called bank 2 in the Apple literature) and O=L to see the secondary bank (usually called bank 1). In addition to allowing you to examine sequential memory bytes as values, ASCII characters, and assembly language mnemonics, the Ilgs Monitor gives you the power to examine memory by searching for a specific byte pattern and by comparing two segments of memory for differences, P(attern search), The first Apple II Monitor to have a search command was the one inthe enhanced Ile. On that machine you can search memory for any one-byte or two-byte value. The command's syntax is "YYXX<adr.adrS” where YYXX is two sequential bytes appearing as XX YY. Yes, they're backwards, The ligs search command is very different from the one in the enhanced Ile. First of all, rather than being known as S(earch),as on the enhanced Ile, it goes by P(attern search). Second, the values (or pattern) you are searching forcan be up to 236 bytes long. Third, the pattern you are looking for mustbe surrounded by backslashes. Fourth, the pattem can include hexadecimal values, ASCII values, or “flipped” ASCII (flipped means backwards — “BOB” instead of “BOB,” for example). Try this: %\20 ED FD\<FF/FB00.FFFFp search Monitor code for JSR $F0ED FF/FSAC: FF/FDAA: FF/FDG4: Fr/FOBC: FFF: FFIFFR4: FFIFFa?: #\"Aople“\KFF/0000.FFFFp FF /S802: FF/a967: FF/C?67: FFAFSL4: FF /F@09: search bank SFF for “Apple” When you search for ASCII characters as we did above, the search finds only high-value ASCII characters. However, the IIgs Monitor has an “ASCII filter mask” that will modify the characters you specify to low-value ASCII or to other weird stuff. The filter mask goes by the name “F” It can be set to anything from $00 to $FF with the =F command. $FF is its natural setting. $7F will get you low-value ASCII. The other 254 settings are of questionable value. ‘Ty this: wR w\"Apple \GFF/0G20.FFFFp search banc $FF for “Apple” FF/2R19: FF/SI28: *\P0g0" \<800.BFFFp search @¢/8002 to UFFF for “O6OP* e0/e893: Notice a couple of things here. The search for “Apple” with the filter set to $7F tumed up two more occurrences that the first search didn’t catch. Likewise, none of the first search's hits turned up in the second search. This means the “ASCII filter mask” doesn’t create “wildcard” bits. Instead, it May 1987 simply clears bits in the character pattern specified. Only exact matches with the new pattern will be found. Secondly, notice that in the search for POGO backwards (the backwards part is specified by means ofa single quote mark tather than a double quote mark) we didn’t specify a bank address, but in all the other searches we did. This is because the IIgs search command always defaults to bank zero unless you specify another bank. This is inconsistent with the other Monitor commands, which default to the last bank specified, and is the exception to the last-bank-specified default that was mentioned earlier. This is probably a bug, but maybe there's a good reason for it! haven't discovered yet. V(erify). The command for comparing, or “verifying” two segments of memory hasn‘t changed from earlier Apple Ils, except that bank addresses can now be specified, If adr’ means an address of either the form "XXXX" or “XX/XXXX"" then the format of this command is “adradradrV’. The two segments of memory you are comparing can be in different banks, but neither segment can cross a bank. For example, load an image of Applesoft as found on the IIc into a IIgs at $2000. (More on how to actually do this later.) To compare this image to whats in the ligs, do this: *00/2000FF /0000.F7FFu FF/Ee0s:02 (35) FF/FLFE:38 (50) FF/F233:03 (08) FF/F236:F6 (F2) FF/F3CB:20 (AO) FF/F3CC:3A (73) FFIFSCD:FS (C0) As you can see from the display, the two images are almost exactly the same. For a complete description of the differences between IIc Applesoft and earlier versions, see “Up where Applesoft lives” in our June 1985 issue, Pages 140-44. The primary difference is that IIc Applesoft (and now Applesoft on the IIgs) includes support for doubletow-esolution graphics (80 pixels across the screen by 48 high). (The differences between llc Applesoft and IIgs Applesoft are as follows: $£006 is a spare byte that has had various values in various versions of Applesoft—the zero in this byte on the IIgs matches what the original Applesoft had. The next three changes fix a bug in the double-low mode that allowed the Y coordinate to be as large as 80 on PLOT and SCRN commands, when 48 should have been the maximum. The last three changes were necessary because the softswitch for reading whether double-resolution graphics are turned on isn’t in the same place on the IIc and Ilgs. Mysteriously, a one-byte change necessary to fix a bug in the double-low ‘SCRN function, which was mentioned in our June 1985 article, wasn't done.) Modifying Memory. There are several ways you can use the Monitor in all models of Apple II to modify RAM memory. To change one byte, enter the address of the byte you want to change, a colon, and the newvalue, To change the bytes that follow the first, enter more values, but be sure to include a space between each. After you press return you can continue where you left off by simply entering a colon and more values. {n addition to entering hexadecimal numbers, the IIc, enhanced Ile, and Ilgs have what's called an “ASCII input mode.” On the IIc and enhanced Ile you can store the ASCII code for a letter in memory by typing the letter with a single quote in front ofit. Ifyouwant to enter several letters in a row, you must precede each witha single quote, like this: 92000:'D ‘r ‘a ‘g’o ‘a’ ‘s #2000. 2007 2000- C4 F2 El E? EF EE A? FD ASCII input mode on the llgs is much different Instead of preceding each letter with a single quote, you surround the letters with double quotes. The characters you enter are marched through the ASCII filter mask (mentioned earlier in the discussion of the search command) before being stored in memory — thus you can use the filter to obtain low-value ASCII. Only high- value ASCII is available on the llc and enhanced Ile, Here are some examples: Ucfenhanced Ie ASC11 input mode #07/100:"Dragan’s” *100..10F ap/eioe:04 F2 £1 £7 EF EE A? FS FF FF FF FF FF FF FF FF-Dragon’s........ "110: ‘Dragons *110.11F o7/aiie:F3 Ae CE EF FF FF FP FF FF FF FF FF FF FF FF FF-S°nQseceeeeeseee Open-Apple = 3,27 mF 120: "Dragon's: 120.12F 07/0120:44 72 61 G7 GF GE 27 73 FF FF FF FF FF OFF OFF FF-Dragon’s........ As you can see in the second example, a single quote is supposed to give you backward, or flipped, ASCII. However, it seems to work only with the last four characters you enter, That's a bug, In the third example, I changed the filter mask to get low-value ASCII. Notice that you don't really need a closing quotation mark if you're at the end ofa line. (In comparing the IIgs with the Ie and IIc I just noticed another important Monitor difference —on the IIgs the keyboard's delete key works, at last, at last.) M(ove). The move command, which is available on all versions of the Monitor, provides another way to modify memory. The command syntax is “destcadradr” where “dest” is the destination address and the “adradr’ range defines the segment of memory you want to move. On the IIgs this command can move memory from bank to bank, but just as with the verify command, it can’t deal with ranges that cross a bank boundary. It's also important to make sure the destination area isn’t inside the source area, or you may get results other than those you expected. Earlier 1 mentioned that I'd show you how to get an image of Ilc Applesoft into the IIgs, so that the two can be compared. You can’t just BSAVE TIC.FPIMAGE.A$D000,L$2800 because while the BSAVE is going on ProDOS will be active. The snapshot you'll get will be of the ProDOS kernal rather than of Applesoft. This can be bewildering. The solution is to either take the ‘snapshot with DOS 3.3, or do this: *2000<D000.F7FFm #3006 JBSAVE IIC.FP. IMAGE A200, 152820 nove Applesoft’s image to $2000 {de this on @ IIc) Zap). The ligs has a new command for filling a range of memory with a specific value. The syntax is "valadr.adr2”, where val is a hex number. For example, 7<07/0000.FFFF2 will put a seven in every byte in bank seven, which is not necessarily a good thing to do. You can also zap memory on older Monitors, but it requires a trick, Try: *2008:0 200142000. 20FEN Because the destination address is inside the source address, the effect of this command will be to move the value at byte $2000 into every byte on that Page. The Mini-Assembler. The final way to modify memory with the Monitor is to use the Mini-Assembler. The heritage of the Mini-Assembler goes back to the original Apple II, where it could be found as part of integer Basic. You can mun the Integer Basic Mini-Assembler by entering the Monitor while Integer Basic is active and typing "F666G". Because it uses “undocumented entry points,” however, the Integer Basic Mini-Assembler doesn’t work right on the Ic or ligs. On the enhanced Apple Ile, the 3.5 ROM JIc, and the IIgs, you can start up newer versions of the Mini-Assembler directly from the Monitor, with or without Integer Basic, by entering an exclamation point. The Mini-Assembler can be used to write short, uncomplicated assembly language programs. It's much easier to write longer programs on full-blown assemblers because they allow you to give names or “labels” to program segments and addresses, because they make it easy to insert new lines in what you've already written, and because they provide many other amenities that the Mini-Assembler doesn’t. All the Mini-Assembler can dois allowyou to type in one assembly language mnemonic and operand ata time; it converts these into the equivalent machine language values and stores them in memory. Nonetheless, it's a useful and handy tool to have around. It was possible to execute Monitor commands from within the original Mini-Assembler by starting a line with a dollar sign. This isn’t possible with the Mini-Assemblers that start up with an exclamation point. However, it's not necessary either because you can switch between the Mini-Assembier and the Monitor so easily on these machines (the exclamation point gets you in, retum ona blank line gets you out). In addition, the Ilgs Mini-Assembler does allow you to directly enter hex or ASCII values into memory. Once you are in the Mini-Assembler, the first thing you must do is provide the address where you want your machine code to be placed. Follow that with a colon and an assembly language instruction. The allowable instructions, addressing modes, and addressing mode formats for the Mini-Assembler are shown in our August 1986 issue, page 2.52. The Ilgs Mini-Assembler can handle all ofthe 65816 instructions and addressing modes; the 3.5 Hc model can handle all 65C02 instructions; other models handle only the 6502 instructions and modes. 3.28 Open-Apple Begin each line you enter after the first with a blank space if you want that line's machine code to follow the previous line's, On the IIgs, a colon instead of a blank space tells the Mini-Assembler that hex data follows. A double quote mark instead of a blank indicates ASCII characters (which will be forced through the ASCII filter mentioned earlier). A number indicates you are giving a new address for storing machine code. Thus: “ 1200@:LOX WO 00/2000: Az 8 Lox wea load a zero into X register 1 LOR 2008,% oo/ze02: 80 ef 2¢ LOA 2@ae,x load A with what’s at $200E+x * Beg 2000 eo/zees: FO e6 BEQ 2800 {+06} branch on equal--did A get 2 zero? 1 JSR FOEO 00/2007: 20E0 FD JSR FOED Jump to the PRINT subroutine at SFOED "INK 0/2008: EE INK inerenent X (X=X+1) 1 BNE 2002 20/2008: De FS BNE 2002 {-08} if XC >@, branch te get next character 1 RTS e/2000: 6@ RTS return to caller ‘Read Open-Apple every sanzh for health and wealth. 10 How did I know while | was entering the second line that the ASCTS string the routine prints would occur at $200? | didn’t. This is the kind of thing a true assembler handles easily. In this case, it's necessary to guess at the correct address (in order to save space for the instruction), then go back and correctit after you have finished the program and know the correct address. Its also necessary to guess at and correct the destination of the branch in the third ine of the program. Incidentally, the Mini-Assembler display you see on your screen is much cleaner than what's possible to show here— the output for each line overwrites the input. Try it and see. Program control. Once you've entered the above program with the Mini- Assembler, press retum on a blank line to get back inside the Monitor and try this: ¥2000g Read Open-Apple every manth for health anc wealth. The G(o) command tells the Monitor to execute the subroutine at the address you give. $2000 is the temporary home of the Chinese fortune ‘subroutine we just entered with the Mini-Assembler. An important, but often overlooked, aspect of the (G)o command is that it loads the microprocessor's registers with specific values, which you can control, just before jumping to the subroutine at the address you specify. (Incidentally, it does JSR, not JMP, so if the routine you call ends with an RTS you'll retum cleanly to the Monitor, as in the example here.) Try this: *(prese control-E and return) ---Uisplay on If, I1-Flus, Ile, Ile, enhanced Ie 0B X15 Y=25 P90 S-Fe ---display on 3.5 Ic MOB AGA X=15 Y=25 P=30 S=FO ---display on 1igs R=@92B X=0015 Y=0025 S=01FO D=2020 P=30 S=02 K-00 H=OC C=A0 L=i n=l xe] e=l Control displays the values that will be placed in the microprocessor's registers when control is passed to the address you specify with the G(o) command, On the 3.5 Ic and the IIgs some of the displayed values aren't actually registers, but are “flags” that indicate which memory banks will be active when G(o) is executed, as well as other stuff. You see this same display after the microprocessor hits a BRK instruction, as mentioned many paragraphs ago. Not only is the display the same, so are the values. In other words, a BRK puts you into the Monitor and displays the values in the registers when the BRK occurred, The flags indicate the status ofthe machine at that time. G(o) retums to the program with those same values in the registers and that same machine status. You can, however, change the values from the Monitor if you like, so that G(o) will use different values or flags. On all machines except the Ilgs you do this by pressing controL-E and retum to get the register display. Then enter a Vol. 5, No. 4 colon at the beginning of the next line followed by the value you want in the A register, the value you want in the X register, and so on. If you'd like to experiment with this, be aware that changing the P or S register toa random number sometimes locks the machine up so tight you need a can opener to getit back open. (To change the M register on the 3.5 IIcuse “44-val”.) On the Hgs, on the other hand, you change the values thatwill be placedin ~~ the registers by entering the new value you want, an equal sign, and a letter designating the register you want to change. We used this format earlier in our discussions of the L{ist) command and the ASCII filter. On the IIgs you can also restore the registers and flags to a “normal” configuration by pressing contro-R. ‘The program we entered earlier with the Mini-Assembler begins by loading the Xregister with a zero. You can see what would happen with other values by changing the X register value with the Monitor and G(o)ing to $2002, For example: all but IIgs o--TIgs *(control-£ return is optional on IIgs) (registers are displayed) 452x *20028 *(contral-£ return) (registers are displayed) £220 05 920026 Open-Apple every month for health and wealth. The A register is the microprocessors accumulator, where all math operations are done. X and Y are the index registers. S is the stack register, which points a crooked finger at the current stack position. P is the microprocessors status register. The meaning of its bits change slightly, depending on whether the microprocessor is in 6502 (“emulation”) mode or 65816 (“native”) mode. Only the llgs has these two modes. The “e” flag tells you which mode the machine is in; 1=6502 mode, 0=65816 mode. Here's what the bits in the P register mean: Meaning of the P(racessor status) register N¥iBoIze NUMXDIZC e=1 on Iigs (852 mode) and ali other Apple Tis e=0 on IIgs (65E16 mode) anly N is signs l-negative V is overflows I=true 1 is unused cad ¥ is A-register width; 1-8 bite, Q=16 bits B is break Flag; 1-BRK, O-harduare interrupt X is X-register width; 18 bits, O16 bits D ts binary coded decinal flag; I-true I is interrupt Flag; 2=interrupts disabled The bits ofthe M register indicate the state of the machine's memory banks when a BRK occurred, or how you want the banks arranged for the next Gio) command. Both the 3.5 IIc and the Igs display an M register. Here‘s what the bits mean. Meaning of the M(emory status) register ee PZ RO WRLC Bl 82 20 AZ PX RO MR LX BX AR OX 3.5 Ile only Jigs only @0 is unused AZ is alternate language card/zero-page/stack; I=active P2 is STOREA@/PAGE2 status; I=both active PX is PAGE2 status only: Iactive RO is auxmem read status; l=active NR is auxnen urite status; I=active LC ts Yanguage card read stat LX is language card status; 1=ROM active Bl is language card ban 1 read status; l=active BX is overridden oy | (see text); I=bank 2, O=bank 1 82 is language card benk 2 read stati tive AR is alternats ROM bank (see text); leactive @@ is unused CX is alternate $C10@-SCFFF ROM; I=activs The meaning of the bits in the 3.5 Ilc’s M register is similar to, but not exactly the same as, the M register on the IIgs. In particular, the LC/LX bits, which indicate whether ROM or RAM is active in the $DO00-SFFFF memory =~ area, have exactly opposite meanings. On the IIca one in that bit means RAM is active, on the IIgs a one means ROM is active. The IIc uses two bits to indicate which language card bank is being used; ifneither (if ROM is active), both bits are cleared to zero. The Ilgs uses just one bit for this (1=bank 2, ‘O=bank 1), but changing that bit in the M register is a useless exercise—it's May 1987 always overridden by the | flag, which we looked at earlier in our discussion of the L{ist} command. Both the 3.5 ilc and the Ilgs have an alternate 16K ROM bank that can be tumed on with softswitches. Only the IIgs hasa bit in the M register to activate that ROM, however, On the IIgs a program can obtain all of the information in the Monitor's M register, in exactly the.same format, by reading byte $C068. Not only that, but by writing to the same byte (which is called the “state” register}, a Ilgs program can change the machine's memory configuration. This provides Apple's programmers witha speedy way to save and restore the memory configuration of the IIgs during an interrupt. The controlR(estore registers) command in the IIgs Monitor sets the M register to $08, A G(o) with M=08 would turn on the lower 48K of the main 64K bank of RAM and put the Applesoft/Monitor ROM in the $DO00-$FFFF area. The Q register (for “quagmire,” according to the IIgs documentation) that appears in the Ilgs memory display combines information from two other IIgs hardware registers. These are the “shadow” register at $CO35 and the “configuration” register at $C036. On the {Igs, what you see on your screen is always a reflection of information stored in RAM memory banks $£0 and $E1. (On other Apples the active video area is in banks $00 and $01) Since Apple II programs written before the IIgs appeared don’t know bank $E1 from Capitol Federal Savings and Loan, the llgs hardware automatically “shadows” anything that is written into certain parts of banks $00 and $01 into the same parts of banks $E0 and $E1. It's as if you were able to deposit a dollar into First National and have your sugar daddy make a matching deposit into E-First National for you. There may be situations, however, when you wouldn't want a matching deposit made. For example, if your program is using the high-resolution graphics page 1 memory area ($2000-$3FFF) for data instead of pictures, there may be no reason to have the data shadowed into E0/2000-3FFF as well. With shadowing on, anything previously stored in the $2000-3FFF area of bank $EO would be destroyed by writes to 00/2000-3FF: Shadowing also slows down the IIgs slightly, Under ProDOS 16, shadowingis normally tumed. off and video display manipulations are made directly to banks $£0 and $E1. Under ProDOS 8, DOS 3.3, and Pascal, shadowing is normally tured on. Most of the bits in Q come from the shadow register. Only one, the one that indicates machine speed, comes from the configuration register. Here's the meaning of the bits in the quagmire register: Meaning of the Q(uageire) register ‘SP LM @@ AX SH H2 HL TL SP Is processor spei Un is Linear meaary: 80 Is unused, mu: AX is auxmem hi-res override; l=no SH is super hi-res (E1/2000-9FF H2 is malnfaux hi-res page 2; 1=no shadowing HL is nain/aux hi-res page 1; Leno shadowing TL ts main/aux text page 1; 1=n9 shadowing ControLR sets the Q register to either $00 or $80. The speed is leftas itwas before the control-R. Notice that it is possible, by manipulating the LM bit on the ligs, to disable the language cards and the $CO00-CFFF hardware in banks $00 and $01. If you did this, the RAM in banks $00 and $01 would become continuous— the primary language card bank (bank 2) would appear in the $CO00 area and the secondary bank would be at $D000. The $C000 hardware would appear only in banks $E0 and $£1, However, this isn’t a practical alternative because ligs interrupts use some machine language code that lives in the $CO00- CFFF ROM in bank zero. Interrupts cease to work when you invoke the linear memory option. The other three registers shown in the IIgs register display are the direct register (D), the data bank register (B), and the program bank register (K). For more information on these registers, which are active only when the microprocessor operates in 65816 mode, see the August 1986 Open-Apple. X(ecute), R(esume), S(tep), and T(race). On the ligs, the Gio) command can only be used to execute a routine in bank $00. If the routine you want to start lies elsewhere, use the Xecute) command. This command expects the routine to end with an RTL (retum from subroutine, long), however. Like X(ecute), R(esume) will also start up code in any bank. However, it JMLs (jumps long) rather than JSLing (jump to subroutine, long). Use it to continue program execution after a BRK. G(o) and X{ecute) don’t work well after a BRK— they mess up the stack with their own JSR/JSL. - S(tep) and T(race) are available only in the original Apple II Monitor and in the 5.5 IIc Monitor. (Hooks were left in the [gs for implementing these normal 19 1/0 space at SC0@O in banks $20 and S81 be zera auxaen shatoulng shadowing Open-Appie 3.29 commands—they print “Step” and “Trace” on your screen at the moment) S(tep) lets you execute machine language programs one instruction at a time. As each instruction is executed, it and the contents of the registers are displayed on the screen. 2000S, for example, would begin stepping through a program living at byte $2000. To execute the next instruction, simply press Sand return, ‘T(race) is similar to S(tep) except that it doesn’t stop after each instruction. To exit T(race} on the 3.5 IIc, press solid-apple. To slow it down to one step per second, press and hold down on open-apple, Neither S(tep) nor T(race) aa with programs that use the same zero page locations as the Monitor itself. Miscellaneous Monitor commands. There are a large number of miscellaneous Monitor commands that ! should zip through for you. Some of them, such as I{nverse), N(ormal), val+val, and val-val, have been around since the original Apple II and are still available on the IIgs. Others, such as Write) to and R(ead) from cassette tape, have mercifully disappeared on newer machines. In the same class with I(nverse) and N(ormal) is the controlY user command. The control-Y command and the use of N as a command separator (much as the colon in used in Applesoft} were discussed at length in the February and March 1985 Open-Apples. Until the Ilgs, the + and - Monitor commands were oflittle value because only one-byte answers were displayed. The IIgs, on the other hand, can take four-byte operands and display four-byte answers. The IIgs also has a multiply instruction (val'val) that displays eight-byte answers. As before, all ofthese work with hexadecimal numbers only (where 8+B=10). While the DOS commands IN# and PR# are the correct way to turn on input devices and printers, even from within the Monitor, the older Monitor commands control-K(eyboard) and control-P(rinter) have been retained. (For some reason, Basic.system commands don’t work as well from inside the Ilgs Monitor as they do on earlier Monitors.) Likewise, 3D0G (or Q(uit) on the IIgs) usually works better for returning to Applesoft than control-C or control- B, but those commands have been retained as well. The rest of the miscellaneous commands are new to the Ilgs. There are two commands for converting numbers from hex to decimal and back again. To convert to decimal, enter the hex number followed bya equal sign. To convert to hex, enter an equal sign followed by a hex number, like so: aFF= Decimal-> 255 {+255} #2255 Hex -> seaooeerr Control-T changes the current screen display to text page 1 ifyousomehow crash into the Monitor while viewing a graphics page. Control’ (control-shift- 6) allows you to change the cursor character. Whatever character you enter after control-’ will become a fiashing cursor. Try it. This also works in Applesoft on the Ilgs. =T isa IIgs Monitor command that was mentioned in last month's letters section. It prints the current time on your screen. It has a related command, =T=, which allows you to reset the Ilgs clock. | recommend using the control panel instead, Finally, the Ilgs hasa “tool locator” command. This command can be used to enter toolbox calls. It begins with a backslash, followed by a number that indicates how may bytes worth of input are needed by the tool, followed by a number that indicates how may bytes of output the tool will return, followed by the input bytes, followed by the two-byte tool number, another backslash, andaU. Here are two examples of the U command that call the ReadTimeHex and ReadASCliTime tools discussed last month (“Time to look in the toolbox,’ pages 3.21-22): e800 aU (no inputs, § bytes of output, too! 5003) Tool error-> 0600 @D 00 15 57 eF 03 84 64 40 020 FAY 2000.201F (4 in, none out, 500002000, tool See3) Teo) error-> 000 84 AF Bl 65 AF 66 87 AC 81 88 GA BC B3 BA B?- 4/15/67 10: DO CD G0 62 20 00 08 08 a0 G8 ee 00 00 80 08-6 FN... This call always returns a “tool error,” however, ifthe error number is zero, no error occurred. That’ the final verse in the new IIgs Monitor. It's becoming avery long song. Ladies and gentlemen, start your pencils. On page 5.22 oflast month's newsletter, in the middie column, the “AD” after the “00/030A:” should be an “A2.” In regard to last month's letter “All chips not off same block,” several subscribers have written in that Iigs memory cards require a type of 256K RAM chip called CAS before RAS. However, apparently not all lgs cards require this kind of chip. If you need chips foraligs, suggest you call or write Microprocessors Unlimited (24000 S Peoria Ave, Beggs, OK 74421 918-267-4961). They sell butk RAM chips at good prices, provide fast service, send you excellent chip installation instructions, and are keeping track of what chips work in which lgs cards. In my answer to last month's letter “Odd bank out,” J asked for help on calling the ligs memory manager with the Mini-Assembiler. I've gotten some good help on that one—you'll read all about it next month. One of the people who responded was Bill Basham of Diversi-DOS fame. Basham has already developed three programs for the ligs that are the most exciting llgs packages I've seen to date. Not because of stunning graphics or sound, mind you. but because of the way they use the memory manager, Diversi-Cache ($35) speeds up Apple 3.5 drives (not UniDisks) by storing the tracks most recentiy accessed in KAM. Diversi-Key ($45) ts a memonyresident keyboard macro program that hides itself inside the ligs and provides macros for all your programs. You have to see this one to believe it. It has lots of bells and whistles, too. With either of the above programs you also get Diversi- Hack, the wonderfullittle desk accessory mentioned in this month’s lead article that lets you get into the Monitor from the midst of anywhere. These programs work only on the Higs, of course, and require 512K. (Diversified Software Research, 34880 Bunker Hill, Farmington, MI 48018-2728 513-553-9460), Slot 3 RAMdisk rules Why does Apple Writer 2.0 disconnect RAMdisks in slot 3? Can this be changed? My RAMWorks card would be useful as a RAMdisk if Apple Writer would stop disconnecting it. Jerry Hill FPO Seattle, Wash. You raise an extremely interesting question. Apple's “ProDOS Technical Note #8” specifies an exact Protocol that programs are supposed to use to determine whether a disk device in slot 5 should be disconnected or not. This information is also included in the Addison-Wesley edition of the ProDOS Tech- nical Reference Manual (pages 90-91). Programs that use both 64K banks of memory, such as Apple Writer 2.0, have to disconnect the ProDOS slot 3 KAMdisk because it also uses the auxiliary 64K bank. If both were active at the same fime each would ovenurite the other and chaos would reign. However, many other RAMdisks, such as the one that came with your auxslot KAM card, either don't use the 64K extended memory area or can be Configured not to use it. Since these KAMdisks don’t interfere with 128K programs, there is no reason 128K software should disconnect them. Tech Note #8 has specified since late 1964 what KAMdisk developers and what 128K program developers need to do.to avoid needless disconnection of slot 3 RAMdisks, In the beginning, Apple’s own software followed the Tech Note #8 protocol—AppleWorks 1.2 follows it exactly. But then something happened, Ken Kash- marek, who recently sent me a ton of information on this issue (much of which I’m using here), thinks that the key event was Apple releasing its own memory card. In order Lo keep Apple software from working with third-party memory cards, Apple stopped fol- lowing its own Tech Note, Kashmarek surmises. According to the Tech Note #8 protocol, 128K software is supposed to look through the ProDOS global-page device list at $BF32-$BF3F and disconnect only those devices that are connected to slot 5, drive 2 and that have the low two bits of their device number set. This transiates into units with device numbers of SBE, $BB, $B7, and $B3. The key instruc- tions that accomplish this feat load the device list entries one-by-one, AND each with #$F3, CMP each to #$B3, and branch to disconnect devices that come up “equal.” However, Apple Writer 2.0 and later, AppleWorks 13 and later, and Instant Pascal have two bytes of this protocol changed. All of these products AND with #970 and CMP with #830. This has the effect of disconnecting any slot 3 disk device, whether assigned as drive 1 or drive 2, whether RAMdisk, hard disk, or Apple's own disk. There are two ways to fix the problem. One is to search through programs that disconnect slot 3 RAMdisks looking for the byte string B9 32 BF 29 70 C9 30. Change the 70 back to F3 and the 30 back to BS. This wilt make the program follow Apple's published protocol and your RAMdisk will no longer be disconnected. Another way to avoid the problem is to not assign disk devices to slot 3, Both Applied Engineering and Checkmate Technology have updated their RAMdisk Software so that their RAMdisks can appear to be in slot 2. So, why do Apple Writer, AppleWorks, and Instant Pascal disconnect third-party KAMdisks in slot 3? Does a Fortune 500 company with $800 mittion in the bank really disregard its own software protacols Just to give Its RAM card a competitive edge over those from third-party developers? | personally belteve the sincerity of Sculley, Yocam, and Gassee when they say that they realize the importance of third-party developers to Apple's success. However, they can’t be expected to go over every byte of code inApple software. And it doesn’t take much imagina- tion to picture some low-level product manager being more concemed about achieving sales goals than about Sculley’s third-party philosophy. Vol. 3, No.4 Apple's officers need to let the public and its employees know, by actions not words, where they stand. Why doesn't Apple's software follow Apple's own protocols? Lots of people would like to know. You wanna see a syntax error? Is there any software that translates what you write in American English to Mexican Spanish? Ifso, please Jet me know, I need to constantly get memos, etc, translated. Don Robinson Coronado, CA Dennis replies: The question you ask seems rea- sonabie; translation seems to be no more difficult than looking up words in a dictionary and arranging them into a sentence in the new language. In truth, it isalot more complex than that; there are verb forms, context, and syntax (among other things) to consider in making the translation. In fact, just translating English into something a computer can understand is difficult enough, to say nothing of then getting the computer to express what it understood in Spanish. Inorderto communicate with computers nowadays, we humans have to lear languages such as Applesoft or Pascal, which have very limited vocabularies and very rigid sets of usage rules. In a word, our answer to your question is “no,” at least for now, but the issue as to whether such a program will ever be available is interesting. Translating human language falls into a reatm of computer research called artificial Intelligence, or “AL” Severat excellent books have been written that debate whether computers will ever be able to handle such complicated tasks. One that argues against the ability of a computer to simulate human responses |s Computer Power and Human Reason, byJoseph Welzenbaum (WH. Freeman). Weizenbaum isa pioneer in Al research and was originator of the computer game Eliza, which provides psychiatrist- like responses to statements entered by a human at the keyboard. Another book, which arques against Weizenbaum’s dismissal of the practicality of Al research, is Gédel, Escher, Bach by Douglas tiofstadter (Vintage Books). Hofstadter leads us through a difficult but enlightening process of altempting to prove that a computer is capable of at least simulating human intelligence. Anyone seriously interested in natural language processing or other Al topics may want to seek out these books, as welt as Artificial Intelligence, by Patrick Henry Winston (Addison-Wesley), and foliow their bibliographies to further references. The computer language of the Al community is called LISP. A full Al version of LISP requires a lot of computer power. LISP, by Patrick Henry Winstonand Berthold Klaus Paul Hom (Addison-Wesley), is a very readable text about the subject. Logo, which at teast some of our readers (and more of their children) are familiar with, was derived from LISP. Natural tanguage transtation is similar in some ways to the command interpretation done by adven- ture games such as Zork. Zork’s interpreter was originally implemented ona Digital Equipment Corp minicomputer using a LISP-like language called MDL, which was then “crunched down" to fit into micros for the commercial versions of the game. For some insight into the design of the interpreter, see “How to Fit a Large Program Into a Small Machine,” Creative Computing, July 1980, pages 80-87. For additional articles on the design of adventure games that seem to interact with their human players, see May 1987 the rest of that issue of Creative Computing and the December 1980 issue of Byte. Readers who are interested in this kind of stuff might like to investigate Polarware’s adventure- game interpreter for the Apple II, which is called Comprehend. The cost is $95 from Polarware, Box SIL Geneva, IL 60134 800-323-0884. CALL -875 Ihave a program that was written for my old II-Plus and it worked fine—now I have a new IIgs and the program sends me strange machine language screen entries. The program includes both a CALL-875 anda CALL -868 and my guess is that one or the other is causing this. Is this correct? If so, are any of the old calls still valid? Bob Schmidt District Heights, Md CALL -875 (clear current screen line) has not been valid since the introduction of the Ile. Those of you skipping from a Il-Plus to a ligs may have some catching up to do. CALL -875 on the II-Plus jumps into the middle of the screen scroit functions to clear the current line, Apple changed these routines when rewriting the monitor ROM forthe Ile. On the ligs, the code that replaces these routines generates the strange messages you've been seeing. CALL -868 (clear to end of line) is stlil valid. To clear the entire line (entirely from Applesoft) without moving the qusor and with the 80-cohumn firmware Off, try the sequence: 10 CH = PEEK(3E): FOKE 36,0: CALL -869: POKE 36, CH With the 80-column firmware on, on the other hand, the correct way to clear the current line is to print a control-2 (CHR$(26)) to the screen (control-L, CHRS(12), will clear the whole screen; control-K, CHRS$(11), will clear from the cursor to the end of the screen; and control-}, CHR$(29), wili clear from the cursor to the end of the current line). That technique is better, for compatibility reasons, than calling a Monitor routine, Too bad it doesn’t work with the 80- column firmware off, Apple has published several (slightly different) lists of Monitor addresses that it promises not to change on future Apple models, Any CALL not onone ofthese lists should be removed from your programs. The version of the list that's my current personal favorite is in the Apple lic Technical Reference ‘Manual (3,5 BOM version) on pages 315-314. The great Tinaja Quest Who or whatis"“tinaja questing’? John p. Bishop ° Kingston, Ont Don Lancaster often offers a “tinaja quest for two, FO.B, Thatcher, Arizona” as the grand prize in the contests he devises for his “Ask the Gunz” column in Computer Shopper ($21/yr, 407 S Washington Titusville, FL32796 305-269-5211). | always figured itwas something like a snipe hunt, but Dennis called Lancaster's Apple Ii Hotline number (602-428-4075) and asked. Lancaster said he uses the phrase to get people to cait up and ask questions, Then he said that “tinaja” is a name for natural basins found in deserts in the Southwest U.S. (usually these basins are private and remote; their name comes from the Spanish word for a large earthen vessel). Like an oasis, a tinaja may be the only source of water and respite in a desert, so “tinaja questing” can be a life and death matter as well as a pleasant recreational pursuit. While he had Lancaster on the line, Dennis asked if there was any way to fix the Apple Writer “load file fo screen” function so that it always used the backslash rather than the current undertine character (see November 1986, page 2.77cand February 1987, page 3.2). Lancaster said the complete details were in his Apple Writer Cookbook and his May 1967 Computer Shopper column (page 244), but the essential details were—bload AWD.SYS at $2000 and then, for version 2.0, 596E:C9 5C EA; for version 2.1, 3974:C9 5C EA. And if youd like to make Apple Writer print through a iigs serial port, make these patches at the same time —for version 2.0, 4DB0:60, 4F67:10, 4F6E:13; for version 2.1, 4DC7:60, 4F7E:10, 4F85:15 (from Lancaster's March 1987 Computer ‘Shopper column, page 108). For the complete how, why, and wherefore of these patches, give Lancaster ajingte. APDA erratic on way up Immediately after reading your September 1986 issue I sent $20 to the Apple Programmers and Developers Association and asked to become a member. In December | called their office and as a result received a receipt for my $20 and a promise that I would soon receive a membership agreement form. In January | called their office and as a result received three membership forms. | promptly signed one and sentit right back. It is now March, and | still don't if am a member or not. Joining APDA seems about as difficult as getting technical information out of Apple, Am I doing something wrong? Is anyone else experiencing this same kind of difficulty? Chuck Zamzow Battle Creek, Mich. APDA Is alive and well and calching up with itself. You're not the only one who has had a difficult time Joining, but APDA assures us you're a member. APDA ‘grew from no members at all in August to 7,000 by the first of the year to 11,000 currently (and still growing). It took awhile for APDA to gear up to the demand. A large backlog developed in December and January because of members signing up at the end of 1986 to take advantage of a free book offer. The backlog was finally cleaned up in February as staff was added. Shipments have been up to speed since then, according to our colleagues at APDA. Programs, programmers wanted Softdisk is constantly looking for short Apple II programs of all kinds for publication. In addition, we expect an opening around May 1 for a programmer- writer with extensive Apple technical background and capability of learning C-64 and IBM-PC. Val J. Golding, Editor-in-Chief Magazines on Disk 4023 Greenwood Road Shreveport, LA 71109 We get several requests a year for information on the “best way" for programmers to get their software published. There are many ways, which range from starting your own software pubitshing company to donating your work to your local user group’s public domain library. In between are a number of outlets that are often overlooked, such as Softdisk, Uptime (Box 299, Newport, RI 02840), the Nite Owt Journal (5754 Lamar, Mission, KS 66202), and the Appie Ii magazines that print program listings, Most people don’t realize that the major cost involved with publishing software is marketing. Open-Apple 3.31. Salespeople, advertising, and dealer discounts are incredibly expensive. If you decide to start your oun company you'd better either have deep pockets or an inexpensive marketing scheme. One such scheme, which has been very successful with a few software packages, is “shareware.” Under this system, you encourage users to make copies of your disk and to distribute them to their friends. However, by means of a screen that appears when the program Is started, you ask people who actually use your product to send you a payment for the program. The first product to be successfully distrib- uted this way in the Apple I! world was Bill Basham's Diversi-DOS. Basham recently told us that about 25 per cent of hls Diversi-DOS income comes from Shareware sales. Recently a number of shareware authors joined together in a “programming cooperative” to get more bang from their marketing efforts. The group is called Living Legends Software (1915 Froude Street, San Diego, CA 92107 619/222-3722). Another route ts to sell your software to an estab- lished software publishing house and collect royalties on sales. Or maybe you'd like to do. contract pro- gramming for an established house — Roger Wagner Publishing (P.O. Box 582, Santee, CA 92071), for example, is even now looking for some help from people who owna ligs and know assembly language. Pascal RAMdisk loader Il I read with interest the letter (February 1987, page 3,5) from Keith Bernstein regarding a RAMdisk loader for Apple Pascal 1.3. Here's an alternative method to load startup files onto the RAM disk from a 3.5 inch disk. First, format your RAMdisk using FORMATTER version 13 (the Pascal formatter in the ProDOS ‘System Utilities will notwork) and transfer all the files you want into the RAM disk manually. Then use the T)ransfer command saying RAMS: MYDISK:PASCAL.BACK. The Filer will respond with “Transfer xyz blocks?” Press “N” and specify the number of blocks thatyour data occupies on the disk; this is found at the bottom of a catalog listing, If you select the default size instead, the full volume, which is mostly empty space, will be transferred. That's rather wasteful, To use this file, boot up Pascal as usual, then ‘T)ransfer MYDISK:PASCAL.BACK,RAMS:, The Filer will respond with “Remove all files from RAMS:?" After pressing "Y" the RAMdisk will be loaded. You can then press control-reset to boot up from the RAMdisk. Of course, all this can be done from an Exec program such as the one Bemstein wrote about in his letter. Incidentally, you may be shocked to learn thathere in Australia the lig retails for around $45990 and the le retrofit for about $41200, Daryl Cheshire Edithvale, Vic Dennis tried this and says it gives Pascal the same systematic KAMdisk Startup/shutdown procedures we described for other operating systems in December 1986 ("KAM Van Lines," page 2.87). To conserve space, Dennis suggests the RAMdisk should be Kjrunched with the Filer before determining it's block size and saving out it's contents. And, as you point out, this technique wipes out any files already on the RAMdisk when a “restore” is done. The prices you quote are about $2850 and $850 in U.S. dollars. If your import taxes on goods from Singapore (where: the IIgs is manufactured) aren't 3.32 Open-Apple any higher than those in the U.S., the difference must be freight. (Seriously, Apple is doing a magnificent job—for a U.S. company—in developing products fora world-wide market. Are you sure at least part of the difference isn't Australian taxes? There’s no other legitimate reason for that large a price difference —it Just encourages black market transactions.) Stop double RAM load Alan Bird's “Don’tpass go" program for AppleWorks (November 1986, page 2.75 and December 1986, page 2.84) has been most helpful, but I have run into a bit of a snag with AppleWorks 2,0. This version automatically loads itself into RAM at startup. Since I usually already have the program on my RAMdisk, there's no reason to load it again. Do you know how to keep it from doing that without having to press the escape key? Harlan R. Davis Bolingbrook, Ill. Try this: 10 REM 99 Don’t Pass Go For RANdisk ¥#* 20 TEXT : HOME : ViaB 18 25. DS=CHRS(4) : FS>"APLWORKS.SYSTEN” 30 PRINT DS;"BLOAO”;F5;~,ASZ000, TSYS” 42 IF PCEK(a250) < > 57 THEN PRINT “Program requires RopleWorks 2.0.” : END 45. PRINT “Patching Appleorks” Open-Apple a \s written, edited, published. and © Copyright 1987 by Tom Weishaar Business Consultant —_Richard Barger Technical Consultant Dennis Doms Circulation Manager _ Sally Tally Business Manager Sally Owyer editoria| material, including letters to Uncle DOS, should be sentto. Open-Apple P.O. Box 7651 Overiand Park, Kansas 66207 U.S.A. Pages monthly since aruay 185 World-wide price (in US <oltars, ania delivery included at no adaitional charge): $28 for 1 year: $44 for 2 years, $80 for 3 years. All single beck issues are iames enc with the January iesue; 4an indes for the prior volume is included with the February issue Please send all subscription-related correspondence to Open-Apple P.O. Box 6331 Syracuse, NY. 13217 USA. rs, in Austtalia and New Zealand should send Cayrescondence to OpewApple. c/o Cybernetic 16 Malvern Road, Prahran, Vic 3181, AUSTAALIA, vailable on disk from Speech Enterprises, P.O. Texas 77270 (713-481-1866). Unlike most commercial software, Opt is sold in an Unprotected formiat for your convenience, You are encouraged to ‘make back-up archival copies or easy-to-read enlarged copies for ‘your own use without charge. You may also copy telor distribution to others. The cistribution fee is 18 cents por page per Sepy dtu WARRANTY AND LIMITATION OF LIABILITY. | warran the! mostot the information in is uselul and correct, allnough rive! and mistakes are included fram time te time, usually unintentionally Unsatisfied subscribers may return issues within “180 cays of del very fora full efund. Ploase includea note from your patents or children confirming that all archival copies heve Deen estroyed. The unfulfited portion of any paid subscription willbe refunded on request MY LIABILITY FOR ERRORS AND OMISSIONS IS LIMITED TO THIS PUBLICATION’S PURCHASE PRICE. In no ease shall | or my contributors be liable for any incidental or onsequentia| damages, no for any damages in excess ol the fees paid by a subscriber J ISSN 0885-4017 Printed in the U.S.A. Source Mai: TCF238, CompuServe: 70120,202 SQ POKE 14468,44 REM ro space bar 62 POKE 14148,208 €1 POKE 14149,19 |: REM no return for date 78 FOR AOR=13271 10 7 + POKE ADR,234 72 NEXT + REM no RANdisk preload 100 PRINT 0S; “BSAVE” 75; ",A82000, TSS” Blink and it's gone Tuse a C-Vue LCD screen a lot Its like eating tofu— you eventually develop a taste for low contrast. But the “insert” cursor in AppleWorks (the blinking underline) is impossible to find. The “replace” cursor never gets lost. Mostof the time luse insert mode. Isit possible to patch AppleWorks so that the insert mode cursor is a blinking inverse block? Tom Meyer Highlands, NC To replace the underline character with a new value, use: LOAD APLWORKS. SYSTEM, 882000, TSYS CALL -151 <addr>:<val> 3006 SAVE APLMORKS. SYSTEM,A82000, TS¥S where <addP> is 2D80 for version 12, 2D8B for version 13, or 2DAI for version 2.0, and <vab ts the ASCII value you want for your cursor (DF gives the underline), We tested this patch using “FF” for the value, which gives a flashing checkerboard box for the insert cursor, and using “20,” which glves an inverse box I think you'll be able to see 20 better, but you may have trouble distinguishing it from the replace cursor—the only difference will be that the insert cursor blinks faster, The value for the replace cursor itself is generated by code that also appears to initialize other routines; we decided not to mess with tt. AppleWorks reset Please give us a patch for AppleWorks that makes reset work when AppleWorks hangs. I'm looking for a more general solution than those you mentioned at the end of your answer to “Insert system disk and...” in April (page 3.18)—something that would work without MacroWWorks or with PinPoint, etc. There must bea warm start address in AppleWorks somewhere! Thom Ryan Toronto, Ont. Back in June 1986, page 2.33, we published “An AppleWorks Rescue Routine” that works with all AppleWorks versions prior to 2.0. ithas the advantage of being useful after AppleWorks hangs. The other techniques we mentioned in June involve your doing something special before AppleWorks hangs so that you'll be able to recover. Here's an instant replay of the June 1986 routine, along with some new information on how to make it work with AppleWorks 2.0: Press control-reset to get into the Monitor. (IF you can’t get to the Monitor, go to jal.) 90073:8 *3 control-P return (IF this doesn’t get you da-coluans, go to jail.) *2F@:2C 63 Ce 20 83 CO AC 10 <-For AppleWorks 1.1 througn 1.3 LL <-for Rpplelioris 2.0 Vol. 3, No. 4 If the main menu appears messed up, just press escape. Save any files you have on the desktop and reboot after using this technique. More mail merge categories There is a peculiarity to the mail merge function of Appleworks 2.0 people should know about. I couldn't understand why some of the categories from my database were not being picked up and inserted, as specified, in.my form letter. | then began to wonder about the fact that the mail merge data must be printed to the clipboard using a tables-style report. ‘That report format has a default platen width of 8 inches. Sure enough, changing the platen width to something greater (e.g., 17 inches) allowed ail of my categories to be printed to the clipboard. Changing the characters per inch to 17 can accomplish the same thing. | hope that this will save someone a headache or No William J. Linville Terre Haute, Ind. Telephone feedback I want to thank Jim Hercules for his inspired AppleWorks phone dialer (April 1987, page 3.18). Because of his discovery that you can set up 2 modem as a printer in AppleWorks, | now have an incredibly fast and easy to use phone dialer. But mine's ina spreadsheet file. Row 1 is a name, Row 2is that name's phone number, including 1 and area code if needed; Row 3 is the next name, Row 4 that person's phone number, and so on, | start the phone number with a“ to make it a label so | can include commas for pauses and dashes for readability. | can open-apple-F(ind) the name I want to dial, use the down arrow key to highlight the number below the name, then print that row to the modem. I can scroll back and forth through my phone list, insert, delete, or make changes, Hercules’ suggestion is one of those outstandingly useful tips that I've come to expect from Open-Apple and its readers. Thanks also to Tony Bond (page 3.20) for the suggestion to copy an AppleWorks 13 SEGPR file. onto an AppleWorks 2.0 disk in order to get control-# entered as a printer command. This seems to work fine, but if you're using Applied Engineering's Apple- Works 2 Expander, you'll have to reinstall it (ituses the SEGPR file for information of its own), That means reinstalling Super MacroWorks, too, Thave a suggestion for Jim Thornburgs problems with using date categories in his AppleWorks genealogy data base. AppleWorks’ two-digit year just doesn’t make it in genealogy, but dates can be effectively manipulated manually for some very useful reports. Enter birth dates in three categories: Birth-Year (1860), Birth-Month (02), and Birth-Day (29). Do the same with death dates. A chronological sort of all records by birth date is easily accomplished using multiple sorts—sort days first, then months, then years. You can also print reports with calculated categories that subtract Birth-Year from Death-Year and BirthMonth from Death Month to give approximate age at death. Another option is to enter dates in asingle category in the following format: 1875-07-22. This format sorts nicely alphabetically in forward or reverse order. So far I've found no need for AppleWorks’ automaticdate feature in my genealogy data base, despite its useful- ness in other situations, CL, Roberts Lafayette, Calif.
mp.ls