#include <go32.h>
#include <sys/farptr.h>
#include <time.h>
#include <stdlib.h>
#include <conio.h>
#include <dos.h>
#define putpixel(x, y, c) _farpokeb(_dos_ds, 0xA0000+(y)*320+(x), c)
int main() {
int x, y;
srand(time(NULL)); /* alustetaan satunnaislukugeneraattori */
textmode(0x13);
while(!kbhit()) {
for(y=0; y<200; y++)
for(x=0; x<320; x++)
putpixel(x, y, rand()%256);
}
getch();
textmode(0x3);
return 0;
}