summaryrefslogtreecommitdiff
path: root/sim/ucsim/s51.src/test/sts.c
blob: 3cd9ffa80d12f663ba54f0505b4760c420a02be9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <stdio.h>
#include "serial.h"
#include "print.h"

unsigned char __xdata * volatile sif;

void
main(void)
{
  volatile unsigned int i;
  __code char *p= (__code char *)0;

  sif= (unsigned char __xdata *)0xffff;
  serial_init(19200);
  for (i= 1; i<0x4000; i++)
    {
      print_cx(p[i]);
      putchar('\n');
    }
  * (char __idata *) 0 = * (char __xdata *) 0xfffe;
  *sif= 's';
}