add LCC - a better C-Compiler for WEGA

This commit is contained in:
Oliver Lehmann 1990-03-22 15:43:30 +00:00
parent f41d64e45f
commit e8fa5c2017
1 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,40 @@
/*
* Convert longs to and from 3-byte disk addresses
*/
void
ltol3(cp, lp, n)
char *cp;
long *lp;
int n;
{
register i;
register char *a, *b;
a = cp;
b = (char *)lp;
for(i=0; i < n; ++i) {
b++;
*a++ = *b++;
*a++ = *b++;
*a++ = *b++;
}
}
void
l3tol(lp, cp, n)
long *lp;
char *cp;
int n;
{
register i;
register char *a, *b;
a = (char *)lp;
b = cp;
for(i=0; i < n; ++i) {
*a++ = 0;
*a++ = *b++;
*a++ = *b++;
*a++ = *b++;
}
}