From: ol.sc Date: Thu, 5 Jan 2012 01:10:00 +0000 (+0000) Subject: Updated second part of the grc65 doc. X-Git-Tag: V2.13.3~79 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8cf0794c3ed1c2b4b2835e414fdb0d49d75b80cb;p=cc65 Updated second part of the grc65 doc. git-svn-id: svn://svn.cc65.org/cc65/trunk@5386 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/doc/grc65.sgml b/doc/grc65.sgml index 0c27ac970..9d3d30f02 100644 --- a/doc/grc65.sgml +++ b/doc/grc65.sgml @@ -26,7 +26,7 @@ files of an app.), dialog definitions, etc. Without an application's header, GEOS is unable to load and start it. Currently, Resource file format

A resource file has the name extension for a -better view of the problem. +better view of the situation. Menu definition @@ -79,7 +79,7 @@ MENU menuName leftx,topy { ... "item name x" pointer } -The definition starts with the keyword for descriptions of them). You can use C logical operators in expressions, but you have to do it -without spaces. So, a dynamically created submenu will be something like: +without spaces. So a dynamically created submenu will be something like: "dynamic" SUB_MENU|DYN_SUB_MENU create_dynamic The last part of the item definition is a pointer which can be any name that is @@ -99,7 +99,7 @@ present in the C source code that includes the generated header. It can point to a function or to another menu definition. If you are doing sub(sub)menu definitions, remember to place the lowest level -definition first, and the top-level menu as the last one. That way, the C +definition first, and the top-level menu as the last one. That way the C compiler won't complain about unknown names. @@ -176,9 +176,9 @@ general. GEOS support in cc65 is based on the . +deconverted in GEOS, before it can be run. You can read a step-by-step +description of that in the . Each project consists of four parts, two are provided by cc65. Those parts are: @@ -187,132 +187,130 @@ are: application objects system library -Building a GEOS application without cl65 -

Assume that there are three input files: &dquot; #include -#include "resource.h" +#include "testres.h" There are no other includes. + +Building the GEOS application using cl65 +

This is a simple one step process: + +cl65 -t geos-cbm -O -o test.cvt testres.grc test.c + +Always place the Building the GEOS application without cl65 First step -- compiling the resources -

-$ grc65 resource.grc - -will produce two output files: &dquot; +grc65 -t geos-cbm testres.grc + +will produce two output files: &dquot;Second step -- assembling the application header -

-$ ca65 -t geos-cbm resource.s - -And, voilá -- &dquot; +ca65 -t geos-cbm testres.s + +And, voilá -- &dquot;Third step -- compiling the code -

-$ cc65 -t geos-cbm -O test.c -$ ca65 -t geos-cbm test.s - + +cc65 -t geos-cbm -O test.c +ca65 -t geos-cbm test.s + That way, you have a &dquot;Fourth and last step -- linking it together -

-$ ld65 -o test.cvt -t geos-cbm resource.o geos.o test.o geos.lib - -&dquot; +ld65 -t geos-cbm -o test.cvt testres.o test.o geos.lib + +The last file is the GEOS system library. The resulting file &dquot;Building a GEOS VLIR application

Currently, you can build VLIR applications only if your code is written in -assembly -- no C code allowed. +Building a GEOS VLIR overlay application

Large GEOS applications typically don't fit in one piece in their designated +memeory area. They are therefore split into overlays which are loaded into memory +on demand. The individual overlays are stored as records of a VLIR (Variable +Length Index Record) file. When GEOS starts a VLIR overlay appliation it loads +record number 0 which is supposed to contain the main program. The record numbers +starting with 1 are to be used for the actual overlays. -In your sources, only the command cc65/samples/geos" there's a VLIR overlay demo application consisting +of the files ", but there also is a - - -VLIR vlir-head.bin 0x3000 { - vlir-0.bin ; CODE, RODATA, DATA, BSS - vlir-1.bin ; VLIR1 - vlir-2.bin ; VLIR2 -} -(Source files are only -$ grc65 cvthead.grc - -Now, there are two new files: &dquot; -$ ca65 -t geos-cbm cvthead.s - -Now, we have &dquot; -$ ca65 -t geos-cbm vlir0.s -$ ca65 -t geos-cbm vlir1.s -$ ca65 -t geos-cbm vlir2.s - -Note that the file-names here, although similar to those from the - -$ ld65 -C cvthead.cfg vlir1.o cvthead.o vlir0.o vlir2.o - -As defined in the -$ grc65 -vlir output.cvt vlir-head.bin vlir-0.bin vlir-1.bin vlir-2.bin - -That is the end. The file &dquot;Building the GEOS application using cl65 +

This is a simple one step process: + +cl65 -t geos-cbm -O -o overlay-demo.cvt -m overlay-demo.map overlay-demores.grc overlay-demo.c + +Always place the Building the GEOS application without cl65 +First step -- compiling the resources + +grc65 -t geos-cbm overlay-demores.grc + + +Second step -- assembling the application header + +ca65 -t geos-cbm overlay-demores.s + + +Third step -- compiling the code + +cc65 -t geos-cbm -O overlay-demo.c +ca65 -t geos-cbm overlay-demo.s + + +Fourth and last step -- linking it together + +ld65 -t geos-cbm -o overlay-demo.cvt -m overlay-demo.map overlay-demores.o overlay-demo.o geos.lib +