mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-06-03 07:29:37 +00:00
00df07b7bf
- Treat global variables of libraries, as part of the .asm library .namespace. - Fix bugs. - Assign meaningful struct names to .asm internal variables and labels. (Remove the $x notation).
26 lines
569 B
C
26 lines
569 B
C
#pragma encoding(screencode_mixed)
|
|
#pragma var_model(zp)
|
|
|
|
#include "typedef_lib_types.h"
|
|
|
|
#include <typedef_lib_asm.h>
|
|
#include <print_lib_asm.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
void main() {
|
|
|
|
clrscr();
|
|
|
|
fdata_t data1 = {1,2,3};
|
|
fdata_t data2 = {10,20,30};
|
|
|
|
printf("f1, data1 = %u\n", get_f1(&data1));
|
|
printf("f2, data2 = %u\n", get_f2(&data2));
|
|
printf("f1, data2 = %u\n", get_f1(&data2));
|
|
printf("f2, data1 = %u\n", get_f2(&data1));
|
|
// TODO ...
|
|
// printf("f1, data2 = %u\n", get_f1(&data));
|
|
// printf("f2, data1 = %u\n", get_f2(&data));
|
|
}
|