Re: [cc65] Inserting Assembly Routines

Date view Thread view Subject view

From: Groepaz (groepaz_at_gmx.net)
Date: 2002-11-28 02:07:38


> cc65 is able to work with bank switched memory, but it needs some help from
> you, because you have to provide the necessary information and wrappers.
> Because bank switching is always very machine dependent, and needs special
> precautions by the programmer, it is not possible to convert existing
> programs to bank switched programs just by the use of a compiler switch (or
> similar). This is not a problem (or limitation) of cc65 alone, I don't know
> of any compiler with such a capability.

mmmh i remember using RGBDS (which is a simelar toolset as cc65, but for the 
gameboy)... that one allowed to atleast define which code goes into which 
bank....and it has an assembler-directive that returns the bank of a certain 
symbol..... ie (i dont remember exact syntax, any rgbds users forgive me ;=P)

	.bank 10
code:
	ld a,0
	...
	etc pp

	.bank 11
data:
	.db 0,1,2,3,4

	.bank 12
tabs:
	; gives full "far" adress of "data"
	.byte BANK(data)		
	.word data

that kinda feature is kindof important for our retroreplay project actually, 
so i gotta ask if thats possible somehow with cc65 (and if no, why is that 
:=))

btw i dont remember how that support was done on the C level there.... didnt 
use the C compiler as it was awfully incomplete and equally buggy :=P (cc65 
might be called bugfree and standard compliant compared to that piece of crap 
hehe)... prolly could be solved through some sort of section-attributes or 
sth...
----------------------------------------------------------------------
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 : 2002-11-28 00:42:47 CET