hansb@ariel.unm.edu (The Amiga Programmer) (05/02/89)
/*
(Please, No Flames on this one)
Ok, here is something that breaks all of the rules...
Be warned!
(this is for all those people that need a poke and peek function
in C that used to use them in Basic)
This can be modified to just peek a value, but currently it pokes
and reads back from the memory location to insure success.
Command:
BASIC: poke address,byte
C: pokepeek(address,byte);
*/
void pokepeek(d,c)
unsigned char *d; /* pointer to destination */
unsigned char c; /* byte value to poke */
{
*d=c; /* poke at location d */
printf("Hex Location $%x = %d\n",d,*d); /* peek at location */
}
*********************** Hans Bechtel
* Amiga is One / *
* of The Best / * hansb@ariel.unm.edu
************** \/ ***** (505) 275-2797