Re: [cc65] repeating code blocks

Date view Thread view Subject view

From: Groepaz (groepaz_at_gmx.net)
Date: 2000-05-23 00:35:49


> I have explained it in some older mail, but here is it again:
> 
> There is a difference between relocation and placement. The linker does both,
> but it is not the same. You may relocate a piece of code to run at address
> $1000 but place it at address $2000. The address given in the memory area
> statement is the relocation address. Code put into this area is relocated to
> run at the given address. The placement of the code is a result of several
> other statements and the load address of the resulting binary file.
> 
> Most other 6502 development tools don't make a difference between relocation
> and placement (in fact, many available tools do not even support relocatable
> intermediate files). This may be the reason, why the concept looks strange on
> the first glance.

well i understand the concept behind this pretty much, and i believe its really
powerful and useable in big projects were you have code-overlayes, maybe you
are also writing code that will end up in an eprom etc.... BUT, i guess most
programs written by most programmers arent really those bigass projects, but
rather some small handy tool or graphical effect. also using fixed memory
adresses
for stuff like screens,bitmaps etc pp isnt really an exotic thing to do.
actually
the good old drive-code example is the ONLY thing that comes to mind for using
a different placement and relocation adress.
 
> fill=yes would mean that you will *always* get a file with the size of the
> memory area. This means that any assembler program that uses something like
> the standard memory configuration will be 54K in size, even a simple "hello
> world" with 40 bytes of code+data. I don't think that people will like this
> default, and that it will cause a lot of questions.

well you can always add a switch (and make it default aswell) that would pad the
resulting binary to its smallest possible size (cutting unused space at start
and
end of the used memory config) 

...
...

anyway, maybe its just a matter of taste anyway ;=P

gimme that .rept thing at least ;=P

gpz
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2001-12-14 22:05:36 CET