muddle/include/mapper.h
2024-02-08 20:47:28 -06:00

29 lines
688 B
C

/*
Special mapper macros for the F256 + mos-llvm, so we can put code
anywhere in physical ram
Currently only blocks 8-23 are defined in the linker file
If you need to go beyond the 128k of extra code, just add more definitions
into f256.ld
*/
#if defined(__F256K__) && __F256K__ && 0
/*
$$JGA TODO, sort out how to mark an entire file
*/
#define CODE_BLOCK(index) __attribute__((noinline, section(".block"#index)))
#define DATA_BLOCK(index) __attribute__((section(".block"#index)))
#define PAGEIN(_function_BLOCK) POKE(SWAP_SLOT, _function_BLOCK)
#else
#define CODE_BLOCK(index)
#define DATA_BLOCK(index)
#define PAGEIN(_function_BLOCK)
#endif