Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
15
Task/Munching-squares/XPL0/munching-squares.xpl0
Normal file
15
Task/Munching-squares/XPL0/munching-squares.xpl0
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
include c:\cxpl\codes; \intrinsic 'code' declarations
|
||||
int X, Y;
|
||||
[SetVid($101); \set 640x480 graphics with 8-bit color
|
||||
port($3C8):= 0; \set color registers with beautiful shades
|
||||
for X:= 0 to 256-1 do
|
||||
[port($3C9):= X>>1; \red
|
||||
port($3C9):= X>>3; \green
|
||||
port($3C9):= X; \blue
|
||||
];
|
||||
for Y:= 0 to 256-1 do \"color table" is array of 256 registers
|
||||
for X:= 0 to 256-1 do
|
||||
Point(X, Y, X|Y); \"|" = XOR, not OR which is "!"
|
||||
X:= ChIn(1); \wait for keystroke
|
||||
SetVid(3); \restore normal text mode
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue