/* This program displays some happy faces at random spots on the screen. It uses the cls() and locate() functions from Lesson 5.6 and the rnd() and seedrnd() functions from Lesson 5.7. Other than that, it's pretty silly. */ #include #include #include #include #define FACE 0x01 //Face character number #define LOOP 100 //number of faces to display #define PAUSE 150000 //pause time (0-16,000,000) #define VIDEO 0x10 //Video interrupt #define COLS 80 //Screen width #define ROWS 25 //Screen rows void cls(void); void locate(int row,int col); int rnd(int range); void seedrnd(void); void main() { int t,x,y; unsigned long p; //p=pause loop cls(); //clear the screen seedrnd(); //set randomizer for(t=0;t