home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / genie-commodore-file-library / GEOSApps / GEOBASICBUGS.CVT (.txt) < prev    next >
GEOS ConVerT  |  2019-04-13  |  17KB  |  141 lines

  1. 3!GB WOrkArounds
  2. PRG formatted GEOS file V1.0
  3. Epson FX-80
  4. OP V2.0 or higher
  5. GB WORKAROUNDS
  6. BLASTER'S CONVERTER V2.5
  7. CONVERT
  8. Write Image V2.1
  9. Red Storm
  10. geoWrite    V1.1
  11.   This file was created with
  12. Wrong is Write.
  13.   Written by Joe Buckley.
  14. SUBJ: Work around    (R)  FROM: GH Wells   04/28/91  S#: 809400  
  15.     Here are the bugs and work-arounds that I am aware of:
  16.     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.
  17.     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:
  18.         10 CREATE "junk"
  19.         20 SYSINFO 14, name$
  20.         30 OPEN name$
  21.         40 BITMAP "pic",10,10
  22. Assuming that "pic" is a disk-loadable
  23. bitmap, take out lines 20 and 30 to see the problem.
  24.     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.
  25.     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.
  26.     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.
  27.     6)  Always RUN your program just before you make it into an application.
  28.     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.
  29.     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.
  30.     Page 17)  Don't ever UPDATE.  Always RUN a program (even if it doesn't work) before QUITing or CLOSEing.
  31.     Page 18, 3 lines from top)  Change F7 to F5.
  32.     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 
  33. 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, i
  34. 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).
  35.     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.
  36.     Page 23, end of last full paragraph)  Don't leave the trailing quotes off of string constants, even if it sometimes works.
  37.     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.)
  38.     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.  
  39.     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".)
  40.     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.)
  41.     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.
  42.     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.
  43.     Page 42, list of CHR$)  CHR$(26) turns on outline printing and CHR$(27) turns off all effects.
  44.     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 
  45. 66.  Typing DELETE all by itself erases your 
  46. 66.  Typing DELETE all by itself erases your entire program.
  47.     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.
  48.     Page 66, bottom)  Hitting the F5 key toggles the listing, don't hold it down.
  49.     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.
  50.     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.
  51.     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.
  52.     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.
  53.     Page 87, RND)  This function is hardly random, use with caution.  Try this simple program which should place dots randomly on the screen:
  54.         10 CLS
  55.         20 SETCOL 1
  56.         30 POINT RND(319), RND(199)
  57.         40 GOTO 30
  58.     Page 88 & 89, SETCOL)  Add a 4th use for the POINT command as described earlier.
  59.     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".
  60.     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.
  61.     Page 96, TAB)  The expression must be between 0 and 319.  There is a tab at every pixel location, not every 40.
  62.     Page 97, TESTPT)  Change to CHKPT.
  63. SUBJ: Hiding WRITE's CHR$(0)    FROM: Greg K 06/03/91   S#: 394950  
  64.     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
  65. SUBJ: Hiding WRITE's CHR$(0)    FROM: Greg K 06/03/91   S#: 394950  
  66.     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."
  67.     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.
  68.         10 rem subject:  hiding write's chr$(0)
  69.         20 rem this shows how to bury write's chr$(0) terminator in         
  70.             an escape sequence.
  71.         30 rem demo code makes a geowrite 1.1 file.
  72.         40 z$=chr$(0): nc$=chr$(23)+chr$(9): ns$=nc$+z$: rem sets
  73.             plain bsw9 font
  74.         50 rl$=chr$(223)+chr$(1):
  75.             rl$=z$+z$+rl$+rl$+rl$+rl$+rl$+rl$+rl$+rl$+rl$+ns$
  76.         60 header 7,"Write Image v1.1",1: poke 28452,49: poke
  77.             28453,46: poke 28454,49
  78.         70 for p=1 to 9: poke 28478+p,asc(mid$("geoWrite ",p)): next
  79.         80 create "list": for p=0 to 125: append p: next
  80.         90 for p=0 to 2: ptrec p: restore: write rl$
  81.         100 for w=1 to 16: read d$: write " " +d$+ns$," "+d$+ns$:
  82.             next: write nc$: next
  83.         110 write "": ptrec 0: close
  84.         120 data "name-1","name-2","name-3","name-4","name-5", 
  85.             "name-6","name-7"
  86.         130 data "name-8","name-9","name-10","name-11","name-12", 
  87.             "name-13","name-14"
  88.         140 data "name-15","name-16"  
  89.     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.
  90. Stuff from: THE SMEE  6/17/91
  91. Undocumented Commands
  92. The FIND command is not documented in GeoBasic but is very useful. Its syntax is as follows:
  93.         FIND <string>
  94.     This must be entered from direct mode, and will result in a Syntax error if done within execution mode.
  95.     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.
  96.         ' This is my rem statement.
  97.     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.
  98. Reported BUGS yet unverified
  99.     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.
  100.     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.
  101.     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.
  102.         POKE 1,53 :REM This Swaps GEOS Kernal out and Commodore
  103.                         Kernal in.
  104.         POKE 1,48 :REM This Swaps GEOS Kernal back in.
  105.     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.
  106.     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:
  107.         DBSTRN CHR$(27)+"Enter Input",IN$
  108.     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$.
  109.     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 hea
  110.     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:
  111.         HEADER 13,"Temporay",1
  112.     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.
  113.     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.
  114.     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.
  115.     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.
  116. GeoBasic Application Chaining
  117. 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:
  118. 10 CLS
  119. 20 HEADER 6,"",1 : REM LOOK FOR APPLICATIONS
  120. 30 DBFILE L$
  121. 35 IF L$=""THEN END
  122. 40 S=LEN(L$)
  123. 50 FOR I=1 TO S
  124. 60 X=ASC(MID$(L$,I,1))
  125. 70 POKE45055+I,X : REM Stores Application name in Screen Memory.
  126. 80 NEXT I
  127. 82 SYSINFO3,CD : REM CD is Current Drive.
  128. 84 CALL 49840,0,0,CD : REM This is SetDevice.
  129. 85 CALL 49825 : REM This is OpenDisk.
  130. 90 DPOKE14,45056 : REM Flag r6. Name Pointer.
  131. 91 POKE 2,0 : REM Flag r0L.
  132. 100 CALL 49672 : REM This is GetFile.
  133.     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:
  134. 10 DPOKE 12,0 : REM flag r5.
  135. 20 DPOKE 16,2051 : REM flag r7.
  136. 30 POKE 2048,0
  137. 40 DPOKE 2049,0
  138. 50 CALL 49729,S
  139. 60 REM CALL ToBasic
  140.     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.
  141.