30 lines
631 B
Plaintext
30 lines
631 B
Plaintext
include c:\cxpl\codes;
|
|
int R;
|
|
|
|
func BSD;
|
|
[R:= (1103515245*R + 12345) & $7FFF_FFFF;
|
|
return R;
|
|
]; \BSD
|
|
|
|
|
|
func MSFT;
|
|
[R:= (214013*R + 2531011) & $7FFF_FFFF;
|
|
return R>>16;
|
|
]; \MSFT
|
|
|
|
|
|
int N;
|
|
[SetVid(4); \320x200x2 graphics
|
|
R:= 0; \initialize seed
|
|
for N:= 0 to 5000 do
|
|
Point(rem(BSD/180), rem(BSD/180), 3);
|
|
N:= ChIn(1); \wait for keystoke
|
|
|
|
SetVid(4); \320x200x2 graphics
|
|
R:= 0; \initialize seed
|
|
for N:= 0 to 5000 do
|
|
Point(rem(MSFT/180), rem(MSFT/180), 3);
|
|
N:= ChIn(1); \wait for keystoke
|
|
SetVid(3); \restore normal text mode
|
|
]
|