2019-05-03 21:35:15 +00:00
|
|
|
/* Test Integer Variables */
|
|
|
|
|
|
|
|
#pragma origin $F000
|
|
|
|
#pragma zeropage $80
|
|
|
|
|
|
|
|
char b,d;
|
2019-05-13 03:34:47 +00:00
|
|
|
char hi,lo;
|
2019-05-03 21:35:15 +00:00
|
|
|
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;
|
|
|
|
|
2019-05-03 21:35:15 +00:00
|
|
|
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;
|
2019-05-03 21:35:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int fnd(aa,yy,xx) {
|
2019-05-13 03:34:47 +00:00
|
|
|
if (aa) return .,xx,yy;
|
|
|
|
else return .,yy,xx;
|
2019-05-03 21:35:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int fni(yx) {
|
|
|
|
yx++;
|
|
|
|
return yx;
|
|
|
|
}
|
|
|
|
|
|
|
|
int fnj(aa, yx) {
|
|
|
|
if (aa:-) yx--;
|
|
|
|
else {if (aa) yx++;}
|
|
|
|
return yx;
|
|
|
|
}
|