Re: [cc65] ca65 for stand-alone asm projects

From: Christian Grössler <chris1groessler.org>
Date: 2010-11-12 23:44:40
Hello Oliver,

On 12.11.10 23:16, Oliver Schmidt wrote:
>
> Hm, the link above contains the paragraph:
>
> "Enabling the Language Card allows to use it as additional memory for
> cc65 generated code. However code is never automatically placed there.
> Rather code needs to be explicitly placed in the Language Card either
> per file by compiling with --code-name HIGHCODE or per function by
> enclosing in #pragma codeseg (push, "HIGHCODE") and #pragma codeseg
> (pop). In either case the cc65 runtime system takes care of actually
> moving the code into the Language Card."
>
> That's basically all necessary to know from the user perspective...

Fine. But I'm not a user in this respect, I think ... :-)

>> How is the enabling/disabling of the ROM done? If code running
>> in regular memory calls a function in HIGHCODE, someone would need
>> to disable the ROM so that the function can be called, and afterwards
>> enable the ROM again.
>
> The link above contains the sentence:
>
> "While running main() the Language Card bank 2 is enabled for read access."

Ok. This probably means, the OS is switched out and RAM is present
at its location. I'm no Apple guy, so I overlooked this.

> So the idea it *not* to disable the ROM, call HIGHCODE and enable ROM
> again. Rather it's call HIGHCODE whenever you want - and enable ROM,
> call ROM, disable ROM when dealing with ROM.
>
> Here's the classic example - calling ROM to print a character (in cout.s):
>
> COUT:
> 	; Switch in ROM and call COUT
> 	bit	$C082
> 	jsr	$FDED		; Vector to user output routine
>
> 	; Switch in LC bank 2 for R/O and return
> 	bit	$C080
> 	rts

How do you handle interrupts? Is the complete ROM switched out, or only a
part? Can one call ROM routines from code placed in HIGHCODE?

So many questions... :-)

regards,
chris
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Nov 12 23:44:43 2010

This archive was generated by hypermail 2.1.8 : 2010-11-12 23:44:46 CET