Re: [cc65] Inserting Assembly Routines

Date view Thread view Subject view

From: Shawn Jefferson (sjefferson_at_sd62.bc.ca)
Date: 2002-11-27 23:12:35


>>> Ullrich von Bassewitz <uz_at_musoftware.de> 11/27/02 11:28AM >>>

>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.

In the Atari, this is complicated by the fact that a huge window is banked out (16 kB).  Using the banked memory as storage is easy if you do your own linker config and assign code segments manually.  Using it for code would be more of the same, I guess (as you have explained to me.)

In the internal.txt there is mention of using the extended ram and ram under the OS as a far heap. What does this mean?

I have thought of writing routines that would allow you to malloc memory in this extended memory banks, and when you want to access it, it would bank in the right memory bank and then malloc a block in regular ram, copy the data there, bank in the regular 16kB bank again, and return a pointer to the regular ram where it was copied.  This may be just too much overhead/work though....

Problems:
- this code must not be in the bank window
- the bank window cannot contain interrupt routines, or you must disable interrupts while the extended memory access is happening (might this be too long?)
- lots of overhead/speed issues maybe too.

Another topic: Are/is the module loading routines going to be supported on the Atari?


----------------------------------------------------------------------
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-27 23:13:24 CET