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).
19 lines
416 B
C
19 lines
416 B
C
/* Use the calculation library.
|
|
Compile first calc_lib.c.
|
|
Validate the .asm library calc_lib.asm.
|
|
Validate the main program using the functions of calc_lib.asm.
|
|
Notice the function calls into the calc_lib .namespace of calc_lib.asm.
|
|
*/
|
|
|
|
#pragma encoding(screencode_mixed)
|
|
#pragma var_model(zp)
|
|
|
|
#include "calc_lib_asm.h"
|
|
|
|
__export char r;
|
|
|
|
void main() {
|
|
r = 10;
|
|
r = plus(5,4);
|
|
r = min(5,4);
|
|
} |