mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-06-03 07:29:37 +00:00
e371d304f6
- Create the possibility of forward declaration of structs as part of the language. - Generation of forward declarations in the .asm header files. - Treat global variables as part of global memory, even in libraries. Ensure that globals are not overwritten when importing. - Ensure that the various compilation models (stack, var, phi) in combination with the memory models (zp, mem) result in proper execution of code and proper memory allocation etc, etc. - Added the lru-cache logic to properly test the compilation and memory model combinations. (A lot of bugfixes as a result!)
26 lines
303 B
C
26 lines
303 B
C
#pragma encoding(screencode_mixed)
|
|
#pragma var_model(local_zp)
|
|
|
|
#pragma asm_library
|
|
#pragma calling(__varcall)
|
|
|
|
#pragma var_model(zp)
|
|
|
|
struct data {
|
|
char y1;
|
|
char y2;
|
|
char y3;
|
|
};
|
|
|
|
struct data y = {128,129,130};
|
|
|
|
|
|
|
|
// The plus functions
|
|
|
|
char get_y(char i) {
|
|
|
|
return ((char*)(&y))[i];
|
|
}
|
|
|