/* * connecting PC through serial port * say " hello world" every 0.1 sec * Copyright (c) 1998 by W.Sirichote */ #include "c:\mc\8051io.h" /* include i/o header file */ #include "c:\mc\8051reg.h" extern register char cputick; register unsigned char sec100,sec,flag1,timeon,temp; register unsigned int address; unsigned int *dptr; /* declare pointer dptr */ main() { int i; char j; j=0; cputick = 0; for(i=0;i<100;i++) { while (cputick < 10) ; cputick = 0; printf("%u Hello World\n",j); // asm" CPL P1.7"; P1 ^= 0x80; j++; } putstr("\npress any key"); getch(); }