summaryrefslogtreecommitdiff
path: root/sim/ucsim/tlcs.src/test/t1.c
blob: 071bf522bbb5431d147021c1b70874087fc6a0ec (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
static unsigned char * volatile sif= (unsigned char *)0x7fff;

volatile unsigned char x;

void
putchar(unsigned char c)
{
  *sif= 'p';
  *sif= c;
}

void
prints(char *s)
{
  while (*s)
    putchar(*s++);
}

void
main(void)
{
  unsigned char i;
  unsigned int j;

  prints("Start.\n");
  for (j= 0; j<41000; j++)
    {
      x= j;
      i= j;
      putchar('a');
    }

  prints("Done.\n");
  *sif= 's';
  for (;;)
    ;
}