ack/lang/basic/lib/peek.c

27 lines
322 B
C
Raw Normal View History

1985-01-21 12:47:04 +00:00
/* $Header$ */
1984-11-29 14:22:02 +00:00
int peek(addr)
int addr;
{
/* this can not work properly for machines in which the
POINTERSIZE differs from the integer size
*/
char *p;
int i;
p= (char *)addr;
i= *p;
#ifdef DEBUG
printf("peek %d = %d\n",addr,i);
#endif
return(i);
}
_poke(i,j)
int i,j;
{
char *p;
p= (char *) i;
*p=j;
}