ƒ3!GB WOrkArounds  3 _BPRG formatted GEOS file V1.0" P€ƒEpson FX-80    OP V2.0 or higher        W‚;GB WORKAROUNDS  CBLASTER'S CONVERTER V2.5X ƒ8CONVERT         8Y ¿ÿÿÿÕUUªª«ÿÿõ à¡íà¢þà§oà£mà£Ûà£z›à¥³›àÿÿÿƒÿÿWrite Image V2.1Red StormgeoWrite V1.1ð This file was created with Wrong is Write. Written by Joe Buckley. ? ¯ %ì R hÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ8XXpˆXXXXX8ŠSUBJ: Work around (R) FROM: GH Wells 04/28/91 S#: 809400 Here are the bugs and work-arounds that I am aware of: 1) The most important bug concerns the use of the UPDATE command. NEVER USE IT! If you ever UPDATE a geoBASIC program, it gets corrupted in such a way that later on, the end of your program will disappear. "The Smee" has discovered that RUNning a program will effectively (and correctly) do the same thing that UPDATE should have done. His advice is to always RUN a program before QUITing or CLOSEing and never use UPDATE. 2) The BITMAP command does not work after using a disk command but you can overcome this problem by re-opening your geoBASIC program before using BITMAP. The following geoBASIC sample illustrates how: 10 CREATE "junk" 20 SYSINFO 14, name$ 30 OPEN name$ 40 BITMAP "pic",10,10 Assuming that "pic" is a disk-loadable bitmap, take out lines 20 and 30 to see the problem. 3) Don't close and re-open a VLIR file you are working on. This problem was just recently discovered and a fix has not been found. It may be similar to the BITMAP problem. 4) GeoBASIC is incompatible with some auto-exec files such as Blackout which will make the screen go black in edit mode whenever you move the mouse. 5) If you are running geoBASIC on the 40 column screen of GEOS 128, do not have any desk accessories on your disk when you make your program into an application or when you are running it after making it an application. Desk accessories work fine under GEOS 64 but they screw up the loading of stand-alone applications under GEOS 128. 6) Always RUN your program just before you make it into an application. 7) Never POKE or LOAD anything into the background screen memory. The only safe place to store machine code is in the foreground screen memory which extends from 40960 to 48959. It is usually easy to design your screens with a little blank area in them in which you can set both colors to white so the machine code will not show up. If you are not a machine code programmer then you will not have to worry about this. Page 13) The sample application has been corrupted by the UPDATE command (strike the last sentence on page 13) and you cannot edit it although you can RUN and LIST it. Page 17) Don't ever UPDATE. Always RUN a program (even if it doesn't work) before QUITing or CLOSEing. Page 18, 3 lines from top) Change F7 to F5. Page 19, RESIZE) The heap is how much memory is left over for variables after the size is set for the code of your program. If ¢|8XXpˆXXXXX8Šyou get an "out of memory" error, resize the code to 2 or 3. You will have to do this every time you load your program to edit and run it but don't worry, i8XXpˆXXXXX8Šyou get an "out of memory" error, resize the code to 2 or 3. You will have to do this every time you load your program to edit and run it but don't worry, if you forget, you'll just get the "out of memory" error to remind you. GeoBASIC only allows up to 7K for variables, so you have to be very frugal. There is an advantage to resizing the code to the largest possible value just before you finally make your program into a stand-alone application since it will run much faster on a real disk (as opposed to a RAM disk or shadowed disk). Page 21, three lines from bottom) The most negative integer value allowed is -32767 which is really a bug because it makes the double-byte logic functions almost useless. Page 23, end of last full paragraph) Don't leave the trailing quotes off of string constants, even if it sometimes works. Page 26, four lines up from bottom) Integer arrays take four (not two) bytes per element although only two are used. (This is no doubt a bug although it causes no more problem than just wasting precious variable memory space.) Page 29, near top) NOT 0 evaluates to -1 (instead of +1) and NOT 1 evaluates to -2 (instead of 0). The logic functions work on all 16 bits individually unless an input or intermediate value is -32768. You can get -32768 as a result (NOT 32767 correctly returns -32768) and it should be legal to PRINT NOT NOT A for any value for which you can PRINT NOT A but it won't work for A=32767. This means you must be very careful when testing programs where you really do want to do logic functions on all 16 bits. Either break your values into two 8-bit values or guarantee that the 16th bit can never be set all by itself. Page 32, last sentence) Pay special attention to the statement that geoBASIC is the opposite of CBM BASIC when comparing strings. In your mind, always interchange "<" and ">" when used with strings or you will waste a lot of time debugging any program that uses them. (At least this "bug" was "documented".) Page 39 and 104, APPEND) In the example of APPEND 2, the pointer will be at the new record which is 3. (The old 3 and above have all been moved up one.) The admission of a bug that prevents APPENDing to record 126 is in error. GEOS VLIR files can have only 127 records which are number 0 through 126. (Isn't it a shame that the one time a bug is admitted to, it isn't a bug at all but a documentation error? Actually this "bug" is mentioned many times in the manual but I'll just mention it just once here.) Page 41, CALL) You can also PEEK the returned values of the A,X,Y, and status registers at locations 650 through 653 respectively. Unfortunately you cannot directly CALL any GEOS routines that pass parameters in the zero-page pseudo registers. Page 41, near bottom) CHKPT has been left out but it is correctly described on page 97 as TESTPT. Change its name on page 97 to CHKPT and make a note on page 41 where it belongs. Page 42, list of CHR$) CHR$(26) turns on outline printing and CHR$(27) turns off all effects. Page 48, DELETE) This command can also be used in the editor to delete program lines following the same syntax as for LIST on page ÂÆp8XXpˆXXXXX8Š66. Typing DELETE all by itself erases your 8XXpˆXXXXX8Š66. Typing DELETE all by itself erases your entire program. Page 53, FIND) I don't think this editor command is documented anywhere in the manual but it is extremely useful. It searches for every occurrence of a text string in your program or just within a range of lines. I especially like it to detect re-used variable names by having it find the first three characters of a new variable name. If it finds another variable starting with the same three characters, then I need a different name. The syntax is FIND "string",10,20 where the start and stop line numbers are optional. Page 66, bottom) Hitting the F5 key toggles the listing, don't hold it down. Page 70, MOUSE) This command requires two more parameters and has the same syntax as PROMPT on page 81. Both commands do not take effect until the mainloop is entered. Page 76, PATTERN) The patterns are the same as those displayed in geoPaint. To erase an area use 0. For a solid fill use 1. Page 77, POINT) This command can turn off as well as turn on individual screen pixels as determined by the previous setting of SETCOL. Use 0 to turn pixels off and 1 to turn them on. Page 82, PRSCREEN) If the expression is 1, the screen is printed double size, not rotated. Use MAINLOOP instead of RETURN when done with this command. Page 87, RND) This function is hardly random, use with caution. Try this simple program which should place dots randomly on the screen: 10 CLS 20 SETCOL 1 30 POINT RND(319), RND(199) 40 GOTO 30 Page 88 & 89, SETCOL) Add a 4th use for the POINT command as described earlier. Page 90, last paragraph) The first expression for voice must evaluate from 1 to 3 (not 0 to 3). For the second and third expressions, interchange the words "high" and "low". Page 95, near bottom) Parameter # 13 determines how the geoBASIC program was "RUN" or called. If it was double-clicked on as a stand-alone application, the value is 0. If it was double-clicked on prior to being converted to an application, the value is 1. If geoBASIC itself was run and then the program was selected from the dialog box, the value is 2. Page 96, TAB) The expression must be between 0 and 319. There is a tab at every pixel location, not every 40. Page 97, TESTPT) Change to CHKPT. ©w8XXpˆXXXXX8ŠSUBJ: Hiding WRITE's CHR$(0) FROM: Greg K 06/03/91 S#: 394950 WRITE puts a CHR$(0) at the end of every item which it puts into a file, plus another CHR$(0) at the end of each8XXpˆXXXXX8ŠSUBJ: Hiding WRITE's CHR$(0) FROM: Greg K 06/03/91 S#: 394950 WRITE puts a CHR$(0) at the end of every item which it puts into a file, plus another CHR$(0) at the end of each record. This listing shows how to "bury" those zeroes in a geoWrite file, so that they won't interfere with the text. They're made a part of four-character font, style "escape sequences;" they say, "plain text." Note: Line 60 "works around" a bug in the HEADER statement. And, line 70 adds a field which isn't even touched by HEADER! Those lines show you where to go when you want to customize CREATE/SAVE's fileHeader. 10 rem subject: hiding write's chr$(0) 20 rem this shows how to bury write's chr$(0) terminator in an escape sequence. 30 rem demo code makes a geowrite 1.1 file. 40 z$=chr$(0): nc$=chr$(23)+chr$(9): ns$=nc$+z$: rem sets plain bsw9 font 50 rl$=chr$(223)+chr$(1): rl$=z$+z$+rl$+rl$+rl$+rl$+rl$+rl$+rl$+rl$+rl$+ns$ 60 header 7,"Write Image v1.1",1: poke 28452,49: poke 28453,46: poke 28454,49 70 for p=1 to 9: poke 28478+p,asc(mid$("geoWrite ",p)): next 80 create "list": for p=0 to 125: append p: next 90 for p=0 to 2: ptrec p: restore: write rl$ 100 for w=1 to 16: read d$: write " " +d$+ns$," "+d$+ns$: next: write nc$: next 110 write "": ptrec 0: close 120 data "name-1","name-2","name-3","name-4","name-5", "name-6","name-7" 130 data "name-8","name-9","name-10","name-11","name-12", "name-13","name-14" 140 data "name-15","name-16" It's important that there aren't any typographical errors in your program file! Be sure to correct the two string literal constants (in lines 60 & 70)! They must be in lower case, with only certain letters in capitals. ¢£|8XXpˆXX8XXpˆXXXXX80ŠStuff from: THE SMEE 6/17/91 8XXpˆXXXXX8Š€Undocumented Commands 8XXpˆXXXXX8 ŠThe FIND command is not documented in GeoBasic but is very useful. Its syntax is as follows: FIND This must be entered from direct mode, and will result in a Syntax error if done within execution mode. The ' can also be used in place of REM. This will save you a few keystrokes. The ' will be replaced by REM after you hit return. ' This is my rem statement. The POP command is not documented within the GeoBasic Manual because it contained a bug which was later fixed with a patch made by William Coleman. Pop now Removes the last two current pointers for UNTIL, LOOP, & RETURN. This can be useful if you plan it right. 8XXpˆXXXXX8Š€Reported BUGS yet unverifiedŠ 8XXpˆXXXXX8 DELETE may cause the same Effects as UPDATE does. Do not use DELETE from Direct mode unless you need to delete a lot of multiple lines. To delete a line it is best to type the line number the line is on and hit return. 8XXpˆXXXXX8Š€TIPSŠ 8XXpˆXXXXX8 When using the FONT command, you may have noticed that by Typing in FONT"BSW",9 doesn't automatically select the BSW font which is resident. This is not only annoying but wastes time. Use CALL 49483 which will call up the BSW resident font instantly. To detect whether sprites have collided or not, it is best to use the Commodore Kernal Sprite collision detect. But we need a way to swap the GEOS Kernal in and out to Peek the Commodore Kernal. Use the Following. POKE 1,53 :REM This Swaps GEOS Kernal out and Commodore Kernal in. POKE 1,48 :REM This Swaps GEOS Kernal back in. Be sure to swap GEOS back in when you are about to use a Dialog Box, display a menu, or exit Execution mode. If you don't you will get a spectacular crash. Use common sense. When you call up a DBSTRN dialog box, and it has TEXT which you have programmed into it, you may have noticed that the Text prints in bold. To Defeat that, type in as follows: DBSTRN CHR$(27)+"Enter Input",IN$ If you have use the variable function within DIALOG (using the Editor to design the DB) You should have noticed that the last character gets chopped off into limbo. To avoid this create a permanent variable such as SP$=" " . There should be a space between the quotes. When creating your dialog box, and you want the variable, such as B$ to print out in the dialog box, enter it as follows: B$+SP$ The space that gets to go to limbo now is SP$. ò v8XXpˆXXXXX8Š If you want to create temporary datafiles, but do not want to clutter up your disk and do not want to do Disk cleanning later, use a hea8XXpˆXXXXX8Š If you want to create temporary datafiles, but do not want to clutter up your disk and do not want to do Disk cleanning later, use a header that creates a TEMPORARY data file as follows: HEADER 13,"Temporay",1 When you re-enter the Desktop, it will automaticaly be erased from your disk, regardless. This is good if your about to run out of variable space, or any other data which you do not need at the moment. This will conserve some space. On Some printers PRNTER will allow you to select between your printers DRAFT or NLQ modes. The Manual is Correct in Stating that a 0 will route output to screen while 1 will route it to printer. Any number greater than one will also route text to the printer, but in NLQ mode. If you are running a program which does not require MOUSE input, shut off the mouse pointer. It will increase the speed of your program. To shut it off type MOUSE0,0,0. You can use MOUSEX and MOUSEY to store that mouse pointer position for later. The UPDATE option isn't totally useless. If you make a program you do not want anyone to alter or modify, Use the update command after you have made your program source into an application. Remember you can still view the source code of a program by double clicking on GeoBasic, not the Application. Then select the GeoBasic Application and punch OPEN. Then select UPDATE a bunch of times. Your program will still work normally, but lines added to the Program will disappear once you exit. 8XXpˆXXXXX8Š€GeoBasic Application Chaining 8XXpˆXXXXX8 ŠAlthough I don't see the need for it, I have found a way to chain one GeoBasic Self Running Application to Another GeoBasic Self running application. I worked out the code at a users request. So instead of keeping it a secret here is the code: 10 CLS 20 HEADER 6,"",1 : REM LOOK FOR APPLICATIONS 30 DBFILE L$ 35 IF L$=""THEN END 40 S=LEN(L$) 50 FOR I=1 TO S 60 X=ASC(MID$(L$,I,1)) 70 POKE45055+I,X : REM Stores Application name in Screen Memory. 80 NEXT I 82 SYSINFO3,CD : REM CD is Current Drive. 84 CALL 49840,0,0,CD : REM This is SetDevice. 85 CALL 49825 : REM This is OpenDisk. 90 DPOKE14,45056 : REM Flag r6. Name Pointer. 91 POKE 2,0 : REM Flag r0L. 100 CALL 49672 : REM This is GetFile. There are Side effects though! If you use this, you can only load another GB Self Running Applications!! Anything else will cause a lock up! Also you must Exit to Basic! To do so your Exiting program must not end with END. Use this instead: 8XXpˆXXXXX8Š 10 DPOKE 12,0 : REM flag r5. 20 DPOKE 16,2051 : REM flag r7. 30 POKE 2048,0 40 DPOKE 2049,0 50 CALL 49729,S 60 REM CALL ToBasic Now look at line 50. The variable S must not have any set value! Leave it Undefined! When you exit to basic all you have to do is hit RESTORE and you will be deposited back to DESKTOP.