#include <stdio.h>#include <stdlib.h>#include <signal.h>#include "pmac.h"Include dependency graph for dpoke.c:

Go to the source code of this file.
Functions | |
| void | handler (int sig) |
| int | main (int argc, char **argv) |
Variables | |
| int | done = 0 |
|
|
Definition at line 9 of file dpoke.c. 00010 {
00011 done = 1;
00012 }
|
|
||||||||||||
|
Definition at line 14 of file dpoke.c. 00015 {
00016 int n;
00017 int value;
00018 static char syntax[] = "syntax: %s <index> <value>\n";
00019
00020 /* get DP RAM */
00021 pmac_init();
00022
00023 if (argc != 3)
00024 {
00025 printf(syntax, argv[0]);
00026 exit(1);
00027 }
00028
00029 if (sscanf(argv[1], "%d", &n) != 1)
00030 {
00031 printf(syntax, argv[0]);
00032 exit(1);
00033 }
00034
00035 if (sscanf(argv[2], "%x", &value) != 1)
00036 {
00037 printf(syntax, argv[0]);
00038 exit(1);
00039 }
00040
00041 write_pmac_uint32(n, value);
00042
00043 pmac_exit();
00044
00045 exit(0);
00046 }
|
|
|
|
1.2.11.1 written by Dimitri van Heesch,
© 1997-2001