RosettaCodeData/Task/Pinstripe-Display/XPL0/pinstripe-display.xpl0
Ingy döt Net b83f433714 tasks a-s
2013-04-10 23:57:08 -07:00

14 lines
658 B
Text

include c:\cxpl\codes; \include 'code' declarations
int X, Y, W, C;
[SetVid($13); \320x200x8 graphics
for Y:= 0 to 200-1 do \for all the scan lines...
[W:= Y/50 + 1; \width of stripe = 1, 2, 3, 4
C:= 0; \set color to black so first pixel becomes white
for X:= 0 to 320-1 do \for all the pixels on a scan line...
[if rem(X/W) = 0 then C:= C xor $0F; \alternate B&W
Point(X, Y, C); \set pixel at X,Y to color C
];
];
X:= ChIn(1); \wait for keystroke
SetVid(3); \restore normal text display
]