home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / genie-commodore-file-library / MRFiles / GS3DVPAK.ARC / GSAPPENDIX4 (.txt) < prev    next >
Encoding:
GEOS ConVerT  |  2019-04-13  |  6.0 KB  |  32 lines

  1. gsappendix4
  2. PRG formatted GEOS file V1.0
  3. CONVERTED WITH GEOSHELL V2.2
  4. Write Image V2.1
  5. geoWrite    V2.1
  6. @APPENDIX D
  7. @THE INCLUDED SOURCE CODE
  8. Included with this package are a number of source code files. Within these you will find many useful examples that you might be able to use in your own source code when creating a geoSHELL command. Feel free to make use of these, or to get ideas on how to develop your own routines. You can also find many examples throughout this manual. Almost every routine description has at least one source code example to go with it. Just use GeoWrite to cut and paste any of this source into your own source code files.
  9. When creating a geoSHELL command, you might always want to start out with the 'Sample' source code files and build on them. This group of files includes the following:
  10. Sample    ;the main source file.
  11. SampleHdr    ;the header file.
  12. Sample.lnk    ;the linker file.
  13. Just make copies of these files and then rename them appropriately for the command you are creating. Then start adding additional code to create your command.
  14. The included file MiscSource contains several sample routines. Each routine is documented in the file. Look through this file and see if there are any routines that might be useful to you.
  15. Also included is the complete source code for the command 'color80'. This was the first graphic command that operated outside of the geoSHELL window. While looking through the source for color80, you'll notice that it would really have been easy to change the colors of the screen with just a parameter following the command. But I created the command this way to show everyone that geoSHELL doesn't leave you stuck working with text in a window. The bulk of color80 deals with the screen it creates, and not the actual changing of the colors.
  16. color80 is a 128 only command but will still give the 64 users an idea of how to get in and out of the geoSHELL window. The biggest thing you must remember is to not jump through NoMoreCmds until you've restored the window. It is your job to do this. The NoMoreCmds routine could have been made to check for this condition except the routine is used quite a lot and it would be disturbing to see the window redrawn on every error that occurs. Perhaps a variable could have been used to tell the routine if the window is active or not. In any case, just be sure to rebuild the window if you do anything to remove it before your command exits. There are routines that will do this for you. If you don't trash the window, then you need not worry about it.
  17. In the file MiscSource you'll also find a way to blank the 40 column screen for when you need to use the extra screen memory for processing. The same methods here can be used to restore the screen. You will see just how easy it is. When operating in 80 columns, you can use the 40 column foreground memory without blanking the screen. The routines included in MiscSource will check the screen mode and take appropriate action for you.
  18. @REQUIR
  19. @REQUIRED FILES
  20. When you are assembling and linking your commands, there will be some files that you will need in order to have access to all that geoSHELL makes available to you. In your main source code, you would naturally want geosSym (included in GEOPROGRAMMER) in order to be able to use the labels it provides for having access to the GEOS kernal along with various constants. You'll also need geosMac in order to be able to use the macros that you will find in most of the examples that are in this package. Both of these files are included with GEOPROGRAMMER. In the sample source code file that you will use as your template, these have already been .included'd at the beginning of the source file. In the sample linker file there is a call to GSVariables.rel. This is the other file that you need. It is included in this package. Also included is the source code that assembles into this .rel file.
  21. You can load up these source files into GeoWrite if you want to study the different equates and constants contained in them. By linking GSVariables.rel with your source code, you will have access to these. This includes all of the built-in routines in geoSHELL and all of the accessible variables. Plus some additional constants are included for geoSHELL that you may or may not have a use for. Linking GSVariables.rel with your source does not add any bytes at all to the code that you are creating. It is all constants and equates and no actual program code. But link it ahead of your file so that GEOLINKER will already be aware of it when it links your file.
  22. The following files are used to create GSVariables.rel:
  23. GSVariables
  24. GSVars1
  25. GSVars2
  26. ShellEquates
  27. If you ever need to recreate GSVariables.rel, just assemble GSVariables. It .includes the other files when it is assembled. It would not be a good idea to alter the contents of any of these files unless you are merely adding some of your own constants or equates. If you alter the existing ones, then your code might put data where it doesn't belong.
  28. Most of the equates and constants contained in these files are also discussed throughout this manual.
  29. The geoSHELL Programmer's Development Package    D-PAGE
  30. rally wan
  31. The geoSHELL Programmer's Development Package    D-PAGE
  32.