1
0
mirror of https://github.com/RevCurtisP/C02.git synced 2024-11-18 21:07:28 +00:00
C02/work/ints.c02

57 lines
603 B
Plaintext
Raw Normal View History

/* Test Integer Variables */
#pragma origin $F000
#pragma zeropage $80
char b,d;
2019-05-13 03:34:47 +00:00
char hi,lo;
char s[128];
char aa,yy,xx;
zeropage int zp80, zp82;
alias int c0 = $C000;
const int c = $1234;
int e;
int i,j;
int m,n;
int yx;
2019-05-13 03:34:47 +00:00
hi = >c; lo = <c;
hi = >&c; lo = <&c;
i<<;
j>>;
m++;
n--;
e = $5678;
e = c;
e = &$D000;
e = &s;
b = fnb(e);
d = fnd(b,c);
i = fni(c);
j = fnj(b,c);
2019-05-13 03:34:47 +00:00
int fnb(.,yy,xx) {
return .,xx,yy;
}
int fnd(aa,yy,xx) {
2019-05-13 03:34:47 +00:00
if (aa) return .,xx,yy;
else return .,yy,xx;
}
int fni(yx) {
yx++;
return yx;
}
int fnj(aa, yx) {
if (aa:-) yx--;
else {if (aa) yx++;}
return yx;
}