home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ARM Club 1
/
ARM_CLUB_CD.iso
/
contents
/
sillies
/
silly1
/
!Rippler
/
c
/
oldrip
next >
Wrap
Text File
|
1990-03-05
|
1KB
|
56 lines
/* > c.ripple
* How to make strange things happen to your screen
*/
#include "kernel.h"
#include <stdio.h>
#define UNUSED(x) (x = x)
_kernel_oserror *cmd(char *arg_string, int argc, int cmd_no, void *pw)
{
return NULL;
}
void tm_service(int service_number, _kernel_swi_regs *r, void *private_word)
{
UNUSED(r);
UNUSED(private_word);
/*
* In general, it is a Bad Thing to use printf inside an arbitrary
* service call handler (e.g. in one that catches errors - call 6 -
* as this one does. Therefore we merely count what's happening and
* print it out when the TestCModule's SWI is called.
*/
if (service_number == UNKNOWN_CMD_SERVICE)
++unknown_cmd_count;
else
++other_service_call_count;
}
int tm_initialise(char *cmd_tail, int podule_base, void *private_word)
{
UNUSED(cmd_tail);
UNUSED(podule_base);
UNUSED(private_word);
unknown_cmd_count = other_service_call_count = 0;
return 0;
}
int main(int argc, char *argv[])
{
int i;
printf("%s: run code entered - ", TM);
if (argc == 0)
printf("no args\n");
else
{
for (i = 0; i < argc; i++) printf(" %s", argv[i]);
printf("\n");
}
return 0;
}